+2012-08-31 Earnie Boyd <earnie@users.sourceforge.net>
+
+ More on assuming GCC is greater than or equal to version 3.5.4 and that
+ GCC is the only compiler to be used for MinGW.org.
+
+ * include/winnt.h: Remove unneeded filters based on the assumptions.
+ (_SYSTEM_POWER_INFORMATION): Introduce filter for _WIN32_WINNT >=
+ Windows XP.
+ * include/winperf.h: Remove unneeded filters based on the assumptions.
+ * include/winreg.h: Ditto.
+ * include/winresrc.h: Ditto.
+ * include/winsnmp.h: Ditto.
+ * include/winsock.h: Ditto.
+ * include/winsock2.h: Ditto.
+ * include/winspool.h: Ditto.
+ * include/winsvc.h: Ditto.
+ * include/winuser.h: Ditto.
+ * include/winver.h: Ditto.
+ * include/ws2spi.h: Ditto.
+ * include/ws2tcpip.h: Ditto.
+ * include/wsahelp.h: Ditto.
+ * include/wsipx.h: Ditto.
+ * include/wsnetbs.h: Ditto.
+
2012-08-28 Earnie Boyd <earnie@users.sourceforge.net>
We are going to assume that MinGW is using GCC version greater than or
#ifndef _WINNT_H
#define _WINNT_H
-#if __GNUC__ >= 3
#pragma GCC system_header
-#endif
/* translate GCC target defines to MS equivalents. Keep this synchronized
with windows.h. */
#endif
#ifndef DECLSPEC_ALIGN
-#ifdef __GNUC__
#define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
-#else
-#define DECLSPEC_ALIGN(x)
-#endif
#endif
#ifndef DECLSPEC_SELECTANY
#endif
#ifndef FORCEINLINE
-#if (__GNUC__ >= 3)
#define FORCEINLINE __inline __attribute__((always_inline))
-#else
-#define FORCEINLINE __inline
-#endif
#endif
#ifndef C_ASSERT
typedef DWORD LCID;
typedef PDWORD PLCID;
typedef WORD LANGID;
-#ifdef __GNUC__
+
#define _HAVE_INT64
#define _INTEGRAL_MAX_BITS 64
#undef __int64
#define __int64 long long
-#elif defined(__WATCOMC__) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 )
-#define _HAVE_INT64
-#endif /* __GNUC__/__WATCOMC */
-#if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)
+
typedef __int64 LONGLONG;
typedef unsigned __int64 DWORDLONG;
-#else
-typedef double LONGLONG,DWORDLONG;
-#endif
+
typedef LONGLONG *PLONGLONG;
typedef DWORDLONG *PDWORDLONG;
typedef DWORDLONG ULONGLONG,*PULONGLONG;
typedef LONGLONG USN;
-#ifdef _HAVE_INT64
+
#define Int32x32To64(a,b) ((LONGLONG)(a)*(LONGLONG)(b))
#define UInt32x32To64(a,b) ((DWORDLONG)(a)*(DWORDLONG)(b))
#define Int64ShllMod32(a,b) ((DWORDLONG)(a)<<(b))
#define Int64ShraMod32(a,b) ((LONGLONG)(a)>>(b))
#define Int64ShrlMod32(a,b) ((DWORDLONG)(a)>>(b))
-#endif
+
#define ANSI_NULL '\0'
#define UNICODE_NULL L'\0'
typedef BYTE BOOLEAN,*PBOOLEAN;
#if (_WIN32_WINNT >= 0x0500)
typedef LONG (WINAPI *PVECTORED_EXCEPTION_HANDLER)(PEXCEPTION_POINTERS);
#endif
-#if 1 /* (WIN32_WINNT >= 0x0500) */
+#if (WIN32_WINNT >= _WIN32_WINNT_WINXP)
typedef struct _SYSTEM_POWER_INFORMATION {
ULONG MaxIdlenessAllowed;
ULONG Idleness;
#endif
#ifdef _X86_
-#if defined(__GNUC__)
-#if (__GNUC__ >= 3)
/* Support -masm=intel. */
static __inline__ PVOID GetCurrentFiber(void)
{
return ret;
}
-#else /* __GNUC__ >= 3 */
-static __inline__ PVOID GetCurrentFiber(void)
-{
- void* ret;
- __asm__ __volatile__ (
- "movl %%fs:0x10,%0"
- : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
- );
- return ret;
-}
-
-static __inline__ PVOID GetFiberData(void)
-{
- void* ret;
- __asm__ __volatile__ (
- "movl %%fs:0x10,%0\n\t"
- "movl (%0),%0"
- : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
- );
- return ret;
-}
-
-static __inline__ struct _TEB * NtCurrentTeb(void)
-{
- struct _TEB *ret;
-
- __asm__ __volatile__ (
- "movl %%fs:0x18, %0\n"
- : "=r" (ret)
- : /* no inputs */
- );
- return ret;
-}
-#endif /* __GNUC__ >= 3 */
-
-#else
+#else /* ! _X86_ */
PVOID GetCurrentFiber(void);
#pragma aux GetCurrentFiber = \
value [eax] \
modify [eax];
-#endif /* __GNUC__ */
#endif /* _X86_ */
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
#ifndef _WINUSER_H
#define _WINUSER_H
-#if __GNUC__ >= 3
#pragma GCC system_header
-#endif
#ifdef __cplusplus
extern "C" {
#define IS_INTRESOURCE(i) (((ULONG_PTR)(i) >> 16) == 0)
#define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
#define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
-#ifndef XFree86Server
# define RT_CURSOR MAKEINTRESOURCE(1)
# define RT_FONT MAKEINTRESOURCE(8)
-#endif /* ndef XFree86Server */
#define RT_BITMAP MAKEINTRESOURCE(2)
#define RT_ICON MAKEINTRESOURCE(3)
#define RT_MENU MAKEINTRESOURCE(4)