Make sure that unnamed union/struct are prefix by __GCC_EXTENSION.

svn path=/branches/header-work/; revision=45694
This commit is contained in:
Kai Tietz 2010-02-27 13:53:12 +00:00
parent 9c22184e3c
commit 9d6a449a8f
18 changed files with 231 additions and 71 deletions

View file

@ -2,6 +2,15 @@
extern "C" { extern "C" {
#endif #endif
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#define STDMETHODCALLTYPE __stdcall #define STDMETHODCALLTYPE __stdcall
typedef GUID *PGUID; typedef GUID *PGUID;
@ -30,7 +39,7 @@ typedef struct _BDA_FILTER_TEMPLATE
typedef struct _KSM_PIN typedef struct _KSM_PIN
{ {
KSMETHOD Method; KSMETHOD Method;
union __GNU_EXTENSION union
{ {
ULONG PinId; ULONG PinId;
ULONG PinType; ULONG PinType;

View file

@ -22,6 +22,15 @@
#ifndef _D3DHAL_H_ #ifndef _D3DHAL_H_
#define _D3DHAL_H_ #define _D3DHAL_H_
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -787,7 +796,7 @@ typedef struct _DD_GETD3DQUERYCOUNTDATA
typedef struct _DD_GETD3DQUERYDATA typedef struct _DD_GETD3DQUERYDATA
{ {
DD_GETDRIVERINFO2DATA gdi2; DD_GETDRIVERINFO2DATA gdi2;
union __GNU_EXTENSION union
{ {
DWORD dwQueryIndex; DWORD dwQueryIndex;
D3DQUERYTYPE QueryType; D3DQUERYTYPE QueryType;

View file

@ -9,6 +9,15 @@
#include <d3dtypes.h> #include <d3dtypes.h>
#include <d3dcaps.h> #include <d3dcaps.h>
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -22,17 +31,17 @@ DEFINE_GUID(GUID_DDStereoMode, 0xF828169C, 0xA8E8, 0x11D2, 0xA
typedef struct _D3DNTHAL_CONTEXTCREATEDATA typedef struct _D3DNTHAL_CONTEXTCREATEDATA
{ {
union __GNU_EXTENSION union
{ {
PDD_DIRECTDRAW_GLOBAL lpDDGbl; PDD_DIRECTDRAW_GLOBAL lpDDGbl;
PDD_DIRECTDRAW_LOCAL lpDDLcl; PDD_DIRECTDRAW_LOCAL lpDDLcl;
}; };
union __GNU_EXTENSION union
{ {
PDD_SURFACE_LOCAL lpDDS; PDD_SURFACE_LOCAL lpDDS;
PDD_SURFACE_LOCAL lpDDSLcl; PDD_SURFACE_LOCAL lpDDSLcl;
}; };
union __GNU_EXTENSION union
{ {
PDD_SURFACE_LOCAL lpDDSZ; PDD_SURFACE_LOCAL lpDDSZ;
PDD_SURFACE_LOCAL lpDDSZLcl; PDD_SURFACE_LOCAL lpDDSZLcl;
@ -223,7 +232,7 @@ typedef struct _D3DNTHAL_DRAWPRIMITIVES2DATA
PDD_SURFACE_LOCAL lpDDCommands; PDD_SURFACE_LOCAL lpDDCommands;
DWORD dwCommandOffset; DWORD dwCommandOffset;
DWORD dwCommandLength; DWORD dwCommandLength;
union __GNU_EXTENSION union
{ {
PDD_SURFACE_LOCAL lpDDVertex; PDD_SURFACE_LOCAL lpDDVertex;
LPVOID lpVertices; LPVOID lpVertices;
@ -233,7 +242,7 @@ typedef struct _D3DNTHAL_DRAWPRIMITIVES2DATA
DWORD dwReqVertexBufSize; DWORD dwReqVertexBufSize;
DWORD dwReqCommandBufSize; DWORD dwReqCommandBufSize;
LPDWORD lpdwRStates; LPDWORD lpdwRStates;
union __GNU_EXTENSION union
{ {
DWORD dwVertexSize; DWORD dwVertexSize;
HRESULT ddrval; HRESULT ddrval;

View file

@ -21,6 +21,14 @@
#ifndef __DDKMAPI_INCLUDED__ #ifndef __DDKMAPI_INCLUDED__
#define __DDKMAPI_INCLUDED__ #define __DDKMAPI_INCLUDED__
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#if defined(_DXAPI_) #if defined(_DXAPI_)
#define DXAPI #define DXAPI
@ -219,17 +227,17 @@ typedef struct _DDLOCKOUT
DWORD dwFormatFlags; DWORD dwFormatFlags;
DWORD dwFormatFourCC; DWORD dwFormatFourCC;
DWORD dwFormatBitCount; DWORD dwFormatBitCount;
union __GNU_EXTENSION union
{ {
DWORD dwRBitMask; DWORD dwRBitMask;
DWORD dwYBitMask; DWORD dwYBitMask;
}; };
union __GNU_EXTENSION union
{ {
DWORD dwGBitMask; DWORD dwGBitMask;
DWORD dwUBitMask; DWORD dwUBitMask;
}; };
union __GNU_EXTENSION union
{ {
DWORD dwBBitMask; DWORD dwBBitMask;
DWORD dwVBitMask; DWORD dwVBitMask;

View file

@ -22,6 +22,15 @@
#ifndef __DDRAWI_INCLUDED__ #ifndef __DDRAWI_INCLUDED__
#define __DDRAWI_INCLUDED__ #define __DDRAWI_INCLUDED__
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -203,13 +212,13 @@ typedef struct _DDHALMODEINFO {
typedef struct _VIDMEM { typedef struct _VIDMEM {
DWORD dwFlags; DWORD dwFlags;
FLATPTR fpStart; FLATPTR fpStart;
union { __GNU_EXTENSION union {
FLATPTR fpEnd; FLATPTR fpEnd;
DWORD dwWidth; DWORD dwWidth;
}; };
DDSCAPS ddsCaps; DDSCAPS ddsCaps;
DDSCAPS ddsCapsAlt; DDSCAPS ddsCapsAlt;
union { __GNU_EXTENSION union {
LPVMEMHEAP lpHeap; LPVMEMHEAP lpHeap;
DWORD dwHeight; DWORD dwHeight;
}; };
@ -1404,21 +1413,21 @@ typedef struct _DDRAWI_DDRAWSURFACE_INT {
typedef struct _DDRAWI_DDRAWSURFACE_GBL { typedef struct _DDRAWI_DDRAWSURFACE_GBL {
DWORD dwRefCnt; DWORD dwRefCnt;
DWORD dwGlobalFlags; DWORD dwGlobalFlags;
union { __GNU_EXTENSION union {
LPACCESSRECTLIST lpRectList; LPACCESSRECTLIST lpRectList;
DWORD dwBlockSizeY; DWORD dwBlockSizeY;
LONG lSlicePitch; LONG lSlicePitch;
}; };
union { __GNU_EXTENSION union {
LPVMEMHEAP lpVidMemHeap; LPVMEMHEAP lpVidMemHeap;
DWORD dwBlockSizeX; DWORD dwBlockSizeX;
}; };
union { __GNU_EXTENSION union {
LPDDRAWI_DIRECTDRAW_GBL lpDD; LPDDRAWI_DIRECTDRAW_GBL lpDD;
LPVOID lpDDHandle; LPVOID lpDDHandle;
}; };
FLATPTR fpVidMem; FLATPTR fpVidMem;
union { __GNU_EXTENSION union {
LONG lPitch; LONG lPitch;
DWORD dwLinearSize; DWORD dwLinearSize;
}; };
@ -1454,7 +1463,7 @@ typedef struct _DDRAWI_DDRAWSURFACE_GBL {
typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE { typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE {
DWORD dwSize; DWORD dwSize;
union { __GNU_EXTENSION union {
DWORD dwPhysicalPageTable; DWORD dwPhysicalPageTable;
FLATPTR fpPhysicalVidMem; FLATPTR fpPhysicalVidMem;
}; };
@ -1551,12 +1560,12 @@ typedef struct _DDRAWI_DDRAWSURFACE_LCL {
DWORD dwProcessId; DWORD dwProcessId;
DWORD dwFlags; DWORD dwFlags;
DDSCAPS ddsCaps; DDSCAPS ddsCaps;
union __GNU_EXTENSION union
{ {
LPDDRAWI_DDRAWPALETTE_INT lpDDPalette; LPDDRAWI_DDRAWPALETTE_INT lpDDPalette;
LPDDRAWI_DDRAWPALETTE_INT lp16DDPalette; LPDDRAWI_DDRAWPALETTE_INT lp16DDPalette;
}; };
union __GNU_EXTENSION union
{ {
LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper; LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper;
LPDDRAWI_DDRAWCLIPPER_INT lp16DDClipper; LPDDRAWI_DDRAWCLIPPER_INT lp16DDClipper;
@ -1628,7 +1637,7 @@ typedef struct _DDRAWI_DDRAWPALETTE_GBL {
LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl; LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
DWORD dwProcessId; DWORD dwProcessId;
LPPALETTEENTRY lpColorTable; LPPALETTEENTRY lpColorTable;
union { __GNU_EXTENSION union {
ULONG_PTR dwReserved1; ULONG_PTR dwReserved1;
HPALETTE hHELGDIPalette; HPALETTE hHELGDIPalette;
}; };
@ -1762,7 +1771,7 @@ typedef struct _DDMCBUFFERINFO
typedef struct _DDHAL_GETDRIVERSTATEDATA { typedef struct _DDHAL_GETDRIVERSTATEDATA {
DWORD dwFlags; DWORD dwFlags;
union __GNU_EXTENSION union
{ {
ULONG_PTR dwhContext; ULONG_PTR dwhContext;
}; };

View file

@ -5,6 +5,14 @@
#ifndef __DD_INCLUDED__ #ifndef __DD_INCLUDED__
#define __DD_INCLUDED__ #define __DD_INCLUDED__
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
DEFINE_GUID( GUID_MiscellaneousCallbacks, 0xEFD60CC0, 0x49e7, 0x11d0, 0x88, 0x9d, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x6a); DEFINE_GUID( GUID_MiscellaneousCallbacks, 0xEFD60CC0, 0x49e7, 0x11d0, 0x88, 0x9d, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x6a);
DEFINE_GUID( GUID_Miscellaneous2Callbacks, 0x406B2F00, 0x3E5A, 0x11D1, 0xB6, 0x40, 0x00, 0xAA, 0x00, 0xA1, 0xF9, 0x6A); DEFINE_GUID( GUID_Miscellaneous2Callbacks, 0x406B2F00, 0x3E5A, 0x11D1, 0xB6, 0x40, 0x00, 0xAA, 0x00, 0xA1, 0xF9, 0x6A);
@ -81,14 +89,14 @@ typedef struct _VIDEOMEMORY
{ {
DWORD dwFlags; DWORD dwFlags;
FLATPTR fpStart; FLATPTR fpStart;
union __GNU_EXTENSION union
{ {
FLATPTR fpEnd; FLATPTR fpEnd;
DWORD dwWidth; DWORD dwWidth;
}; };
DDSCAPS ddsCaps; DDSCAPS ddsCaps;
DDSCAPS ddsCapsAlt; DDSCAPS ddsCapsAlt;
union __GNU_EXTENSION union
{ {
struct _VMEMHEAP *lpHeap; struct _VMEMHEAP *lpHeap;
DWORD dwHeight; DWORD dwHeight;
@ -128,13 +136,13 @@ typedef struct _DD_DIRECTDRAW_LOCAL
typedef struct _DD_SURFACE_GLOBAL typedef struct _DD_SURFACE_GLOBAL
{ {
union __GNU_EXTENSION union
{ {
DWORD dwBlockSizeY; DWORD dwBlockSizeY;
LONG lSlicePitch; LONG lSlicePitch;
}; };
union __GNU_EXTENSION union
{ {
PVIDEOMEMORY lpVidMemHeap; PVIDEOMEMORY lpVidMemHeap;
DWORD dwBlockSizeX; DWORD dwBlockSizeX;
@ -142,7 +150,7 @@ typedef struct _DD_SURFACE_GLOBAL
}; };
FLATPTR fpVidMem; FLATPTR fpVidMem;
union __GNU_EXTENSION union
{ {
LONG lPitch; LONG lPitch;
DWORD dwLinearSize; DWORD dwLinearSize;
@ -174,12 +182,12 @@ typedef struct _DD_SURFACE_LOCAL
DWORD dwFlags; DWORD dwFlags;
DDSCAPS ddsCaps; DDSCAPS ddsCaps;
ULONG_PTR dwReserved1; ULONG_PTR dwReserved1;
union __GNU_EXTENSION union
{ {
DDCOLORKEY ddckCKSrcOverlay; DDCOLORKEY ddckCKSrcOverlay;
DDCOLORKEY ddckCKSrcBlt; DDCOLORKEY ddckCKSrcBlt;
}; };
union __GNU_EXTENSION union
{ {
DDCOLORKEY ddckCKDestOverlay; DDCOLORKEY ddckCKDestOverlay;
DDCOLORKEY ddckCKDestBlt; DDCOLORKEY ddckCKDestBlt;
@ -591,7 +599,7 @@ typedef DWORD (WINAPI *PDD_CREATESURFACEEX)(PDD_CREATESURFACEEXDATA);
typedef struct _DD_GETDRIVERSTATEDATA typedef struct _DD_GETDRIVERSTATEDATA
{ {
DWORD dwFlags; DWORD dwFlags;
union __GNU_EXTENSION union
{ {
PDD_DIRECTDRAW_GLOBAL lpDD; PDD_DIRECTDRAW_GLOBAL lpDD;
DWORD_PTR dwhContext; DWORD_PTR dwhContext;

View file

@ -12,6 +12,15 @@
#ifndef __DMEMMGR_INCLUDED__ #ifndef __DMEMMGR_INCLUDED__
#define __DMEMMGR_INCLUDED__ #define __DMEMMGR_INCLUDED__
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -70,7 +79,7 @@ typedef struct _VMEMR
typedef struct _SURFACEALIGNMENT typedef struct _SURFACEALIGNMENT
{ {
union __GNU_EXTENSION union
{ {
struct struct
{ {

View file

@ -23,6 +23,15 @@
#ifndef __IDE_H #ifndef __IDE_H
#define __IDE_H #define __IDE_H
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -104,7 +113,7 @@ typedef struct _EXTENDED_IDENTIFY_DATA {
USHORT UnformattedBytesPerTrack; /* 08 */ USHORT UnformattedBytesPerTrack; /* 08 */
USHORT UnformattedBytesPerSector; /* 10 */ USHORT UnformattedBytesPerSector; /* 10 */
USHORT NumSectorsPerTrack; /* 12 */ USHORT NumSectorsPerTrack; /* 12 */
union __GNU_EXTENSION union
{ {
USHORT VendorUnique1[3]; /* 14 */ USHORT VendorUnique1[3]; /* 14 */
struct struct

View file

@ -22,6 +22,15 @@
#ifndef __MINITAPE_H #ifndef __MINITAPE_H
#define __MINITAPE_H #define __MINITAPE_H
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -77,9 +86,9 @@ typedef struct _INQUIRYDATA {
UCHAR DeviceTypeQualifier : 3; UCHAR DeviceTypeQualifier : 3;
UCHAR DeviceTypeModifier : 7; UCHAR DeviceTypeModifier : 7;
UCHAR RemovableMedia : 1; UCHAR RemovableMedia : 1;
union { __GNU_EXTENSION union {
UCHAR Versions; UCHAR Versions;
struct { __GNU_EXTENSION struct {
UCHAR ANSIVersion : 3; UCHAR ANSIVersion : 3;
UCHAR ECMAVersion : 3; UCHAR ECMAVersion : 3;
UCHAR ISOVersion : 2; UCHAR ISOVersion : 2;

View file

@ -32,6 +32,15 @@
#ifndef __NDIS_H #ifndef __NDIS_H
#define __NDIS_H #define __NDIS_H
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#include "ntddk.h" #include "ntddk.h"
#include "ntddndis.h" #include "ntddndis.h"
#include "netpnp.h" #include "netpnp.h"
@ -238,8 +247,8 @@ typedef union _NDIS_RW_LOCK_REFCOUNT {
} NDIS_RW_LOCK_REFCOUNT; } NDIS_RW_LOCK_REFCOUNT;
typedef struct _NDIS_RW_LOCK { typedef struct _NDIS_RW_LOCK {
union { __GNU_EXTENSION union {
struct { __GNU_EXTENSION struct {
KSPIN_LOCK SpinLock; KSPIN_LOCK SpinLock;
PVOID Context; PVOID Context;
}; };
@ -380,16 +389,16 @@ typedef struct _NDIS_PACKET_PRIVATE {
typedef struct _NDIS_PACKET { typedef struct _NDIS_PACKET {
NDIS_PACKET_PRIVATE Private; NDIS_PACKET_PRIVATE Private;
union { __GNU_EXTENSION union {
struct { __GNU_EXTENSION struct {
UCHAR MiniportReserved[2 * sizeof(PVOID)]; UCHAR MiniportReserved[2 * sizeof(PVOID)];
UCHAR WrapperReserved[2 * sizeof(PVOID)]; UCHAR WrapperReserved[2 * sizeof(PVOID)];
}; };
struct { __GNU_EXTENSION struct {
UCHAR MiniportReservedEx[3 * sizeof(PVOID)]; UCHAR MiniportReservedEx[3 * sizeof(PVOID)];
UCHAR WrapperReservedEx[sizeof(PVOID)]; UCHAR WrapperReservedEx[sizeof(PVOID)];
}; };
struct { __GNU_EXTENSION struct {
UCHAR MacReserved[4 * sizeof(PVOID)]; UCHAR MacReserved[4 * sizeof(PVOID)];
}; };
}; };
@ -474,7 +483,7 @@ typedef struct _NDIS_REQUEST {
} DATA; } DATA;
#if (defined(NDIS50) || defined(NDIS51)) #if (defined(NDIS50) || defined(NDIS51))
UCHAR NdisReserved[9 * sizeof(PVOID)]; UCHAR NdisReserved[9 * sizeof(PVOID)];
union { __GNU_EXTENSION union {
UCHAR CallMgrReserved[2 * sizeof(PVOID)]; UCHAR CallMgrReserved[2 * sizeof(PVOID)];
UCHAR ProtocolReserved[2 * sizeof(PVOID)]; UCHAR ProtocolReserved[2 * sizeof(PVOID)];
}; };

View file

@ -23,6 +23,15 @@
#ifndef __NTDDDISK_H #ifndef __NTDDDISK_H
#define __NTDDDISK_H #define __NTDDDISK_H
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#include "ntddstor.h" #include "ntddstor.h"
#ifdef __cplusplus #ifdef __cplusplus
@ -394,7 +403,7 @@ typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
typedef struct _DRIVE_LAYOUT_INFORMATION_EX { typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
ULONG PartitionStyle; ULONG PartitionStyle;
ULONG PartitionCount; ULONG PartitionCount;
union { __GNU_EXTENSION union {
DRIVE_LAYOUT_INFORMATION_MBR Mbr; DRIVE_LAYOUT_INFORMATION_MBR Mbr;
DRIVE_LAYOUT_INFORMATION_GPT Gpt; DRIVE_LAYOUT_INFORMATION_GPT Gpt;
}; };

View file

@ -24,6 +24,15 @@
#define _NTIFS_ #define _NTIFS_
#define _GNU_NTIFS_ #define _GNU_NTIFS_
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#define NTKERNELAPI DECLSPEC_IMPORT #define NTKERNELAPI DECLSPEC_IMPORT
#include <ntddk.h> #include <ntddk.h>
@ -962,7 +971,7 @@ typedef struct _REPARSE_DATA_BUFFER {
ULONG ReparseTag; ULONG ReparseTag;
USHORT ReparseDataLength; USHORT ReparseDataLength;
USHORT Reserved; USHORT Reserved;
union { __GNU_EXTENSION union {
struct { struct {
USHORT SubstituteNameOffset; USHORT SubstituteNameOffset;
USHORT SubstituteNameLength; USHORT SubstituteNameLength;
@ -1351,7 +1360,7 @@ typedef struct _FILE_OBJECTID_INFORMATION {
LONGLONG FileReference; LONGLONG FileReference;
UCHAR ObjectId[16]; UCHAR ObjectId[16];
_ANONYMOUS_UNION union { _ANONYMOUS_UNION union {
struct { __GNU_EXTENSION struct {
UCHAR BirthVolumeId[16]; UCHAR BirthVolumeId[16];
UCHAR BirthObjectId[16]; UCHAR BirthObjectId[16];
UCHAR DomainId[16]; UCHAR DomainId[16];
@ -1985,13 +1994,13 @@ typedef struct _PORT_MESSAGE
} s2; } s2;
ULONG ZeroInit; ULONG ZeroInit;
} u2; } u2;
union __GNU_EXTENSION union
{ {
LPC_CLIENT_ID ClientId; LPC_CLIENT_ID ClientId;
double DoNotUseThisField; double DoNotUseThisField;
}; };
ULONG MessageId; ULONG MessageId;
union __GNU_EXTENSION union
{ {
LPC_SIZE_T ClientViewSize; LPC_SIZE_T ClientViewSize;
ULONG CallbackId; ULONG CallbackId;

View file

@ -13,6 +13,15 @@
#include <punknown.h> #include <punknown.h>
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
/* =============================================================== /* ===============================================================
INonDelegatingUnknown interface INonDelegatingUnknown interface
*/ */
@ -110,7 +119,7 @@ Unknown_Release(
typedef struct CUnknown typedef struct CUnknown
{ {
union __GNU_EXTENSION union
{ {
IUnknown IUnknown; IUnknown IUnknown;
INonDelegatingUnknown INonDelegatingUnknown; INonDelegatingUnknown INonDelegatingUnknown;

View file

@ -5,6 +5,15 @@
#include <windef.h> #include <windef.h>
#include <ks.h> #include <ks.h>
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#define STREAMAPI __stdcall #define STREAMAPI __stdcall
#define STREAM_SYSTEM_TIME_MASK ((STREAM_SYSTEM_TIME)0x00000001FFFFFFFF) #define STREAM_SYSTEM_TIME_MASK ((STREAM_SYSTEM_TIME)0x00000001FFFFFFFF)
@ -61,7 +70,7 @@ typedef struct _HW_EVENT_DESCRIPTOR
BOOLEAN Enable; BOOLEAN Enable;
PKSEVENT_ENTRY EventEntry; PKSEVENT_ENTRY EventEntry;
PKSEVENTDATA EventData; PKSEVENTDATA EventData;
union __GNU_EXTENSION union
{ {
struct _HW_STREAM_OBJECT * StreamObject; struct _HW_STREAM_OBJECT * StreamObject;
struct _HW_DEVICE_EXTENSION *DeviceExtension; struct _HW_DEVICE_EXTENSION *DeviceExtension;
@ -285,7 +294,7 @@ typedef struct _HW_STREAM_REQUEST_BLOCK
ULONG Flags; ULONG Flags;
PVOID HwInstanceExtension; PVOID HwInstanceExtension;
union __GNU_EXTENSION union
{ {
ULONG NumberOfBytesToTransfer; ULONG NumberOfBytesToTransfer;
ULONG ActualBytesTransferred; ULONG ActualBytesTransferred;
@ -376,10 +385,10 @@ typedef enum _STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE
typedef struct _HW_INITIALIZATION_DATA { typedef struct _HW_INITIALIZATION_DATA {
#if (NTDDI_VERSION >= NTDDI_WINXP) #if (NTDDI_VERSION >= NTDDI_WINXP)
union __GNU_EXTENSION union
{ {
ULONG HwInitializationDataSize; ULONG HwInitializationDataSize;
struct __GNU_EXTENSION struct
{ {
USHORT SizeOfThisPacket; USHORT SizeOfThisPacket;
USHORT StreamClassVersion; USHORT StreamClassVersion;

View file

@ -3,6 +3,15 @@
#ifndef __USB_H__ #ifndef __USB_H__
#define __USB_H__ #define __USB_H__
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __USBDI_H__ #ifdef __USBDI_H__
error error
#endif #endif
@ -323,7 +332,7 @@ struct _URB_ISOCH_TRANSFER
typedef struct _URB typedef struct _URB
{ {
union __GNU_EXTENSION union
{ {
struct _URB_HEADER struct _URB_HEADER
UrbHeader; UrbHeader;

View file

@ -1,6 +1,15 @@
#ifndef __USB200_H__ #ifndef __USB200_H__
#define __USB200_H__ #define __USB200_H__
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#include "usb100.h" #include "usb100.h"
#include <pshpack1.h> #include <pshpack1.h>
@ -37,7 +46,7 @@ typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET
UCHAR bRequest; UCHAR bRequest;
union _wValue union _wValue
{ {
struct __GNU_EXTENSION struct
{ {
UCHAR LowByte; UCHAR LowByte;
UCHAR HiByte; UCHAR HiByte;
@ -46,7 +55,7 @@ typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET
} wValue; } wValue;
union _wIndex union _wIndex
{ {
struct __GNU_EXTENSION struct
{ {
UCHAR LowByte; UCHAR LowByte;
UCHAR HiByte; UCHAR HiByte;

View file

@ -23,6 +23,15 @@
#ifndef __USBDI_H #ifndef __USBDI_H
#define __USBDI_H #define __USBDI_H
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __USB_H #ifdef __USB_H
#error usb.h cannot be included with usbdi.h #error usb.h cannot be included with usbdi.h
#else #else
@ -372,7 +381,7 @@ typedef struct _USBD_VERSION_INFORMATION {
} USBD_VERSION_INFORMATION, *PUSBD_VERSION_INFORMATION; } USBD_VERSION_INFORMATION, *PUSBD_VERSION_INFORMATION;
typedef struct _URB { typedef struct _URB {
union { __GNU_EXTENSION union {
struct _URB_HEADER UrbHeader; struct _URB_HEADER UrbHeader;
struct _URB_SELECT_INTERFACE UrbSelectInterface; struct _URB_SELECT_INTERFACE UrbSelectInterface;
struct _URB_SELECT_CONFIGURATION UrbSelectConfiguration; struct _URB_SELECT_CONFIGURATION UrbSelectConfiguration;

View file

@ -23,6 +23,15 @@
#ifndef __WINDDK_H #ifndef __WINDDK_H
#define __WINDDK_H #define __WINDDK_H
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -556,7 +565,7 @@ typedef struct _KUSER_SHARED_DATA
ULONG SystemCall; ULONG SystemCall;
ULONG SystemCallReturn; ULONG SystemCallReturn;
ULONGLONG SystemCallPad[3]; ULONGLONG SystemCallPad[3];
union { __GNU_EXTENSION union {
volatile KSYSTEM_TIME TickCount; volatile KSYSTEM_TIME TickCount;
volatile ULONG64 TickCountQuad; volatile ULONG64 TickCountQuad;
}; };
@ -569,10 +578,10 @@ typedef struct _KUSER_SHARED_DATA
USHORT UserModeGlobalLogger[8]; USHORT UserModeGlobalLogger[8];
ULONG HeapTracingPid[2]; ULONG HeapTracingPid[2];
ULONG CritSecTracingPid[2]; ULONG CritSecTracingPid[2];
union __GNU_EXTENSION union
{ {
ULONG SharedDataFlags; ULONG SharedDataFlags;
struct __GNU_EXTENSION struct
{ {
ULONG DbgErrorPortPresent:1; ULONG DbgErrorPortPresent:1;
ULONG DbgElevationEnabled:1; ULONG DbgElevationEnabled:1;
@ -1276,9 +1285,9 @@ typedef struct _KGUARDED_MUTEX
PKTHREAD Owner; PKTHREAD Owner;
ULONG Contention; ULONG Contention;
KGATE Gate; KGATE Gate;
union __GNU_EXTENSION union
{ {
struct __GNU_EXTENSION struct
{ {
SHORT KernelApcDisable; SHORT KernelApcDisable;
SHORT SpecialApcDisable; SHORT SpecialApcDisable;
@ -4591,7 +4600,7 @@ typedef struct _NT_TIB32 {
ULONG StackBase; ULONG StackBase;
ULONG StackLimit; ULONG StackLimit;
ULONG SubSystemTib; ULONG SubSystemTib;
union { __GNU_EXTENSION union {
ULONG FiberData; ULONG FiberData;
ULONG Version; ULONG Version;
}; };
@ -4604,7 +4613,7 @@ typedef struct _NT_TIB64 {
ULONG64 StackBase; ULONG64 StackBase;
ULONG64 StackLimit; ULONG64 StackLimit;
ULONG64 SubSystemTib; ULONG64 SubSystemTib;
union { __GNU_EXTENSION union {
ULONG64 FiberData; ULONG64 FiberData;
ULONG Version; ULONG Version;
}; };
@ -4705,7 +4714,7 @@ typedef struct _PROCESS_WS_WATCH_INFORMATION
typedef struct _PROCESS_DEVICEMAP_INFORMATION typedef struct _PROCESS_DEVICEMAP_INFORMATION
{ {
union __GNU_EXTENSION union
{ {
struct struct
{ {
@ -5382,10 +5391,10 @@ extern NTKERNELAPI ULONG_PTR MmUserProbeAddress;
typedef struct _KPCR typedef struct _KPCR
{ {
union __GNU_EXTENSION union
{ {
NT_TIB NtTib; NT_TIB NtTib;
struct __GNU_EXTENSION struct
{ {
union _KGDTENTRY64 *GdtBase; union _KGDTENTRY64 *GdtBase;
struct _KTSS64 *TssBase; struct _KTSS64 *TssBase;