Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQNIx-0005Wj-B8 for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:18:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQNIr-0005VP-RK for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:18:58 -0400 Received: from [199.232.76.173] (port=43308 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQNIr-0005VM-OP for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:18:53 -0400 Received: from main.gmane.org ([80.91.229.2]:45008 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQNIr-0006uu-Eg for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:18:53 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MQNIp-0008Ro-6E for qemu-devel@nongnu.org; Mon, 13 Jul 2009 15:18:51 +0000 Received: from unicorn.mansr.com ([78.86.181.103]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jul 2009 15:18:51 +0000 Received: from mans by unicorn.mansr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jul 2009 15:18:51 +0000 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Date: Mon, 13 Jul 2009 16:18:40 +0100 Message-ID: References: <1247478048-17257-1-git-send-email-kraxel@redhat.com> <1247478048-17257-3-git-send-email-kraxel@redhat.com> <4A5B3CB0.7070604@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: news Subject: [Qemu-devel] Re: [PATCH 2/7] add strify() macros. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Blue Swirl writes: > 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? Both are wrong in that any name beginning with 'str' is reserved for future expansion of the standard C library if the string.h header is used. -- Måns Rullgård mans@mansr.com