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: "Jeff Hill" <johill@lanl.gov>
To: "'Andrew Johnson'" <anj@aps.anl.gov>, "'EPICS core-talk'" <core-talk@aps.anl.gov>
Date: Thu, 8 Sep 2011 17:44:07 -0600
> I noticed yesterday that *all* the libCom/osi/os/<arch>/osdSock.h files
> have
>     #ifdef __cplusplus
>     extern "C" {
>     #endif
> wrapped around the system #include files.  This doesn't look right to me,
> should we (re)move them from around the #includes?  This would happen in
> 3.14.

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?

Jeff
______________________________________________________
Jeffrey O. Hill           Email        johill@lanl.gov
LANL MS H820              Voice        505 665 1831
Los Alamos NM 87545 USA   FAX          505 665 5107

Message content: TSPA

With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead. -- RFC 1925

> -----Original Message-----
> From: core-talk-bounces@aps.anl.gov [mailto:core-talk-bounces@aps.anl.gov]
> On Behalf Of Andrew Johnson
> Sent: Thursday, September 08, 2011 11:00 AM
> To: EPICS core-talk
> Subject: extern "C" { #include <...> }
> 
> Hi Jeff, Eric,
> 
> I noticed yesterday that *all* the libCom/osi/os/<arch>/osdSock.h files
> have
>     #ifdef __cplusplus
>     extern "C" {
>     #endif
> wrapped around the system #include files.  This doesn't look right to me,
> should we (re)move them from around the #includes?  This would happen in
> 3.14.
> 
> - Andrew
> --
> Optimization is the process of taking something that works and
> replacing it with something that almost works, but costs less.
> -- Roger Needham



Replies:
Re: extern "C" { #include <...> } Andrew Johnson
References:
extern "C" { #include <...> } Andrew Johnson

Navigate by Date:
Prev: Re: extern "C" { #include <...> } Andrew Johnson
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 
Navigate by Thread:
Prev: Re: extern "C" { #include <...> } Andrew Johnson
Next: Re: extern "C" { #include <...> } Andrew Johnson
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 ·