From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Sam Ravnborg <sam@ravnborg.org>,
akpm@linux-foundation.org, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>, akpm@osdl.org
Subject: [RFC patch 9/9] Stringify support commas
Date: Tue, 22 Apr 2008 13:24:13 -0400 [thread overview]
Message-ID: <20080422172843.602304016@polymtl.ca> (raw)
In-Reply-To: 20080422172404.502954084@polymtl.ca
[-- Attachment #1: stringify-support-commas.patch --]
[-- Type: text/plain, Size: 1210 bytes --]
#define MYDEF a, b, c
__stringify(MYDEF) should be replaced by "a, b, c", but compilation fails
because the __stringify macro expects only one argument. Fix it by using
variable macro arguments in __stringify and __stringify_1.
Needed in my current NMI safe iret paravirt support work so I can expand
a macro containing assembly code into a string.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: akpm@osdl.org
---
include/linux/stringify.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6-lttng/include/linux/stringify.h
===================================================================
--- linux-2.6-lttng.orig/include/linux/stringify.h 2008-04-20 14:25:12.000000000 -0400
+++ linux-2.6-lttng/include/linux/stringify.h 2008-04-20 14:25:33.000000000 -0400
@@ -6,7 +6,7 @@
* converts to "bar".
*/
-#define __stringify_1(x) #x
-#define __stringify(x) __stringify_1(x)
+#define __stringify_1(x...) #x
+#define __stringify(x...) __stringify_1(x)
#endif /* !__LINUX_STRINGIFY_H */
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
prev parent reply other threads:[~2008-04-22 17:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 17:24 [RFC patch 0/9] Stringify support commas Mathieu Desnoyers
2008-04-22 17:24 ` [RFC patch 1/9] CRIS remove -traditional Mathieu Desnoyers
2008-04-22 17:24 ` [RFC patch 2/9] M32R " Mathieu Desnoyers
2008-04-22 17:24 ` [RFC patch 3/9] H8300 " Mathieu Desnoyers
2008-04-22 17:24 ` [RFC patch 4/9] M68K " Mathieu Desnoyers
2008-04-22 17:24 ` [RFC patch 5/9] PARISC " Mathieu Desnoyers
2008-04-22 18:00 ` Kyle McMartin
2008-04-22 18:12 ` Mathieu Desnoyers
2008-04-22 17:24 ` [RFC patch 6/9] POWERPC " Mathieu Desnoyers
2008-04-23 4:41 ` Paul Mackerras
2008-04-23 12:14 ` Mathieu Desnoyers
2008-04-22 17:24 ` [RFC patch 7/9] S390 " Mathieu Desnoyers
2008-04-23 7:28 ` Heiko Carstens
2008-04-22 17:24 ` [RFC patch 8/9] SH " Mathieu Desnoyers
2008-04-25 9:02 ` Paul Mundt
2008-04-22 17:24 ` Mathieu Desnoyers [this message]
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=20080422172843.602304016@polymtl.ca \
--to=mathieu.desnoyers@polymtl.ca \
--cc=akpm@linux-foundation.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.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