All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Tim Deegan <tim@xen.org>, Doug Goldstein <cardoe@cardoe.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v3] xen/errno: Reduce complexity of inclusion
Date: Fri, 4 Mar 2016 12:50:24 +0000	[thread overview]
Message-ID: <56D98490.3050602@citrix.com> (raw)
In-Reply-To: <56D98D6902000078000D9642@prv-mh.provo.novell.com>

On 04/03/16 12:28, Jan Beulich wrote:
>>>> On 04.03.16 at 13:24, <JBeulich@suse.com> wrote:
>>>>> On 03.03.16 at 15:14, <andrew.cooper3@citrix.com> 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@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-04 12:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 18:57 [PATCH 1/4] xen/errno: Introduce EISDIR/EROFS/ENOTEMPTY to the ABI Andrew Cooper
2016-03-01 18:57 ` [PATCH 2/4] xen/errno: Declare aliases using XEN_ERRNO() Andrew Cooper
2016-03-02  2:38   ` Doug Goldstein
2016-03-01 18:57 ` [PATCH 3/4] xen/errno: Reduce complexity of inclusion Andrew Cooper
2016-03-02  2:39   ` Doug Goldstein
2016-03-03  8:30   ` Jan Beulich
2016-03-03 14:14     ` [PATCH v3] " Andrew Cooper
2016-03-04 12:24       ` Jan Beulich
2016-03-04 12:28         ` Jan Beulich
2016-03-04 12:50           ` Andrew Cooper [this message]
2016-03-04 13:05             ` Jan Beulich
2016-03-04 16:07               ` Ian Jackson
2016-03-07 15:13                 ` [PATCH v4] " Andrew Cooper
2016-03-01 18:57 ` [PATCH 4/4] hvmloader: Use xen/errno.h rather than the host systems errno.h Andrew Cooper
2016-03-02 12:53   ` Doug Goldstein
2016-03-03 11:35   ` Wei Liu
2016-03-02  2:37 ` [PATCH 1/4] xen/errno: Introduce EISDIR/EROFS/ENOTEMPTY to the ABI Doug Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D98490.3050602@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=cardoe@cardoe.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.