EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  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  Index 1994  1995  1996  1997  <19981999  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 
<== Date ==> <== Thread ==>

Subject: RE: v3_13Beta11 compilation Error
From: [email protected] (Jeff Hill)
To: "'Jeffrey Mcdonald'" <[email protected]>, "[email protected]" <[email protected]>
Date: Fri, 5 Jun 1998 16:00:06 -0600
Jeff,

> gmake[1]: Entering directory
> `/projects/711/online_1/epics/v3_13b11/base/src/gdd/O.sgi'
> CC +p +w  -O   -DSGI  -I. -I..  -I../../../include -I../../../include
> -I../../../include/os/sgi -DUNIX     -c  ../genApps.cc
> "../aitTypes.h", line 83: error(3337): invalid redeclaration of type name
>           "timespec" (declared at line 11 of "/usr/include/sys/ptimers.h")
>   struct timespec

The current version of the conditional in aitTypes.h is:

#if (_POSIX_C_SOURCE < 3) && !defined(SOLARIS) && !defined(HP_UX) && !defined(linux)

It would appear that the trend is that all UNIX OS are providing this declaration
even if _POSIX_C_SOURCE is less than 3. The os that do not supply struct  timespec
are currently (I think) WIN32, VMS, CYGWIN32, ALPHA, and SUN4. It appears that 
struct timespec is supplied by SOLARIS, HPUX, LINUX, and SGI irregardless of
what _POSIX_C_SOURCE is set to. I will add only "!defined(sgi)" because I have
seen this elsewhere in the EPICS source code. I will not add "SGI" so that we can
keep the list reasonably short.

> I could not find where _POSIX_C_SOURCE is defined in the configure
> files.   Can someone tell me where I can set this variable so that the
> fix can avoid changing the code?  

Attached is a description of POSIX_C_SOURCE that I found on the internet.

PS: if anyone knows of a cleaner (read less maintenance) solution to this mess 
please send your suggestions.

Jeff

A new symbol, _POSIX_C_SOURCE was introduced in POSIX.2
(V1 P720, L51) as a mechanism to enable POSIX.1 and
POSIX.2 symbols. Its values are as follows:


/*
* Values of _POSIX_C_SOURCE
*
* undefined not a POSIX compilation
* 1 POSIX.1-1990 compilation
* 2 POSIX.2-1992 compilation
* 1993xxL POSIX.4-1993 compilation
*/




This means that POSIX.2 says that a value of 1 = POSIX.1
and a value of 2 = POSIX.1 & POSIX.2. The idea here is
to provide a single control point over the POSIX namespace,
rather than having to edit each file individually. 



Navigate by Date:
Prev: color rules Dave Gurd
Next: RE: compilation of src/ca Jeff Hill
Index: 1994  1995  1996  1997  <19981999  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: v3_13Beta11 compilation Error Jeffrey Mcdonald
Next: compilation of src/ca Jeffrey Mcdonald
Index: 1994  1995  1996  1997  <19981999  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, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·