[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 2/7] add strify() macros.
From: |
Måns Rullgård |
Subject: |
[Qemu-devel] Re: [PATCH 2/7] add strify() macros. |
Date: |
Mon, 13 Jul 2009 16:18:40 +0100 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (Instant Classic, linux) |
Blue Swirl <address@hidden> writes:
> On 7/13/09, Anthony Liguori <address@hidden> wrote:
>> Gerd Hoffmann wrote:
>>
>> > Signed-off-by: Gerd Hoffmann <address@hidden>
>> > ---
>> > 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
address@hidden
- [Qemu-devel] [PATCH v2 0/7] qdev: compat properties., Gerd Hoffmann, 2009/07/13
- [Qemu-devel] [PATCH 4/7] qdev/compat: add pc-0.10 machine type., Gerd Hoffmann, 2009/07/13
- [Qemu-devel] [PATCH 3/7] qdev/compat: compat property infrastructure., Gerd Hoffmann, 2009/07/13
- [Qemu-devel] [PATCH 5/7] qdev/compat: virtio-blk-pci 0.10 compatibility., Gerd Hoffmann, 2009/07/13
- [Qemu-devel] [PATCH 7/7] qdev/compat: virtio-net-pci 0.10 compatibility., Gerd Hoffmann, 2009/07/13
- [Qemu-devel] [PATCH 1/7] cleanup: drop unused struct elements from VirtIOPCIProxy., Gerd Hoffmann, 2009/07/13
- [Qemu-devel] [PATCH 6/7] qdev/compat: virtio-balloon-pci 0.10 compatibility., Gerd Hoffmann, 2009/07/13