Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Grégoire Sutre" <gregoire.sutre@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Build error: "ENABLE_NLS" is not defined
Date: Wed, 13 Jan 2010 02:02:22 +0100	[thread overview]
Message-ID: <4B4D1B9E.3070505@gmail.com> (raw)
In-Reply-To: <2e59e6971001121259w18ebb724i52ed5ad6a791d00a@mail.gmail.com>

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' '{}' ';'

Grégoire

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

http://www.gnu.org/software/autoconf/manual/html_node/Generic-Declarations.html#Generic-Declarations



  reply	other threads:[~2010-01-13  1:02 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 [this message]
2010-01-19 23:38         ` Robert Millan
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=4B4D1B9E.3070505@gmail.com \
    --to=gregoire.sutre@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox