From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQN0d-0002VW-FN for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:00:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQN0c-0002VB-BF for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:00:02 -0400 Received: from [199.232.76.173] (port=37787 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQN0c-0002V6-40 for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:00:02 -0400 Received: from fg-out-1718.google.com ([72.14.220.154]:43824) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQN0b-0003Ca-JD for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:00:01 -0400 Received: by fg-out-1718.google.com with SMTP id d23so956782fga.8 for ; Mon, 13 Jul 2009 07:59:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4A5B3CB0.7070604@codemonkey.ws> References: <1247478048-17257-1-git-send-email-kraxel@redhat.com> <1247478048-17257-3-git-send-email-kraxel@redhat.com> <4A5B3CB0.7070604@codemonkey.ws> Date: Mon, 13 Jul 2009 17:59:57 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH 2/7] add strify() macros. From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paul Brook , Gerd Hoffmann , qemu-devel@nongnu.org On 7/13/09, Anthony Liguori wrote: > Gerd Hoffmann wrote: > > > Signed-off-by: Gerd Hoffmann > > --- > > osdep.h | 5 +++++ > > 1 files changed, 5 insertions(+), 0 deletions(-) > > > > diff --git a/osdep.h b/osdep.h > > index ffbf221..ac660c8 100644 > > --- a/osdep.h > > +++ b/osdep.h > > @@ -27,6 +27,11 @@ > > #define unlikely(x) __builtin_expect(!!(x), 0) > > #endif > > +#ifndef strify > > +#define strify_i(a) # a > > +#define strify(a) strify_i(a) > > +#endif > > + > > > > > > Could get even fancier with something like: > > #define strify_i(a) # a > #define strify(a) strify_i(a) What's wrong with the almost identical stringify() macro?