aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-03-31 17:43:18 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-03-31 17:43:18 +0100
commitefeb49b8138d9e5d97fda8ded0ce6b0dc21092ff (patch)
treea8a42db1ce90de1601f9f1ea82f44749e8a17ee0 /tools
parent0aa49ebc5e3f9061f5e9d2d94ec29a994f663493 (diff)
downloadxen-efeb49b8138d9e5d97fda8ded0ce6b0dc21092ff.tar.gz
xen-efeb49b8138d9e5d97fda8ded0ce6b0dc21092ff.tar.bz2
xen-efeb49b8138d9e5d97fda8ded0ce6b0dc21092ff.zip
Revert all usages of gcc's __extension__ keyword, and instead assert
that our headers are not built with __GNUC__ and __STRICT_ANSI__. __extension__ had some weird (and buggy) behaviours when nested which make it a risky proposition for general usage in our header files. Better to disallow -ansi, -std=c99, and similar gcc options when building against Xen headers. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/include/xen-foreign/mkchecker.py3
-rw-r--r--tools/include/xen-foreign/mkheader.py4
-rw-r--r--tools/python/xen/xm/messages/xen-xm.pot7
3 files changed, 8 insertions, 6 deletions
diff --git a/tools/include/xen-foreign/mkchecker.py b/tools/include/xen-foreign/mkchecker.py
index 264bf799b5..66c17b19e9 100644
--- a/tools/include/xen-foreign/mkchecker.py
+++ b/tools/include/xen-foreign/mkchecker.py
@@ -19,9 +19,6 @@ f.write('''
#include <stdlib.h>
#include <stddef.h>
#include <inttypes.h>
-
-#define __anonymous_struct __extension__ struct
-#define __anonymous_union __extension__ union
''');
for a in archs:
diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py
index 17873e4842..8b249e3dfc 100644
--- a/tools/include/xen-foreign/mkheader.py
+++ b/tools/include/xen-foreign/mkheader.py
@@ -37,8 +37,8 @@ inttypes["x86_64"] = {
"xen_pfn_t" : "__align8__ uint64_t",
};
header["x86_64"] = """
-#ifdef __GNUC__
-# define __DECL_REG(name) __anonymous_union { uint64_t r ## name, e ## name; }
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+# define __DECL_REG(name) union { uint64_t r ## name, e ## name; }
# define __align8__ __attribute__((aligned (8)))
#else
# define __DECL_REG(name) uint64_t r ## name
diff --git a/tools/python/xen/xm/messages/xen-xm.pot b/tools/python/xen/xm/messages/xen-xm.pot
index 0a89ea9b27..a600a69f0d 100644
--- a/tools/python/xen/xm/messages/xen-xm.pot
+++ b/tools/python/xen/xm/messages/xen-xm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-04-05 14:17-0400\n"
+"POT-Creation-Date: 2008-03-31 17:40+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -61,3 +61,8 @@ msgid ""
"The network you specified already has a PIF attached to it, and so another "
"one may not be attached."
msgstr ""
+
+#: xen/xm/XenAPI.py:67
+#, python-format
+msgid "%(2)s"
+msgstr ""