qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions
Date: Tue, 28 Aug 2012 18:46:53 +0100

On 28 August 2012 18:32, Michael S. Tsirkin <address@hidden> wrote:
> What about _t in POSIX? That seems fairly safe if name is long and qemu
> specific enough.

Depends what you mean by "safe". The spec says "don't use this";
it isn't any different to the __ and _[A-Z] prohibitions in that
respect.

Other posix namespace landgrabs you may not have expected:
 * ctype.h reserves "is[a-z]" and to[a-z]" prefixes
 * string.h takes "str[a-z]" and "mem[a-z]" prefixes

(and qemu-common.h includes both string.h and ctype.h so this
effectively applies to all of qemu).

I'm in two minds about these, because on the one hand they're
reserved but on the other hand abiding by the rules makes things
uglier (whereas "use one underscore not two" doesn't produce
an uglier name IMHO).

(posix also if I'm reading it correctly reserves all of 'prefix
underscore', which is annoying.)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]