From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NUrcx-0005y5-Ds for mharc-grub-devel@gnu.org; Tue, 12 Jan 2010 20:02:27 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUrcv-0005xr-GT for grub-devel@gnu.org; Tue, 12 Jan 2010 20:02:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUrcu-0005xV-KN for grub-devel@gnu.org; Tue, 12 Jan 2010 20:02:24 -0500 Received: from [199.232.76.173] (port=43557 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUrcu-0005xR-Du for grub-devel@gnu.org; Tue, 12 Jan 2010 20:02:24 -0500 Received: from ey-out-1920.google.com ([74.125.78.149]:2255) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUrct-0003N7-Sj for grub-devel@gnu.org; Tue, 12 Jan 2010 20:02:24 -0500 Received: by ey-out-1920.google.com with SMTP id 4so3992111eyg.34 for ; Tue, 12 Jan 2010 17:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=cLQsXQFbi6DMXY+BpM9gjrLTSNc2IqsjBqq0winYjrU=; b=hjIqcP6WucP9sXiKayKJcsIK+SW8ra+1jSpPO003rD2TNBwtB5ltZbSLGZd2H5YBJ5 Liiz6CMyKyegXW2XEla6dyuH6p/yUeUcJj4CR7SuY3WXclzeBYDZLYmvp1tVA+0n7Vpn zGH4JIxwsgiANIiS8UAVxSjeE4rPfAdhstZ3k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=ilB9SVNjh4oDcbvdRADzfRYSRffFDTrVWulfBeknBDBaRhoGUI38NJbxBt9a+9AMlk fmLaP/g6dVG37xvcNn3l5RPCLEhZy43S36jUy+BuWUjxtB9tJYpOxNOSLhc/QsWLb8d4 4GZiWUYAOuX7b+yirUL660wmbM6iExvpWBA6g= Received: by 10.216.93.77 with SMTP id k55mr391203wef.196.1263344542999; Tue, 12 Jan 2010 17:02:22 -0800 (PST) Received: from ?192.168.1.50? (c2433-1-88-160-112-182.fbx.proxad.net [88.160.112.182]) by mx.google.com with ESMTPS id 5sm8250154eyf.6.2010.01.12.17.02.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Jan 2010 17:02:22 -0800 (PST) Message-ID: <4B4D1B9E.3070505@gmail.com> Date: Wed, 13 Jan 2010 02:02:22 +0100 From: =?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: The development of GNU GRUB References: <4B4CC4EF.5000104@gmail.com> <2e59e6971001121109t5314e819t30ee70bb509254e2@mail.gmail.com> <4B4CCE14.7060706@gmail.com> <2e59e6971001121259w18ebb724i52ed5ad6a791d00a@mail.gmail.com> In-Reply-To: <2e59e6971001121259w18ebb724i52ed5ad6a791d00a@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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: Wed, 13 Jan 2010 01:02:26 -0000 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