# HG changeset patch # User Roger Pau Monne <roger.pau@entel.upc.edu> # Date 1323871725 -3600 # Node ID 3bac38f7a427af3eb9f60db08d0c2394bdf416dc # Parent 75eff8e03cb4c2e0361cddf2baf6f7719bc76653 xenpaging: remove _XOPEN_SOURCE The _XOPEN_SOURCE define was breaking the compilation under NetBSD. I''ve removed it becasue it is not necessary. Error message: gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD -MF .xenpaging.o.d -fno-optimize-sibling-calls -I/root/xen-04102011/tools/xenpaging/../../tools/libxc -I/root/xen-04102011/tools/xenpaging/../../tools/include -I/root/xen-04102011/tools/xenpaging/../../tools/xenstore -I/root/xen-04102011/tools/xenpaging/../../tools/include -Werror -Wno-unused -g -c -o xenpaging.o xenpaging.c -I/usr/xen42/include -I/usr/include cc1: warnings being treated as errors xenpaging.c: In function ''xenpaging_init'': xenpaging.c:333: warning: implicit declaration of function ''asprintf'' Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> diff -r 75eff8e03cb4 -r 3bac38f7a427 tools/xenpaging/xenpaging.c --- a/tools/xenpaging/xenpaging.c Wed Dec 14 13:57:52 2011 +0100 +++ b/tools/xenpaging/xenpaging.c Wed Dec 14 15:08:45 2011 +0100 @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define _XOPEN_SOURCE 600 #define _GNU_SOURCE #include <inttypes.h>
Roger Pau Monne writes ("[Xen-devel] [PATCH v2] xenpaging: remove
_XOPEN_SOURCE"):> xenpaging: remove _XOPEN_SOURCE
>
> The _XOPEN_SOURCE define was breaking the compilation under NetBSD.
> I''ve removed it becasue it is not necessary.
I thought we''d decided that _NETBSD_SOURCE should be added ?
Ian.
2011/12/15 Ian Jackson <Ian.Jackson@eu.citrix.com>:> Roger Pau Monne writes ("[Xen-devel] [PATCH v2] xenpaging: remove _XOPEN_SOURCE"): >> xenpaging: remove _XOPEN_SOURCE >> >> The _XOPEN_SOURCE define was breaking the compilation under NetBSD. >> I''ve removed it becasue it is not necessary. > > I thought we''d decided that _NETBSD_SOURCE should be added ?Olaf Hering acked the patch with the condition that I add the error message, since you didn''t say anything I through you where fine with that. Should I send the patch with _NETBSD_SOURCE instead?
Roger Pau Monné writes ("Re: [Xen-devel] [PATCH v2] xenpaging: remove
_XOPEN_SOURCE"):> Olaf Hering acked the patch with the condition that I add the error
> message, since you didn''t say anything I through you where fine
with
> that. Should I send the patch with _NETBSD_SOURCE instead?
Did you not see my message, copy below ?
Thanks,
Ian.
From: Ian Jackson <iwj@mariner.uk.xensource.com>
To: Roger Pau Monn <roger.pau@entel.upc.edu>
Cc: Laszlo Ersek <lersek@redhat.com>,
"xen-devel@lists.xensource.com"
<xen-devel@lists.xensource.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [Xen-devel] [PATCH] xenpaging: remove XOPEN_SOURCE
Message-ID: <20199.26338.308105.913566@mariner.uk.xensource.com>
Date: Tue, 13 Dec 2011 14:53:22 +0000
Roger Pau Monn writes ("Re: [Xen-devel] [PATCH] xenpaging: remove
XOPEN_SOURCE"):> 2011/12/13 Laszlo Ersek <lersek@redhat.com>:
> > The stuff made visible by _GNU_SOURCE (with glibc) includes everything
> > _XOPEN_SOURCE makes visible [3]. [4] introduced it because of
asprintf().
>
> If it''s not necessary I think it''s best to remove the
definition, to
> avoid having a lot of useless defines all over the code.
I disagree. The purpose of these kind of macros is purely to allow
systems to claim standards-compliance and absence of namespace
pollution, by default.
The logical conclusion is that these kind of problems should be fixed
by adding more requests for platform-specific features, not removing
them.
In this case that would mean adding:
#define _NETBSD_SOURCE
If the prevalance of these kind of macros is getting irritating they
can easily be moved into a common header file somewhere.
Ian.
--===============7735531843053127155=Content-Type: text/plain;
charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
--===============7735531843053127155==--
2011/12/15 Ian Jackson <Ian.Jackson@eu.citrix.com>:> Roger Pau Monné writes ("Re: [Xen-devel] [PATCH v2] xenpaging: remove _XOPEN_SOURCE"): >> Olaf Hering acked the patch with the condition that I add the error >> message, since you didn't say anything I through you where fine with >> that. Should I send the patch with _NETBSD_SOURCE instead? > > Did you not see my message, copy below ?Sorry I think I got them in the wrong order. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Roger Pau Monné writes ("Re: [Xen-devel] [PATCH v2] xenpaging: remove
_XOPEN_SOURCE"):> 2011/12/15 Ian Jackson <Ian.Jackson@eu.citrix.com>:
> > Roger Pau Monné writes ("Re: [Xen-devel] [PATCH v2] xenpaging:
remove _XOPEN_SOURCE"):
> >> Olaf Hering acked the patch with the condition that I add the
error
> >> message, since you didn''t say anything I through you
where fine with
> >> that. Should I send the patch with _NETBSD_SOURCE instead?
> >
> > Did you not see my message, copy below ?
>
> Sorry I think I got them in the wrong order.
NP. It''s quite possible that my message came after Olaf''s,
anyway.
Ian.
On Thu, Dec 15, Ian Jackson wrote:> Roger Pau Monne writes ("[Xen-devel] [PATCH v2] xenpaging: remove _XOPEN_SOURCE"): > > xenpaging: remove _XOPEN_SOURCE > > > > The _XOPEN_SOURCE define was breaking the compilation under NetBSD. > > I''ve removed it becasue it is not necessary. > > I thought we''d decided that _NETBSD_SOURCE should be added ?The initial patch which added _XOPEN_SOURCE should have a reasonable description which includes the error message, and it should have been _GNU_SOURCE instead of _XOPEN_SOURCE in the first place. Please remove _XOPEN_SOURCE. Olaf
2011/12/15 Olaf Hering <olaf@aepfle.de>:> On Thu, Dec 15, Ian Jackson wrote: > >> Roger Pau Monne writes ("[Xen-devel] [PATCH v2] xenpaging: remove _XOPEN_SOURCE"): >> > xenpaging: remove _XOPEN_SOURCE >> > >> > The _XOPEN_SOURCE define was breaking the compilation under NetBSD. >> > I''ve removed it becasue it is not necessary. >> >> I thought we''d decided that _NETBSD_SOURCE should be added ? > > The initial patch which added _XOPEN_SOURCE should have a reasonable > description which includes the error message, and it should have been > _GNU_SOURCE instead of _XOPEN_SOURCE in the first place. > > Please remove _XOPEN_SOURCE.Both patches are on the list, now it''s up to Ian Jackson to decide which one to apply. Roger.