EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Compiler warning question
From: Benjamin Franksen via Core-talk <core-talk at aps.anl.gov>
To: EPICS core-talk <core-talk at aps.anl.gov>
Date: Thu, 17 Sep 2020 13:03:49 +0200
On 2020-09-16 08:40, Torsten Bögershausen via Core-talk wrote:
> The problem that strncpy() does not solve is to make sure that there
> is always a terminating NUL byte. The BSD world has invented
> strlcpy() for this.

We could add a compatibility header file in EPICS base. The idea is to
use a native stlcat/strlcpy where available (e.g. via libbsd for Linux)
and add our own implementation for platforms that don't have it. If and
when platforms (OS+compiler) decide to support these functions we can
drop our own implementation.

Cheers
Ben

Attachment: signature.asc
Description: OpenPGP digital signature


References:
Compiler warning question Mark Rivers via Core-talk
Re: Compiler warning question Torsten Bögershausen via Core-talk

Navigate by Date:
Prev: Re: Compiler warning question Johnson, Andrew N. via Core-talk
Next: [Bug 1896295] [NEW] WIN32: IOC scan loops hang Freddie Akeroyd via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Compiler warning question Johnson, Andrew N. via Core-talk
Next: RE: Compiler warning question Mark Rivers via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 19 Sep 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·