From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Adrian Bunk <bunk@kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
linux-kbuild <linux-kbuild@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Roman Zippel <zippel@linux-m68k.org>,
Tom Spink <tspink@gmail.com>
Subject: Re: [RFC PATCH] kconfig: introduce KCONFIG_* symbols for .c files
Date: Sat, 24 May 2008 22:13:50 +0100 [thread overview]
Message-ID: <4838850E.20101@goop.org> (raw)
In-Reply-To: <20080524210304.GD2308@cs181133002.pp.htv.fi>
Adrian Bunk wrote:
> On Sat, May 24, 2008 at 09:58:47PM +0100, Jeremy Fitzhardinge wrote:
>
>> Would
>>
>> #define KCONFIG(x) (CONFIG_##x - 0)
>>
>> if (KCONFIG(PREEMPT)) {
>> ...
>> }
>>
>> work?
>>
>
> $ cat test.c
> #define KCONFIG(x) (CONFIG_##x - 0)
>
> int main()
> {
> if (KCONFIG(PREEMPT))
> ;
>
> return 0;
> }
> $ gcc -O2 -Wall test.c
> test.c: In function ‘main’:
> test.c:5: error: ‘CONFIG_PREEMPT’ undeclared (first use in this function)
> test.c:5: error: (Each undeclared identifier is reported only once
> test.c:5: error: for each function it appears in.)
>
You and your scientific method.
Yeah, this is one of those cases where you need cpp to rescan its input
after pasting, and I don't think it will ever do that.
J
next prev parent reply other threads:[~2008-05-24 21:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-24 19:25 [RFC PATCH] kconfig: introduce KCONFIG_* symbols for .c files Sam Ravnborg
2008-05-24 19:53 ` Andrew Morton
2008-05-24 20:14 ` Jeremy Fitzhardinge
2008-05-24 20:46 ` Sam Ravnborg
2008-05-24 20:56 ` Jeremy Fitzhardinge
2008-05-24 21:03 ` Sam Ravnborg
2008-05-24 20:24 ` Sam Ravnborg
2008-05-24 20:48 ` Andrew Morton
2008-05-24 21:00 ` Sam Ravnborg
2008-05-24 20:05 ` Adrian Bunk
2008-05-24 20:44 ` Sam Ravnborg
2008-05-24 20:57 ` Adrian Bunk
2008-05-24 20:20 ` Linus Torvalds
2008-05-24 20:37 ` [PATCH] x86: use defconfig as last resort Sam Ravnborg
2008-05-25 1:30 ` Linus Torvalds
2008-05-25 6:15 ` Sam Ravnborg
2008-05-25 6:22 ` Sam Ravnborg
2008-05-24 20:48 ` [RFC PATCH] kconfig: introduce KCONFIG_* symbols for .c files Jeremy Fitzhardinge
2008-05-24 20:58 ` Jeremy Fitzhardinge
2008-05-24 21:03 ` Adrian Bunk
2008-05-24 21:13 ` Jeremy Fitzhardinge [this message]
2008-05-24 21:26 ` Pavel Machek
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=4838850E.20101@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
--cc=tspink@gmail.com \
--cc=zippel@linux-m68k.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