From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NXNeT-0004Lm-3K for mharc-grub-devel@gnu.org; Tue, 19 Jan 2010 18:38:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXNeR-0004KR-Dp for grub-devel@gnu.org; Tue, 19 Jan 2010 18:38:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXNeM-0004Cr-U0 for grub-devel@gnu.org; Tue, 19 Jan 2010 18:38:23 -0500 Received: from [199.232.76.173] (port=55654 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXNeM-0004Ch-NX for grub-devel@gnu.org; Tue, 19 Jan 2010 18:38:18 -0500 Received: from xvm-190-8.ghst.net ([217.70.190.8]:41214 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NXNeM-0004N9-4m for grub-devel@gnu.org; Tue, 19 Jan 2010 18:38:18 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1NXNeG-0000Gr-RG for grub-devel@gnu.org; Wed, 20 Jan 2010 00:38:13 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1NXNeF-0002qO-I2 for grub-devel@gnu.org; Wed, 20 Jan 2010 00:38:11 +0100 Date: Wed, 20 Jan 2010 00:38:11 +0100 From: Robert Millan To: The development of GNU GRUB Message-ID: <20100119233811.GP8599@thorin> References: <4B4CC4EF.5000104@gmail.com> <2e59e6971001121109t5314e819t30ee70bb509254e2@mail.gmail.com> <4B4CCE14.7060706@gmail.com> <2e59e6971001121259w18ebb724i52ed5ad6a791d00a@mail.gmail.com> <4B4D1B9E.3070505@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B4D1B9E.3070505@gmail.com> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Build error: "ENABLE_NLS" is not defined X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 23:38:23 -0000 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