Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 30953 invoked by uid 500); 1 Jun 2001 14:38:27 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 30865 invoked from network); 1 Jun 2001 14:38:25 -0000 X-Authentication-Warning: adsl-77-241-65.rdu.bellsouth.net: trawick set sender to trawickj@bellsouth.net using -f Sender: trawick@bellsouth.net To: Cc: dev@apr.apache.org Subject: Re: cvs commit: apr/build apr_hints.m4 References: <20010601003550.95928.qmail@apache.org> <20010531184707.I9397@ebuilt.com> From: Jeff Trawick Date: 01 Jun 2001 10:35:08 -0400 In-Reply-To: <20010531184707.I9397@ebuilt.com> Message-ID: Lines: 72 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Justin Erenkrantz writes: > On Fri, Jun 01, 2001 at 12:35:50AM -0000, orlikowski@apache.org wrote: > > orlikowski 01/05/31 17:35:49 > > > > Modified: build apr_hints.m4 > > Log: > > Linux needs these options for the posix rwlocks to work. > > Normally, _SVID_SOURCE and _BSD_SOURCE are defined by default. > > However, we must re-define them if we define _XOPEN_SOURCE, which is needed for the rwlock definitions. > > > > Revision Changes Path > > 1.14 +4 -2 apr/build/apr_hints.m4 > > > > Index: apr_hints.m4 > > =================================================================== > > RCS file: /home/cvs/apr/build/apr_hints.m4,v > > retrieving revision 1.13 > > retrieving revision 1.14 > > diff -u -r1.13 -r1.14 > > --- apr_hints.m4 2001/05/13 11:03:59 1.13 > > +++ apr_hints.m4 2001/06/01 00:35:48 1.14 > > @@ -115,9 +115,11 @@ > > ;; > > *-linux-*) > > case `uname -r` in > > - 2.2* ) APR_ADDTO(CPPFLAGS, [-DLINUX=2]) > > + 2.2* ) APR_ADDTO(CPPFLAGS, [-DLINUX=2 -D_XOPEN_SOURCE=500]) > > + APR_ADDTO(CPPFLAGS, [-D_BSD_SOURCE -D_SVID_SOURCE]) > > ;; > > - 2.0* ) APR_ADDTO(CPPFLAGS, [-DLINUX=2]) > > + 2.0* ) APR_ADDTO(CPPFLAGS, [-DLINUX=2 -D_XOPEN_SOURCE=500]) > > + APR_ADDTO(CPPFLAGS, [-D_BSD_SOURCE -D_SVID_SOURCE]) > > ;; > > 1.* ) APR_ADDTO(CPPFLAGS, [-DLINUX=1]) > > ;; Victor, These have to do with glibc version, not kernel version... Maybe it will work fine, but it doesn't help anybody to understand why it is there. > Won't this break 2.4? I talked to Roy before I left today and I might > add something that does a AC_TRY_COMPILE (after seeing if > pthread_rwlock_init is present) and punt from there (i.e. add these > CPPFLAGS if the compile fails). About autodetection... Is this what you mean? a) see if pthread_rwlock_init is present; if not, punt b) see if pthread_rwlock_t is defined; if not, turn on those CPPFLAGS and try again Any kind of libc feature test macros need to be turned on ASAP, because they could influence the outcome of other tests (whether or not we find an interface or which flavor of an interface we find). I don't think we can wait until this point in autoconfiguration to start turning on libc feature test macros. Maybe it will work on some glibc version with the current set of tests, but I don't think it is cool in general. It seems to me that as soon as you change libc feature test macros you need to start over at ground zero. I think I'd feel safest with something like Victor's change but which looks at the glibc version instead of the kernel version. -- Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...