Make sure that __int64 is getting prefix by __GCC_EXTENSION to avoid warnings for x64 gcc and the use of long long type in ISO-C/C++.

svn path=/branches/header-work/; revision=45695
This commit is contained in:
Kai Tietz 2010-02-27 14:01:48 +00:00
parent 9d6a449a8f
commit 8a7f4a428a
2 changed files with 17 additions and 13 deletions

View file

@ -13,6 +13,14 @@
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
#ifdef __GNUC__
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif
typedef unsigned long POINTER_64; // FIXME! HACK!!! typedef unsigned long POINTER_64; // FIXME! HACK!!!
@ -87,14 +95,10 @@ typedef unsigned long POINTER_64; // FIXME! HACK!!!
// //
#ifndef NONAMELESSUNION #ifndef NONAMELESSUNION
#ifdef __GNUC__ #ifdef __GNUC__
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined (__cplusplus)
#define _ANONYMOUS_UNION __extension__ #define _ANONYMOUS_UNION __GNU_EXTENSION
#define _ANONYMOUS_STRUCT __extension__ #define _ANONYMOUS_STRUCT __GNU_EXTENSION
#else #endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined (__cplusplus) */
#if defined(__cplusplus)
#define _ANONYMOUS_UNION __extension__
#endif /* __cplusplus */
#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
#elif defined(__WATCOMC__) || defined(_MSC_VER) #elif defined(__WATCOMC__) || defined(_MSC_VER)
#define _ANONYMOUS_UNION #define _ANONYMOUS_UNION
#define _ANONYMOUS_STRUCT #define _ANONYMOUS_STRUCT
@ -332,7 +336,7 @@ typedef struct _QUAD
{ {
_ANONYMOUS_UNION union _ANONYMOUS_UNION union
{ {
__int64 UseThisFieldToCopy; __GNU_EXTENSION __int64 UseThisFieldToCopy;
double DoNotUseThisField; double DoNotUseThisField;
}; };
} QUAD, *PQUAD, UQUAD, *PUQUAD; } QUAD, *PQUAD, UQUAD, *PUQUAD;
@ -374,8 +378,8 @@ typedef LONG HRESULT;
// //
// 64-bit types // 64-bit types
// //
typedef __int64 LONGLONG, *PLONGLONG; __GNU_EXTENSION typedef __int64 LONGLONG, *PLONGLONG;
typedef unsigned __int64 ULONGLONG, *PULONGLONG; __GNU_EXTENSION typedef unsigned __int64 ULONGLONG, *PULONGLONG;
typedef ULONGLONG DWORDLONG, *PDWORDLONG; typedef ULONGLONG DWORDLONG, *PDWORDLONG;
// //

View file

@ -46,8 +46,8 @@ typedef enum
#endif #endif
typedef PHYSICAL_ADDRESS STREAM_PHYSICAL_ADDRESS, *PSTREAM_PHYSICAL_ADDRESS; typedef PHYSICAL_ADDRESS STREAM_PHYSICAL_ADDRESS, *PSTREAM_PHYSICAL_ADDRESS;
typedef unsigned __int64 STREAM_SYSTEM_TIME, *PSTREAM_SYSTEM_TIME; __GNU_EXTENSION typedef unsigned __int64 STREAM_SYSTEM_TIME, *PSTREAM_SYSTEM_TIME;
typedef unsigned __int64 STREAM_TIMESTAMP, *PSTREAM_TIMESTAMP; __GNU_EXTENSION typedef unsigned __int64 STREAM_TIMESTAMP, *PSTREAM_TIMESTAMP;
typedef enum typedef enum
{ {