Experimental Physics and Industrial Control System
Subject: |
Re: Mass PV assign and event flag sync [was: Creating INLINK/OUTLINK in record support] |
From: |
Andrew Johnson <[email protected]> |
To: |
[email protected] |
Date: |
Fri, 31 Aug 2012 15:00:16 -0500 |
Hi Benjamin,
On 2012-08-29 Benjamin Franksen wrote:
>
> Though using a C99 compatible snprintf that always returns the number of
> characters it /would/ have written, had it enough space, one could easily
> avoid that. Looking at the epicsStdio.h implementation for WIN32 I see that
> the real problem here is MINGW which seems to offer no way to find out how
> large the buffer /would/ have to be (whereas Windows has _vscprintf which
> does exactly that, and VxWorks has fioFormatV).
Newer versions of the MinGW tools do now provide _vscprintf(). I'll be
deleting the MINGW-specific code from libCom/osi/os/WIN32/osdStdio.c before
the next 3.15.0.2 release, so you should soon be able to use epicsSnprint() to
find out how big a buffer you actually need.
Section 20.12 of the AppDevGuide says that the initial buffer size to find the
length needed should be non-zero since SUSv2 says systems can return an error
in that case (contrary to the C99 spec which allows it), but the manpage for
Solaris permits a size of zero with a NULL buffer, so even that might be safe
nowadays.
- Andrew
--
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte
- References:
- Re: Creating INLINK/OUTLINK in record support Tim Mooney
- Mass PV assign and event flag sync [was: Creating INLINK/OUTLINK in record support] Benjamin Franksen
- Navigate by Date:
- Prev:
RE: put to disabled records and monitors Pal Trivan
- Next:
edm and other extensions on 64-bit SL machines Pierrick Hanlet
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Mass PV assign and event flag sync [was: Creating INLINK/OUTLINK in record support] Benjamin Franksen
- Next:
Re: Creating INLINK/OUTLINK in record support Tim Mooney
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024