[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Build error: "ENABLE_NLS" is not defined
From: |
Robert Millan |
Subject: |
Re: Build error: "ENABLE_NLS" is not defined |
Date: |
Wed, 20 Jan 2010 00:38:11 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Jan 13, 2010 at 02:02:22AM +0100, Grégoire Sutre wrote:
> address@hidden wrote:
>
>>> Another option would be to replace #if ENABLE_NLS by #if defined(ENABLE_NLS)
>>> && 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' '{}' ';'
This affects gnulib/error.c and gnulib/gettext.h which would be much better
not to change, as they're being imported semi-automatically.
Perhaps you could solve this at its source? (i.e. by defining ENABLE_NLS to
0 when gettext is unavailable).
--
Robert Millan
"Be the change you want to see in the world" -- Gandhi