libtool-patches
[Top][All Lists]
Advanced

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

Re: ltdl.c ifdefs


From: Albert Chin
Subject: Re: ltdl.c ifdefs
Date: Wed, 7 Apr 2004 12:05:06 -0500
User-agent: Mutt/1.4i

On Wed, Apr 07, 2004 at 05:59:09PM +0100, Gary V. Vaughan wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Bob Friesenhahn wrote:
> | On 6 Apr 2004, Alexandre Oliva wrote:
> |
> |
> |>On Apr  6, 2004, Bob Friesenhahn <address@hidden> wrote:
> |>
> |>
> |>>#if WITH_DMALLOC
> |>
> |>>This form is clearly incorrect unless WITH_DMALLOC is always defined
> |>>(e.g. as 1 or 0).
> |>
> |>Nope.  An undefined macro is equivalent to a macro defined to 0 in
> |>preprocessor tests.  It's actually better to test with #if than #ifdef
> |
> |
> | True, but it causes the Digital Unix compiler to issue warnings.
> | Every compiler except for GCC issues great gobs of warnings when
> | compiling ltdl.c and it would be nice to see the number of warnings
> | reduced to zero.
> |
> | The oodles of warnings issued while compiling ltdl.c causes the
> | package I maintain to appear of much lower quality than it actually
> | is.
> 
> Maybe a new header for non gcc generated by configure (untested):
> 
> AC_CONFIG_COMMANDS([libltdl/lt__gcc.h],
> [for lt_symbol in `$SED -e '/^#undef [A-Z_]*$/ {
> ~         s,^#undef \([A-Z_]*\)$,\1,;p;
> ~      }; d' $top_srcdir/config-h.in`
> do
> ~  echo "#ifndef $lt_symbol"
> ~  echo "#  define $lt_symbol 0"
> ~  echo "#endif"
> done > libltdl/lt__gcc.h
> ])
> 
> and then #include "lt__gcc.h" at the top of lt__private.h?

What's the point? Is the gain of #if SYMBOL really worth it? libltdl
is so small I say don't bother.

-- 
albert chin (address@hidden)




reply via email to

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