apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: [proposal for 1.0 API] change APR not to export OS symbols to applications
Date Thu, 20 Nov 2003 12:35:36 GMT
On Mon, Nov 17, 2003 at 02:45:12PM -0500, Jeff Trawick wrote:
> re-troll^H^H^H^H^Hpost
> Jeff Trawick wrote:
> >Currently, APR exports unqualified OS symbols to applications on some 
> >platforms.  These symbols include HPUX11=1, HPUX=1, NETBSD=1, SOLARIS2=8 
> >(or whatever), and others.  These shouldn't be added to compile flags since
> >
> >1) it can interfere with application defines
> >2) they aren't properly qualified with APR_
> >3) they aren't consistently implemented
> >
> >If we actually require some of these symbols in public header files, 
> >that probably needs to be fixed.  If the APR implementation needs it 
> >somewhere, something should be placed in apr_private.h instead.
> >
> >Comments?
> I'm not anxious to jump on this at the moment, but I'm a little surprised 
> at the lack of comment given the amount of disagreement with the idea that 
> APR should provide a consistent indication of the platform in lieu of the 
> current mess.

I agree they need to be removed, they are an ugly leftover from a
copy'n'paste then search'n'replace-or-two from 1.3's Configure script.  
It's interesting looking for what is and isn't actually used, I did some
grepwork... the uses of -D's set in apr_hints.m4 by the public headers
which I found:

  include/apr_portable.h:#elif defined(DARWIN)
  include/apr_signal.h:#if defined(DARWIN) && !defined(__cplusplus) && !defined(_ANSI_SOURCE)
  include/apr_portable.h:#if defined(HPUX) || defined(HPUX10) || defined(HPUX11)
  include/apr_portable.h:#if defined(HPUX) || defined(HPUX10) || defined(HPUX11)
  include/apr_general.h:#if defined(CRAY) || (defined(__arm) && !defined(LINUX))

  include/apr.h:    defined(NEXT)
  include/apr_mmap.h:#  ifdef SUNOS4

vaguely sanitized script output attached showing all the -DBLAHs in
apr_hints.m4 and where they are (not) used in APR.


View raw message