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

Re: [Xen-devel] [PATCH v3] xen/errno: Reduce complexity of inclusion



On 04/03/16 12:28, Jan Beulich wrote:
>>>> On 04.03.16 at 13:24, <JBeulich@xxxxxxxx> wrote:
>>>>> On 03.03.16 at 15:14, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> @@ -82,16 +109,19 @@ XEN_ERRNO(EISCONN,     106)    /* Transport endpoint 
>>> is already 
>> connected */
>>>  XEN_ERRNO(ENOTCONN,        107)    /* Transport endpoint is not connected 
>>> */
>>>  XEN_ERRNO(ETIMEDOUT,       110)    /* Connection timed out */
>>>  
>>> -#undef XEN_ERRNO
>>>  #endif /* XEN_ERRNO */
>>> -
>>> -#ifndef __XEN_PUBLIC_ERRNO_H__
>>> -#define __XEN_PUBLIC_ERRNO_H__
>>> -
>>>  /* ` } */
>>>  
>>> +
>>> +/*
>>> + * Clean up from a default include.  Close the enum (for C) and remove the
>>> + * default XEN_ERRNO from scope.
>>> + */
>>> +#ifdef XEN_ERRNO_DEFAULT_INCLUDE
>>> +#undef XEN_ERRNO_DEFAULT_INCLUDE
>>> +#undef XEN_ERRNO
>>>  #ifndef __ASSEMBLY__
>>>  };
>>>  #endif
>>>  
>>> -#endif /*  __XEN_PUBLIC_ERRNO_H__ */
>>> +#endif /* XEN_ERRNO_DEFAULT_INCLUDE */
>> So far, upon reaching the end oft the file XEN_ERRNO is undefined,
>> no matter whether it got defined here or prior to inclusion. I think
>> this property should be retained, but moving the #undef to the
>> very end.
> Or rather not removing it from where it's now.

IMO, it is wrong to undef XEN_ERRNO if it was provided from external scope.

The only users of this "custom" include in Xen itself, and shortly,
hvmloader.

I think it is fine as-is.

~Andrew

_______________________________________________
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®.