[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling of #undef FOO

From: Eric Blake
Subject: Re: Handling of #undef FOO
Date: Mon, 07 Jan 2008 07:05:45 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Hash: SHA1

According to Ismail Dönmez on 1/7/2008 6:40 AM:
|> Whether you like it or not, the packages you mention are simply broken.
|> "Never install autoheaders, they are not supposed to be installed" has
|> been one of the fundamental working principles of autotool usage for
|> many years.
| Isn't #ifndef , #define , #endif is the correct way to use anyway? Could
| at least tell me where this is processed so I could get my hands dirty and
| fix it, maybe you'll accept it like that ;-)

#ifndef, #define, #endif is only valid when the defines in config.h are
likely to conflict with earlier definitions; otherwise a single #define is
adequate.  But since autoconf recommends that config.h ALWAYS be the first
file included (since it can have definitions that affect system headers),
the only things that can be defined earlier occur as compiler builtins or
as command line arguments.  At which point, if autoconf is working with
compiler builtins, we've got bigger problems (but see
AC_USE_SYSTEM_EXTENSIONS, for example, which uses AH_VERBATIM to correctly
add in the necessary #ifndef sequences); and if it clashes with a command
line define, the user is doing something fishy.

Ralf is correct - autoconf's current approach only triggers redefinition
problems for packages that don't follow the rules recommended by autoconf.
~ Any patches are welcome, but I won't be spending time writing the patch
myself, since none of the packages I maintain break the recommended rules
of config.h handling.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

[Prev in Thread] Current Thread [Next in Thread]