apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <v.j.orlikow...@gte.net>
Subject Re: Build failure due to pthread_rwlock_t
Date Thu, 31 May 2001 21:08:34 GMT
 > What is the proper solution here?  Should we *always* add the 
 > -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE to the hints for
 > Linux-based platforms?
 > 
 > Or, would adding these to apr_hints.m4 break other things?  I can
 > try and get access to a Linux box tonight and play with it some.

If we desire rwlocks, answer is yes.
Checking /usr/include/features.h on my Linux box:

/* If nothing (other than _GNU_SOURCE) is defined,
   define _BSD_SOURCE and _SVID_SOURCE.  */
#if (!defined __STRICT_ANSI__ && !defined _ISOC9X_SOURCE && \
     !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \
     !defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \
     !defined _BSD_SOURCE && !defined _SVID_SOURCE)
# define _BSD_SOURCE    1
# define _SVID_SOURCE   1
#endif

Hence, _BSD_SOURCE and _SVID_SOURCE are defined by default.
We probably don't want the GNU extensions, so we must define these, as
well as _XOPEN_SOURCE.
So, the only thing we need to look out for breaking anything is
_XOPEN_SOURCE=500, which simply enforces Single Unix conformance.
Therefore, I think it's probably safe to put these flags into
apr_hints.m4.
The question is, does this apply only to versions of Linux greater
than (or equal to) 2.0?

Victor
-- 
Victor J. Orlikowski
======================
v.j.orlikowski@gte.net
orlikowski@apache.org
vjo@us.ibm.com


Mime
View raw message