* [PATCH v2] xenpaging: remove _XOPEN_SOURCE
@ 2011-12-14 14:08 Roger Pau Monne
2011-12-15 17:28 ` Ian Jackson
0 siblings, 1 reply; 8+ messages in thread
From: Roger Pau Monne @ 2011-12-14 14:08 UTC (permalink / raw)
To: xen-devel
# 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>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] xenpaging: remove _XOPEN_SOURCE
2011-12-14 14:08 [PATCH v2] xenpaging: remove _XOPEN_SOURCE Roger Pau Monne
@ 2011-12-15 17:28 ` Ian Jackson
2011-12-15 17:34 ` Roger Pau Monné
2011-12-15 18:51 ` Olaf Hering
0 siblings, 2 replies; 8+ messages in thread
From: Ian Jackson @ 2011-12-15 17:28 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel
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.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2] xenpaging: remove _XOPEN_SOURCE
2011-12-15 17:28 ` Ian Jackson
@ 2011-12-15 17:34 ` Roger Pau Monné
2011-12-15 17:36 ` Ian Jackson
2011-12-15 18:51 ` Olaf Hering
1 sibling, 1 reply; 8+ messages in thread
From: Roger Pau Monné @ 2011-12-15 17:34 UTC (permalink / raw)
To: Ian Jackson; +Cc: Olaf Hering, xen-devel
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?
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2] xenpaging: remove _XOPEN_SOURCE
2011-12-15 17:34 ` Roger Pau Monné
@ 2011-12-15 17:36 ` Ian Jackson
2011-12-15 17:40 ` Roger Pau Monné
0 siblings, 1 reply; 8+ messages in thread
From: Ian Jackson @ 2011-12-15 17:36 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: Olaf Hering, xen-devel@lists.xensource.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1673 bytes --]
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.
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2] xenpaging: remove _XOPEN_SOURCE
2011-12-15 17:36 ` Ian Jackson
@ 2011-12-15 17:40 ` Roger Pau Monné
2011-12-15 17:41 ` Ian Jackson
0 siblings, 1 reply; 8+ messages in thread
From: Roger Pau Monné @ 2011-12-15 17:40 UTC (permalink / raw)
To: Ian Jackson; +Cc: Olaf Hering, xen-devel@lists.xensource.com
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2] xenpaging: remove _XOPEN_SOURCE
2011-12-15 17:40 ` Roger Pau Monné
@ 2011-12-15 17:41 ` Ian Jackson
0 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2011-12-15 17:41 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: Olaf Hering, xen-devel@lists.xensource.com
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] xenpaging: remove _XOPEN_SOURCE
2011-12-15 17:28 ` Ian Jackson
2011-12-15 17:34 ` Roger Pau Monné
@ 2011-12-15 18:51 ` Olaf Hering
2011-12-16 8:50 ` Roger Pau Monné
1 sibling, 1 reply; 8+ messages in thread
From: Olaf Hering @ 2011-12-15 18:51 UTC (permalink / raw)
To: Ian Jackson; +Cc: Roger Pau Monne, xen-devel
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2] xenpaging: remove _XOPEN_SOURCE
2011-12-15 18:51 ` Olaf Hering
@ 2011-12-16 8:50 ` Roger Pau Monné
0 siblings, 0 replies; 8+ messages in thread
From: Roger Pau Monné @ 2011-12-16 8:50 UTC (permalink / raw)
To: Olaf Hering; +Cc: xen-devel, Ian Jackson
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-12-16 8:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 14:08 [PATCH v2] xenpaging: remove _XOPEN_SOURCE Roger Pau Monne
2011-12-15 17:28 ` Ian Jackson
2011-12-15 17:34 ` Roger Pau Monné
2011-12-15 17:36 ` Ian Jackson
2011-12-15 17:40 ` Roger Pau Monné
2011-12-15 17:41 ` Ian Jackson
2011-12-15 18:51 ` Olaf Hering
2011-12-16 8:50 ` Roger Pau Monné
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.