All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Build error: "ENABLE_NLS" is not defined
Date: Wed, 20 Jan 2010 00:38:11 +0100	[thread overview]
Message-ID: <20100119233811.GP8599@thorin> (raw)
In-Reply-To: <4B4D1B9E.3070505@gmail.com>

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



  reply	other threads:[~2010-01-19 23:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 18:52 Build error: "ENABLE_NLS" is not defined Grégoire Sutre
2010-01-12 19:09 ` richardvoigt
2010-01-12 19:31   ` Grégoire Sutre
2010-01-12 20:59     ` richardvoigt
2010-01-13  1:02       ` Grégoire Sutre
2010-01-19 23:38         ` Robert Millan [this message]
2010-01-20 19:53           ` Grégoire Sutre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100119233811.GP8599@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.