Experimental Physics and Industrial Control System
|
Mark Rivers wrote:
1) In seq 2-0-11 the executable snc.exe crashes when building state
programs. Thanks to Tim Graber, this was tracked down to the
following lines:
snc_main.c.orig: setvbuf(stdout, NULL, _IOLBF, 0);
snc_main.c.orig: setvbuf(stderr, NULL, _IOLBF, 0);
The problem lies with the final argument, SIZE. It appears that the
above syntax should be OK, because according to the Mac documentation
I found
*****
The setlinebuf() function is exactly equivalent to the call:
setvbuf(stream, (char *)NULL, _IOLBF, 0);
*****
We have found that specifying a size like 1024 seems to work, but
what is the correct way to work around this bug in VC8, if indeed
that is what it is?
From my investigations, setvbuf() conforms to C89, and it appears the
default value for the final argument when buf is NULL is supposed to be
BUFSIZ, which works for me on Linux and Solaris. I thought I remembered
this — equivalent fixes were made to base/src/catools a few years ago.
I committed that change to seq/src/snc/snc_main.c in the EPICS CVS
repository.
- Andrew
--
Talk is cheap. Show me the code. -- Linus Torvalds
- Replies:
- RE: [APS Beamline_controls] Problems building with Microsoft VisualStudio 2005 (VC8) Tim Graber
- References:
- Problems building with Microsoft Visual Studio 2005 (VC8) Mark Rivers
- Navigate by Date:
- Prev:
Re: Missing include in WIN32/osdTime.cpp? Andrew Johnson
- Next:
RE: [APS Beamline_controls] Problems building with Microsoft VisualStudio 2005 (VC8) Tim Graber
- 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:
Problems building with Microsoft Visual Studio 2005 (VC8) Mark Rivers
- Next:
RE: [APS Beamline_controls] Problems building with Microsoft VisualStudio 2005 (VC8) Tim Graber
- 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
|
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|