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>
#include <stdlib.h>
#include <stddef.h>
#include <inttypes.h>
-
-#define __anonymous_struct __extension__ struct
-#define __anonymous_union __extension__ union
''');
for a in archs:
"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
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"
"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 ""
*/
#include <xen/types.h>
-#include <public/xen.h>
#include <xen/hvm/save.h>
void arch_hvm_save(struct domain *d, struct hvm_save_header *hdr)
#include <inttypes.h>
#include <xen/xen.h>
-#include <xen/arch-ia64.h>
#include <asm/bundle.h>
#include "xg_private.h"
#include <inttypes.h>
#include <xen/xen.h>
-#include <xen/arch-ia64.h>
#include "xg_private.h"
#include "xc_dom.h"
*
*/
+#include "xen.h"
+
#ifndef __HYPERVISOR_IF_IA64_H__
#define __HYPERVISOR_IF_IA64_H__
union vac {
unsigned long value;
- __anonymous_struct {
+ struct {
int a_int:1;
int a_from_int_cr:1;
int a_to_int_cr:1;
union vdc {
unsigned long value;
- __anonymous_struct {
+ struct {
int d_vmsw:1;
int d_extint:1;
int d_ibr_dbr:1;
unsigned long reserved1[29];
unsigned long vhpi;
unsigned long reserved2[95];
- __anonymous_union {
+ union {
unsigned long vgr[16];
unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
};
- __anonymous_union {
+ union {
unsigned long vbgr[16];
unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
};
unsigned long vpsr;
unsigned long vpr;
unsigned long reserved4[76];
- __anonymous_union {
+ union {
unsigned long vcr[128];
- __anonymous_struct {
+ struct {
unsigned long dcr; // CR0
unsigned long itm;
unsigned long iva;
unsigned long rsv6[46];
};
};
- __anonymous_union {
+ union {
unsigned long reserved5[128];
- __anonymous_struct {
+ struct {
unsigned long precover_ifs;
unsigned long unat; // not sure if this is needed until NaT arch is done
int interrupt_collection_enabled; // virtual psr.ic
union vcpu_ar_regs {
unsigned long ar[128];
- __anonymous_struct {
+ struct {
unsigned long kr[8];
unsigned long rsv1[8];
unsigned long rsc;
union vcpu_cr_regs {
unsigned long cr[128];
- __anonymous_struct {
+ struct {
unsigned long dcr; // CR0
unsigned long itm;
unsigned long iva;
struct xen_ia64_opt_feature {
unsigned long cmd; /* Which feature */
unsigned char on; /* Switch feature on/off */
- __anonymous_union {
- __anonymous_struct {
+ union {
+ struct {
/* The page protection bit mask of the pte.
* This will be or'ed with the pte. */
unsigned long pgprot;
union viosapic_rte
{
uint64_t bits;
- __anonymous_struct {
+ struct {
uint8_t vector;
uint8_t delivery_mode : 3;
* PM timer
*/
struct vacpi_regs {
- __anonymous_union {
- __anonymous_struct {
+ union {
+ struct {
uint32_t pm1a_sts:16;/* PM1a_EVT_BLK.PM1a_STS: status register */
uint32_t pm1a_en:16; /* PM1a_EVT_BLK.PM1a_EN: enable register */
};
* Authors: Hollis Blanchard <hollisb@us.ibm.com>
*/
+#include "xen.h"
+
#ifndef __XEN_PUBLIC_ARCH_PPC_64_H__
#define __XEN_PUBLIC_ARCH_PPC_64_H__
uint64_t tsc;
/* pending event, if any */
- __anonymous_union {
+ union {
uint32_t pending_event;
- __anonymous_struct {
+ struct {
uint8_t pending_vector:8;
uint8_t pending_type:3;
uint8_t pending_error_valid:1;
* Virtual interrupt wires for a single PCI bus.
* Indexed by: device*4 + INTx#.
*/
- __anonymous_union {
+ union {
DECLARE_BITMAP(i, 32*4);
uint64_t pad[2];
};
* Virtual interrupt wires for ISA devices.
* Indexed by ISA IRQ (assumes no ISA-device IRQ sharing).
*/
- __anonymous_union {
+ union {
DECLARE_BITMAP(i, 16);
uint64_t pad[1];
};
/* 32-/64-bit invariability for control interfaces (domctl/sysctl). */
#if defined(__XEN__) || defined(__XEN_TOOLS__)
#undef ___DEFINE_XEN_GUEST_HANDLE
-#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
- typedef struct { type *p; } \
- __guest_handle_ ## name; \
- typedef struct { __anonymous_union { type *p; uint64_aligned_t q; }; } \
+#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef struct { type *p; } \
+ __guest_handle_ ## name; \
+ typedef struct { union { type *p; uint64_aligned_t q; }; } \
__guest_handle_64_ ## name
#undef set_xen_guest_handle
#define set_xen_guest_handle(hnd, val) \
/* Bottom of iret stack frame. */
};
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
/* Anonymous union includes both 32- and 64-bit names (e.g., eax/rax). */
-#define __DECL_REG(name) __anonymous_union { \
- uint64_t r ## name, e ## name; \
- uint32_t _e ## name; \
+#define __DECL_REG(name) union { \
+ uint64_t r ## name, e ## name; \
+ uint32_t _e ## name; \
}
#else
/* Non-gcc sources must always use the proper 64-bit name (e.g., rax). */
* Copyright (c) 2004-2006, K A Fraser
*/
+#include "../xen.h"
+
#ifndef __XEN_PUBLIC_ARCH_X86_XEN_H__
#define __XEN_PUBLIC_ARCH_X86_XEN_H__
unsigned long event_callback_eip;
unsigned long failsafe_callback_eip;
#ifdef __XEN__
- __anonymous_union {
+ union {
unsigned long syscall_callback_eip;
- __anonymous_struct {
+ struct {
unsigned int event_callback_cs; /* compat CS of event cb */
unsigned int failsafe_callback_cs; /* compat CS of failsafe cb */
};
#error "These header files do not support the requested interface version."
#endif
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#error "These headers files use GNU extensions when built with GCC."
+#endif
+
#endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */
#include "xen-compat.h"
-#ifdef __GNUC__
-#define __anonymous_union __extension__ union
-#define __anonymous_struct __extension__ union
-#endif
-
#if defined(__i386__) || defined(__x86_64__)
#include "arch-x86/xen.h"
#elif defined(__ia64__)
#ifndef __XEN_HVM_SAVE_H__
#define __XEN_HVM_SAVE_H__
+#include <public/xen.h>
#include <public/hvm/save.h>
#include <asm/types.h>