Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: extern "C" { #include <...> }
From: Andrew Johnson <anj@aps.anl.gov>
To: "Jeff Hill" <johill@lanl.gov>
Cc: "'EPICS core-talk'" <core-talk@aps.anl.gov>
Date: Fri, 9 Sep 2011 17:22:45 -0500
Hi Jeff,

On 2011-09-08 Jeff Hill wrote:
> Agree with Eric that it may very well be OS specific, and even OS version
> specific, whether the OS headers provide their own conditional blocks for
> C++ specifying extern "C", or not. It seems odd that it's that way for all
> OS. Could also simply have been a mistake, or a bad assumption at the time
> that it was written. I'm not sure what the standard says about nested
>  extern "C" blocks?

I'm guessing it used to be necessary on some OS, and that osdSock.h file got 
copied to the other OSs.  I just committed the changes to delete these — I 
tested it on many but not all so it's possible I might have broken something 
which we can fix later if it comes up.

The problem with nesting extern "C" blocks is that the target has no way to 
know if it's inside one, and even if you can say extern "C++" nobody does.

- Andrew
-- 
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham


References:
extern "C" { #include <...> } Andrew Johnson
RE: extern "C" { #include <...> } Jeff Hill

Navigate by Date:
Prev: Re: 3.14 branch broken for older vxWorks Andrew Johnson
Next: [Merge] lp:~epics-core/epics-base/rebased-atomics into lp:epics-base noreply
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: extern "C" { #include <...> } Jeff Hill
Next: RE: 3.14 branch broken for older vxWorks Jeff Hill
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·