OSDN Git Service

More on assuming GCC is greater than or equal to version 3.5.4 and that
authorEarnie Boyd <earnie@users.sourceforge.net>
Fri, 31 Aug 2012 17:47:51 +0000 (13:47 -0400)
committerEarnie Boyd <earnie@users.sourceforge.net>
Fri, 31 Aug 2012 17:47:51 +0000 (13:47 -0400)
GCC is the only compiler to be used for MinGW.org.

* include/userenv.h: Remove unneeded filters based on the assumptions.
* include/usp10.h: Ditto.
* include/uxtheme.h: Ditto.
* include/vidcap.h: Ditto.
* include/vmr9.h: Ditto.
* include/vptype.h: Ditto.
* include/w32api.h: Ditto.
* include/winable.h: Ditto.
* include/winbase.h: Ditto.
* include/winber.h: Ditto.
* include/wincon.h: Ditto.
* include/wincrypt.h: Ditto.
* include/windef.h: Ditto.
* include/windns.h: Ditto.
* include/windows.h: Ditto.
* include/windowsx.h: Ditto.
* include/winerror.h: Ditto.
* include/wchar.h: Ditto.  Add GCC system_header pragma.

20 files changed:
ChangeLog
include/userenv.h
include/usp10.h
include/uxtheme.h
include/vfw.h
include/vidcap.h
include/vmr9.h
include/vptype.h
include/w32api.h
include/wchar.h
include/winable.h
include/winbase.h
include/winber.h
include/wincon.h
include/wincrypt.h
include/windef.h
include/windns.h
include/windows.h
include/windowsx.h
include/winerror.h

index 019181b..c64d3bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * include/winocotl.h: Ditto.
        * include/winldap.h:Ditto.
        * include/winnls.h: Ditto.
+       * include/userenv.h: Ditto.
+       * include/usp10.h: Ditto.
+       * include/uxtheme.h: Ditto.
+       * include/vidcap.h: Ditto.
+       * include/vmr9.h: Ditto.
+       * include/vptype.h: Ditto.
+       * include/w32api.h: Ditto.
+       * include/winable.h: Ditto.
+       * include/winbase.h: Ditto.
+       * include/winber.h: Ditto.
+       * include/wincon.h: Ditto.
+       * include/wincrypt.h: Ditto.
+       * include/windef.h: Ditto.
+       * include/windns.h: Ditto.
+       * include/windows.h: Ditto.
+       * include/windowsx.h: Ditto.
+       * include/winerror.h: Ditto.
+       * include/wchar.h: Ditto.  Add GCC system_header pragma.
        * include/_mingw.h: Give an error if __GNUC__ isn't defined or isn't >=
        version 3.4.5.
 
index c84ccf8..01ee02e 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _USERENV_H
 #define _USERENV_H
-#if __GNUC__ >=3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
index 8f194f3..bfc2c86 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _USP10_H
 #define _USP10_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #include <windows.h>
 
index 5d06bc8..48a92ca 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _UXTHEME_H
 #define _UXTHEME_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #include <commctrl.h>
 
index 950340b..4f83aa0 100644 (file)
@@ -1,16 +1,10 @@
 #ifndef _VFW_H
 #define _VFW_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
-#ifndef _WINDOWS_H
 #include <windows.h>
-#endif
-#ifndef _MMSYSTEM_H
 #include <mmsystem.h>
-#endif
-#if !defined  (_OLE2_H) && !defined (_OBJC_NO_COM)
+#ifndef _OBJC_NO_COM
 #include <ole2.h>
 #endif
 
index be9260f..c4294e8 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _VIDCAP_H
 #define _VIDCAP_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
index 9c5cd8d..b9fe65e 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _VMR9_H
 #define _VMR9_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
index d90d614..6b1e102 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _VPTYPE_H
 #define _VPTYPE_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
index a0b08e6..ca16f7d 100644 (file)
@@ -1,9 +1,7 @@
 #ifndef _W32API_H
 #define _W32API_H
 #define _W32API_H_
-#if __GNUC__ >=3
 #pragma GCC system_header
-#endif
 #warning WARNING - The w32api.h header file is deprecated and will be removed.
 
 #define __W32API_VERSION 3.17
