apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@ebuilt.com>
Subject Re: [PATCH] a somewhat different approach to the iconv() issue
Date Fri, 09 Feb 2001 00:36:54 GMT
> >   1) The #ifdef APR_ in xlate.c must be a #if
> 
> Why is that?  We generally use #ifdef FOO if FOO is sometimes defined
> and sometimes not (e.g., APR_ICONV_INBUF_CONST).  We generally use #if
> FOO if FOO is always defined but sometimes to 1 and sometimes to 0
> (e.g., APR_HAS_XLATE).

Sorry, I just misread the code -- it is setting the internal variable
to 1 or 0, but only does the define if it is 1.  My goof.

> >   2) The test is looking at the versions and triggering #error
> > 
> > I don't know why the version test is giving a false-positive, nor
> > do I particularly care -- I don't think this can be fixed by assuming
> > the version numbers mean anything.  The fix I am working on is a
> > replacement for AC_TRY_COMPILE, but m4 isn't one of my strong
> > points.
> 
> I don't follow your comment about "assuming the version numbers mean
> anything".  Maybe if I saw the version numbers in glibc 2.2's
> <features.h> it would be easy to follow what you are saying.
> 
> If you can get -Werror working for gcc, obviously we don't need the
> glibc version check since we can expect to use gcc on a platform which
> uses glibc 99.99% of the time, but I can't help but be curious about
> why it generated the #error on RH 7.0 which has glibc 2.2 (and I guess
> __GLIBC_MINOR__ == 2).

Oh, that's probably the problem -- it is __GLIBC_MINOR in the macro.

Anyway, I've coded up the tester as APR_TRY_GCC_WARNING and will commit.
Please give it a try on your platform and fix where needed.  I think
it will fail-safe, but I'm still too sane to be able to follow all
of the possible m4 paths.

No worries about the license -- the m4 include files have effectively
the same license as the autoconf library, and since they don't get
added to the object file they cannot cause our code to be considered
"derived from GPL code".

....Roy

Mime
View raw message