[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ltdl.c ifdefs
From: |
Alexandre Oliva |
Subject: |
Re: ltdl.c ifdefs |
Date: |
06 Apr 2004 17:33:32 -0300 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
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
because then someone can compile with -DWITH_MALLOC=0 and have the
feature disabled even if there's code that enables it by default, such
as:
#ifndef WITH_DMALLOC
# define WTIH_DMALLOC 1
#endif
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer address@hidden, gcc.gnu.org}
Free Software Evangelist address@hidden, gnu.org}
- ltdl.c ifdefs, Bob Friesenhahn, 2004/04/06
- Re: ltdl.c ifdefs,
Alexandre Oliva <=
- Re: ltdl.c ifdefs, Bob Friesenhahn, 2004/04/06
- Re: ltdl.c ifdefs, Gary V. Vaughan, 2004/04/07
- Re: ltdl.c ifdefs, Albert Chin, 2004/04/07
- Re: ltdl.c ifdefs, Gary V. Vaughan, 2004/04/07
- Re: ltdl.c ifdefs, Alexandre Oliva, 2004/04/09
- Re: ltdl.c ifdefs, Dalibor Topic, 2004/04/09
- Re: ltdl.c ifdefs, Bob Friesenhahn, 2004/04/07