[Top][All Lists]

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

Re: Build error: "ENABLE_NLS" is not defined

From: Grégoire Sutre
Subject: Re: Build error: "ENABLE_NLS" is not defined
Date: Wed, 13 Jan 2010 02:02:22 +0100
User-agent: Mozilla-Thunderbird (X11/20090707)

address@hidden wrote:

Another option would be to replace #if ENABLE_NLS by #if defined(ENABLE_NLS)

I know the C compiler short-circuits &&, if the preprocessor does also
then this looks like the best solution.  If not, then nested #if.

Yes the preprocessor also short-circuits (I tested a small example to be sure, with gcc 4.1 and gcc 4.4). So the automatic replacement command becomes:

find . -name '*.[ch]' -exec sed -i -e 's, ENABLE_NLS, (defined(ENABLE_NLS) \&\& ENABLE_NLS),g' '{}' ';'


p.s. By the way, this kind of contruct appears in the autoconf manual for a similar problem (middle of page):

reply via email to

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