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

Re: [Xen-devel] [PATCH 1/5] xen: improve changes to xen_add_to_physmap



On Wed, 2012-08-08 at 08:14 +0100, Jan Beulich wrote:
> >>> On 07.08.12 at 19:07, Stefano Stabellini 
> >>> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> > Regarding the name, maybe it should be XEN_ADD_TO_PHYSMAP_FIELD?
> 
> Sounds fine (and I like this better than the ..._ARG one you used
> below.
> 
> > #if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || (__STDC_VERSION__ 
> > >= 201112L)
> 
> #if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || \
>     (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)

The downside of this is that users of this header might need to change
their code depending on what compiler they actually build with today (or
even what options).

Is adding the ".u" throughout the Xen code base too intrusive?

> avoiding compilers to warn about the use of the possibly
> undefined __STDC_VERSION__, which only got introduced
> after C89 was already published (and which e.g. gcc indeed
> doesn't define if the value would end up being below 199409L).
> 
> > # define XEN_ADD_TO_PHYSMAP_ARG
> > #else
> > # define XEN_ADD_TO_PHYSMAP_ARG u
> > #endif
> 
> Also, please don't forget to #undef it after use.
> 
> Jan
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.