index dadeda6..e92c750 100644 (file)
@@ -13,6 +13,7 @@
 
 #ifndef        _WCHAR_H_
 #define        _WCHAR_H_
+#pragma GCC system_header
 
 /* All the headers include this file. */
 #include <_mingw.h>
 #include <stddef.h>
 
 #ifndef __VALIST
-#if defined __GNUC__ && __GNUC__ >= 3
 #define __need___va_list
 #include <stdarg.h>
 #define __VALIST __builtin_va_list
-#else
-#define __VALIST char*
-#endif
 #endif
 
 #endif /* Not RC_INVOKED */
index 0228293..aacd091 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WINABLE_H
 #define _WINABLE_H
-#if __GNUC__ >=3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
index d20bffa..1e15cd2 100644 (file)
@@ -1,14 +1,8 @@
 #ifndef _WINBASE_H
 #define _WINBASE_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
-#ifdef __GNUC__
 #define __GNUC_EXTENSION __extension__
-#else
-#define __GNUC_EXTENSION
-#endif
 
 #ifndef WINBASEAPI
 #ifdef __W32API_USE_DLLIMPORT__
@@ -1544,9 +1538,7 @@ WINBASEAPI BOOL WINAPI FreeLibrary(HMODULE);
 DECLSPEC_NORETURN WINBASEAPI void WINAPI FreeLibraryAndExitThread(HMODULE,DWORD);
 #define FreeModule(m) FreeLibrary(m)
 #define FreeProcInstance(p) (void)(p)
-#ifndef XFree86Server
 WINBASEAPI BOOL WINAPI FreeResource(HGLOBAL);
-#endif /* ndef XFree86Server */
 WINBASEAPI PVOID WINAPI FreeSid(PSID);
 WINBASEAPI BOOL WINAPI GetAce(PACL,DWORD,LPVOID*);
 WINBASEAPI BOOL WINAPI GetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
index 462a66d..ad18310 100644 (file)
@@ -17,9 +17,7 @@
 
 #ifndef _WINBER_H
 #define _WINBER_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
index d536acb..cf64907 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WINCON_H
 #define _WINCON_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -102,12 +100,7 @@ typedef struct _KEY_EVENT_RECORD {
                CHAR AsciiChar;
        } uChar;
        DWORD dwControlKeyState;
