ia64/xen-unstable

changeset 17312:f5e6cccfdda5

Prefix unnamed union structure fields with __extension__ to make it
work properly even in e.g. C99 standard mode.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 25 18:02:00 2008 +0000 (2008-03-25)
parents 8954bf1b5cab
children edfb58ca4d96 d97e61001d81
files tools/include/xen-foreign/mkheader.py xen/include/public/arch-ia64.h xen/include/public/arch-x86/xen-x86_64.h
line diff
     1.1 --- a/tools/include/xen-foreign/mkheader.py	Tue Mar 25 17:56:49 2008 +0000
     1.2 +++ b/tools/include/xen-foreign/mkheader.py	Tue Mar 25 18:02:00 2008 +0000
     1.3 @@ -38,7 +38,7 @@ inttypes["x86_64"] = {
     1.4  };
     1.5  header["x86_64"] = """
     1.6  #ifdef __GNUC__
     1.7 -# define __DECL_REG(name) union { uint64_t r ## name, e ## name; }
     1.8 +# define __DECL_REG(name) __extension__ union { uint64_t r ## name, e ## name; }
     1.9  # define __align8__ __attribute__((aligned (8)))
    1.10  #else
    1.11  # define __DECL_REG(name) uint64_t r ## name
     2.1 --- a/xen/include/public/arch-ia64.h	Tue Mar 25 17:56:49 2008 +0000
     2.2 +++ b/xen/include/public/arch-ia64.h	Tue Mar 25 18:02:00 2008 +0000
     2.3 @@ -64,6 +64,8 @@ typedef unsigned long xen_pfn_t;
     2.4  
     2.5  #ifndef __ASSEMBLY__
     2.6  
     2.7 +#define __anonymous_union __extension__ union
     2.8 +
     2.9  typedef unsigned long xen_ulong_t;
    2.10  
    2.11  #ifdef __XEN_TOOLS__
    2.12 @@ -165,11 +167,11 @@ struct mapped_regs {
    2.13      unsigned long  reserved1[29];
    2.14      unsigned long  vhpi;
    2.15      unsigned long  reserved2[95];
    2.16 -    union {
    2.17 +    __anonymous_union {
    2.18          unsigned long  vgr[16];
    2.19          unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
    2.20      };
    2.21 -    union {
    2.22 +    __anonymous_union {
    2.23          unsigned long  vbgr[16];
    2.24          unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
    2.25      };
    2.26 @@ -180,7 +182,7 @@ struct mapped_regs {
    2.27      unsigned long  vpsr;
    2.28      unsigned long  vpr;
    2.29      unsigned long  reserved4[76];
    2.30 -    union {
    2.31 +    __anonymous_union {
    2.32          unsigned long  vcr[128];
    2.33          struct {
    2.34              unsigned long dcr;  // CR0
    2.35 @@ -214,7 +216,7 @@ struct mapped_regs {
    2.36              unsigned long rsv6[46];
    2.37          };
    2.38      };
    2.39 -    union {
    2.40 +    __anonymous_union {
    2.41          unsigned long  reserved5[128];
    2.42          struct {
    2.43              unsigned long precover_ifs;
    2.44 @@ -608,7 +610,7 @@ struct xen_ia64_boot_param {
    2.45  struct xen_ia64_opt_feature {
    2.46  	unsigned long cmd;		/* Which feature */
    2.47  	unsigned char on;		/* Switch feature on/off */
    2.48 -	union {
    2.49 +	__anonymous_union {
    2.50  		struct {
    2.51  				/* The page protection bit mask of the pte.
    2.52  			 	 * This will be or'ed with the pte. */
     3.1 --- a/xen/include/public/arch-x86/xen-x86_64.h	Tue Mar 25 17:56:49 2008 +0000
     3.2 +++ b/xen/include/public/arch-x86/xen-x86_64.h	Tue Mar 25 18:02:00 2008 +0000
     3.3 @@ -142,7 +142,7 @@ struct iret_context {
     3.4  
     3.5  #ifdef __GNUC__
     3.6  /* Anonymous union includes both 32- and 64-bit names (e.g., eax/rax). */
     3.7 -#define __DECL_REG(name) union { \
     3.8 +#define __DECL_REG(name) __extension__ union { \
     3.9      uint64_t r ## name, e ## name; \
    3.10      uint32_t _e ## name; \
    3.11  }