Author: ktietz
Date: Sat Feb 27 15:01:48 2010
New Revision: 45695
URL:
http://svn.reactos.org/svn/reactos?rev=45695&view=rev
Log:
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++.
Modified:
branches/header-work/include/ddk/ntdef.h
branches/header-work/include/ddk/strmini.h
Modified: branches/header-work/include/ddk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntdef.h…
==============================================================================
--- branches/header-work/include/ddk/ntdef.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/ntdef.h [iso-8859-1] Sat Feb 27 15:01:48 2010
@@ -13,6 +13,14 @@
#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 @@
//
#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 @@
{
_ANONYMOUS_UNION union
{
- __int64 UseThisFieldToCopy;
+ __GNU_EXTENSION __int64 UseThisFieldToCopy;
double DoNotUseThisField;
};
} QUAD, *PQUAD, UQUAD, *PUQUAD;
@@ -374,8 +378,8 @@
//
// 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;
//
Modified: branches/header-work/include/ddk/strmini.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/strmini…
==============================================================================
--- branches/header-work/include/ddk/strmini.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/strmini.h [iso-8859-1] Sat Feb 27 15:01:48 2010
@@ -46,8 +46,8 @@
#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
{