-}
-#ifdef __GNUC__
-/* gcc's alignment is not what win32 expects */
- __attribute__((packed))
-#endif
-KEY_EVENT_RECORD;
+} __attribute__((packed)) KEY_EVENT_RECORD;
 
 typedef struct _MOUSE_EVENT_RECORD {
        COORD dwMousePosition;
index 68dfbed..fd23169 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WINCRYPT_H
 #define _WINCRYPT_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #ifndef WINADVAPI
 #define WINADVAPI
index 23a551d..9ac1063 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WINDEF_H
 #define _WINDEF_H
-#if __GNUC__ >=3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -67,7 +65,6 @@ extern "C" {
 #endif
 #endif
 
-#ifdef __GNUC__
 #ifndef _fastcall
 #define _fastcall __attribute__((fastcall))
 #endif
@@ -92,10 +89,6 @@ extern "C" {
 #ifndef _declspec
 #define _declspec(e) __attribute__((e))
 #endif
-#else
-#define _cdecl
-#define __cdecl
-#endif
 
 #undef pascal
 #undef _pascal
@@ -115,13 +108,9 @@ extern "C" {
 
 #define DECLSPEC_IMPORT __declspec(dllimport)
 #define DECLSPEC_EXPORT __declspec(dllexport)
-#ifdef __GNUC__
 #define DECLSPEC_NORETURN __declspec(noreturn)
 #define DECLARE_STDCALL_P( type ) __stdcall type
-#elif defined(__WATCOMC__)
-#define DECLSPEC_NORETURN
-#define DECLARE_STDCALL_P( type ) type __stdcall
-#endif /* __GNUC__/__WATCOMC__ */
+
 #define MAKEWORD(a,b)  ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
 #define MAKELONG(a,b)  ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
 #define LOWORD(l)      ((WORD)((DWORD)(l)))
@@ -129,14 +118,12 @@ extern "C" {
 #define LOBYTE(w)      ((BYTE)(w))
 #define HIBYTE(w)      ((BYTE)(((WORD)(w)>>8)&0xFF))
 
-#ifndef __WATCOMC__
 #ifndef _export
 #define _export
 #endif
 #ifndef __export
 #define __export
 #endif
-#endif
 
 #ifndef NOMINMAX
 #ifndef max
@@ -153,19 +140,8 @@ extern "C" {
 #define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
 
 #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) */
-#elif defined(__WATCOMC__)
-#define _ANONYMOUS_UNION
-#define _ANONYMOUS_STRUCT
-#endif /* __GNUC__/__WATCOMC__ */
 #endif /* NONAMELESSUNION */
 
 #ifndef _ANONYMOUS_UNION
@@ -212,7 +188,7 @@ extern "C" {
 /* FIXME: This will make some code compile. The programs will most
    likely crash when an exception is raised, but at least they will
    compile. */
-#if defined (__GNUC__) && defined (__SEH_NOOP)
+#if defined (__SEH_NOOP)
 #define __try
 #define __except(x) if (0) /* don't execute handler */
 #define __finally
@@ -225,14 +201,12 @@ extern "C" {
 typedef unsigned long DWORD;
 typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
 /* FIXME: Is there a good solution to this? */
-#ifndef XFree86Server
 #ifndef __OBJC__
 typedef WINBOOL BOOL;
 #else
 #define BOOL WINBOOL
 #endif
 typedef unsigned char BYTE;
-#endif /* ndef XFree86Server */
 typedef BOOL *PBOOL,*LPBOOL;
 typedef unsigned short WORD;
 typedef float FLOAT;
@@ -255,9 +229,7 @@ typedef LONG_PTR LRESULT;
 typedef LONG HRESULT;
 #define _HRESULT_DEFINED
 #endif
-#ifndef XFree86Server
 typedef WORD ATOM;
-#endif /* XFree86Server */
 typedef HANDLE HHOOK;
 typedef HANDLE HGLOBAL;
 typedef HANDLE HLOCAL;
index 0a7760d..1c0f40b 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WINDNS_H
 #define _WINDNS_H
-#if __GNUC__ >= 3
 #pragma GCC system_header
-#endif
 
 #ifdef __cplusplus
 extern "C" {
index db18aec..19c6940 100644 (file)
@@ -12,9 +12,7 @@
 */
 #ifndef _WINDOWS_H
 #define _WINDOWS_H
-#if __GNUC__ >=3
 #pragma GCC system_header
-#endif
 
 #include <sdkddkver.h>
 
 #include <windef.h>
 #include <wincon.h>
 #include <winbase.h>
-#if !(defined NOGDI || defined  _WINGDI_H)
+#ifndef NOGDI
 #include <wingdi.h>
 #endif
-#ifndef _WINUSER_H
 #include <winuser.h>
-#endif
-#ifndef _WINNLS_H
 #include <winnls.h>
-#endif
-#ifndef _WINVER_H
 #include <winver.h>
-#endif
-#ifndef _WINNETWK_H
 #include <winnetwk.h>
-#endif
-#ifndef _WINREG_H
 #include <winreg.h>
-#endif
-#ifndef _WINSVC_H
 #include <winsvc.h>
-#endif
 
 #ifndef WIN32_LEAN_AND_MEAN
 #include <cderr.h>
    because of conflicts with @interface directive.  Define _OBJC_NO_COM
    to keep this behaviour.  */ 
 #if !defined (_OBJC_NO_COM) 
-#if (__GNUC__ >= 3) || defined (__WATCOMC__)
 #include <ole2.h>
-#endif
 #endif /* _OBJC_NO_COM */
 #endif
 
index ec7930b..c98c6b5 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WINDOWSX_H
 #define _WINDOWSX_H
-#if __GNUC__ >=3
 #pragma GCC system_header
-#endif
 
 #ifndef SNDMSG
 #ifdef __cplusplus
index 6b0b173..6345f3f 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WINERROR_H
 #define _WINERROR_H
-#if __GNUC__ >=3
 #pragma GCC system_header
-#endif
 
 #define _HRESULT_TYPEDEF_(_sc) ((HRESULT)_sc)