Make sure that __int64 is getting prefix by __GCC_EXTENSION to avoid warnings for...
authorKai Tietz <ktietz70@googlemail.com>
Sat, 27 Feb 2010 14:01:48 +0000 (14:01 +0000)
committerKai Tietz <ktietz70@googlemail.com>
Sat, 27 Feb 2010 14:01:48 +0000 (14:01 +0000)
svn path=/branches/header-work/; revision=45695

include/ddk/ntdef.h
include/ddk/strmini.h

index 49772bf..e9e0c68 100644 (file)
 #include <stdarg.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!!!
 
@@ -87,14 +95,10 @@ typedef unsigned long POINTER_64; // FIXME! HACK!!!
 //
 #ifndef NONAMELESSUNION
 #ifdef __GNUC__
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-#define _ANONYMOUS_UNION __extension__
-#define _ANONYMOUS_STRUCT __extension__
-#else
-#if defined(__cplusplus)
-#define _ANONYMOUS_UNION __extension__
-#endif /* __cplusplus */
-#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined (__cplusplus)
+#define _ANONYMOUS_UNION __GNU_EXTENSION
+#define _ANONYMOUS_STRUCT __GNU_EXTENSION
+#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined (__cplusplus) */
 #elif defined(__WATCOMC__) || defined(_MSC_VER)
 #define _ANONYMOUS_UNION
 #define _ANONYMOUS_STRUCT
@@ -332,7 +336,7 @@ typedef struct _QUAD
 {
     _ANONYMOUS_UNION union
     {
-        __int64 UseThisFieldToCopy;
+        __GNU_EXTENSION __int64 UseThisFieldToCopy;
         double DoNotUseThisField;
     };
 } QUAD, *PQUAD, UQUAD, *PUQUAD;
@@ -374,8 +378,8 @@ typedef LONG HRESULT;
 //
 // 64-bit types
 //
-typedef __int64 LONGLONG, *PLONGLONG;
-typedef unsigned __int64 ULONGLONG, *PULONGLONG;
+__GNU_EXTENSION typedef __int64 LONGLONG, *PLONGLONG;
+__GNU_EXTENSION typedef unsigned __int64 ULONGLONG, *PULONGLONG;
 typedef ULONGLONG DWORDLONG, *PDWORDLONG;
 
 //
index 1558174..f0a72f5 100644 (file)
@@ -46,8 +46,8 @@ typedef enum
 #endif
 
 typedef PHYSICAL_ADDRESS STREAM_PHYSICAL_ADDRESS, *PSTREAM_PHYSICAL_ADDRESS;
-typedef unsigned __int64 STREAM_SYSTEM_TIME, *PSTREAM_SYSTEM_TIME;
-typedef unsigned __int64 STREAM_TIMESTAMP, *PSTREAM_TIMESTAMP;
+__GNU_EXTENSION typedef unsigned __int64 STREAM_SYSTEM_TIME, *PSTREAM_SYSTEM_TIME;
+__GNU_EXTENSION typedef unsigned __int64 STREAM_TIMESTAMP, *PSTREAM_TIMESTAMP;
 
 typedef enum
 {