On Wed, Jan 13, 2010 at 02:02:22AM +0100, Grégoire Sutre wrote:
> richardvo...@gmail.com 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


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to