OSDN Git Service

Redo the filters based on assumptions discussed in mingw-dvlpr list.
authorEarnie Boyd <earnie@users.sourceforge.net>
Mon, 10 Sep 2012 17:37:08 +0000 (13:37 -0400)
committerEarnie Boyd <earnie@users.sourceforge.net>
Mon, 10 Sep 2012 17:37:08 +0000 (13:37 -0400)
* include/commdlg.h (_mingw.h): Include.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer
and move filters to the end of the file.
(UNICODE): Use __AW() macro for mapping non-specific symbols.
* include/dbt.h: Ditto.
* include/dsclient.h: Ditto.
* include/dsgetdc.h: Ditto.
* include/errorrep.h: Ditto.

* include/complex.h (_mingw.h): Remove comment and move to top of file.
(__GNUC__): Remove filter since only GCC is used.

* include/conio.h (_mingw.h): Remove comment and move to top of file.
* include/ctype.h: Ditto.
* include/direct.h: Ditto.
* include/dirent.h: Ditto.
* include/dos.h: Ditto.
* include/errno.h: Ditto.
* include/excpt.h: Ditto.
* include/float.h: Ditto.
* include/getopt.h: Ditto.

* include/control.h (_mingw.h): Include.
* include/cplext.h: Ditto.
* include/dde.h: Ditto.
* include/devguid.h: Ditto.
* include/dlgs.h: Ditto.
* include/docobj.h: Ditto.
* include/dshow.h: Ditto.
* include/dvdevcod.h: Ditto.
* include/dvdmedia.h: Ditto.
* include/edevdefs.h: Ditto.
* include/evcode.h: Ditto.
* include/exdisp.h: Ditto.
* include/exdispid.h: Ditto.
* include/httpext.h: Ditto.

* include/cpl.h (_mingw.h): Include.
(UNICODE): Use __AW() macro for mapping non-specific symbols.
* include/custcntl.h: Ditto.
* include/ddeml.h: Ditto.
* include/errors.h: Ditto.

* include/dsadmin.h (_mingw.h): Include.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer
and move filters to the end of the file.
* include/dhcpcsdk.h: Ditto.
* include/dsquery.h: Ditto.
* include/dsrole.h: Ditto.
* include/fltdefs.h: Ditto.

* incldue/fcntl.h (_mingw.h): Include.
(__MSVCRT_VERSION__): Rename to _WIN32_WINNT and compare to
_WIN32_WINNT_WIN98.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer
and move filters to the end of the file.

* include/_mingw.h (__STR): Add macro for L"string" or "string".

* include/sdkddkver.h (_WIN32_WINNT_WIN95): Add constant definition.
(_WIN32_WINNT_WIN98): Ditto.
(_WIN32_WINNT_WINME): Ditto.

43 files changed:
ChangeLog
include/_mingw.h
include/commdlg.h
include/complex.h
include/conio.h
include/control.h
include/cpl.h
include/cplext.h
include/ctype.h
include/custcntl.h
include/dbt.h
include/dde.h
include/ddeml.h
include/devguid.h
include/dhcpcsdk.h
include/direct.h
include/dirent.h
include/dlgs.h
include/docobj.h
include/dos.h
include/dsadmin.h
include/dsclient.h
include/dsgetdc.h
include/dshow.h
include/dsquery.h
include/dsrole.h
include/dvdevcod.h
include/dvdmedia.h
include/edevdefs.h
include/errno.h
include/errorrep.h
include/errors.h
include/evcode.h
include/excpt.h
include/exdisp.h
include/exdispid.h
include/fcntl.h
include/fenv.h
include/float.h
include/fltdefs.h
include/getopt.h
include/httpext.h
include/sdkddkver.h

index cc6ca07..8c36f60 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,70 @@
+2012-09-10  Earnie Boyd  <earnie@users.sourceforge.ent>
+
+       Redo the filters based on assumptions discussed in mingw-dvlpr list.
+
+       * include/commdlg.h (_mingw.h): Include.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer
+       and move filters to the end of the file.
+       (UNICODE): Use __AW() macro for mapping non-specific symbols.
+       * include/dbt.h: Ditto.
+       * include/dsclient.h: Ditto.
+       * include/dsgetdc.h: Ditto.
+       * include/errorrep.h: Ditto.
+
+       * include/complex.h (_mingw.h): Remove comment and move to top of file.
+       (__GNUC__): Remove filter since only GCC is used.
+
+       * include/conio.h (_mingw.h): Remove comment and move to top of file.
+       * include/ctype.h: Ditto.
+       * include/direct.h: Ditto.
+       * include/dirent.h: Ditto.
+       * include/dos.h: Ditto.
+       * include/errno.h: Ditto.
+       * include/excpt.h: Ditto.
+       * include/float.h: Ditto.
+       * include/getopt.h: Ditto.
+
+       * include/control.h (_mingw.h): Include.
+       * include/cplext.h: Ditto.
+       * include/dde.h: Ditto.
+       * include/devguid.h: Ditto.
+       * include/dlgs.h: Ditto.
+       * include/docobj.h: Ditto.
+       * include/dshow.h: Ditto.
+       * include/dvdevcod.h: Ditto.
+       * include/dvdmedia.h: Ditto.
+       * include/edevdefs.h: Ditto.
+       * include/evcode.h: Ditto.
+       * include/exdisp.h: Ditto.
+       * include/exdispid.h: Ditto.
+       * include/httpext.h: Ditto.
+
+       * include/cpl.h (_mingw.h): Include.
+       (UNICODE): Use __AW() macro for mapping non-specific symbols.
+       * include/custcntl.h: Ditto.
+       * include/ddeml.h: Ditto.
+       * include/errors.h: Ditto.
+
+       * include/dsadmin.h (_mingw.h): Include.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer
+       and move filters to the end of the file.
+       * include/dhcpcsdk.h: Ditto.
+       * include/dsquery.h: Ditto.
+       * include/dsrole.h: Ditto.
+       * include/fltdefs.h: Ditto.
+
+       * incldue/fcntl.h (_mingw.h): Include.
+       (__MSVCRT_VERSION__): Rename to _WIN32_WINNT and compare to
+       _WIN32_WINNT_WIN98.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer
+       and move filters to the end of the file.
+
+       * include/_mingw.h (__STR): Add macro for L"string" or "string".
+
+       * include/sdkddkver.h (_WIN32_WINNT_WIN95): Add constant definition.
+       (_WIN32_WINNT_WIN98): Ditto.
+       (_WIN32_WINNT_WINME): Ditto.
+
 2012-09-08  Earnie Boyd  <earnie@users.sourceforge.net>
 
        Redo the filters based on assumptions discussed in mingw-dvlpr list.
index 8c37121..0fd1dc7 100644 (file)
@@ -201,8 +201,10 @@ typedef struct localeinfo_struct {
 #define __AW__(AW, AW_) AW ## AW_
 #if (defined(UNICODE) || defined(_UNICODE))
 #define __AW(AW) __AW__(AW, W)
+#define __STR(AW) __AW__(L, AW)
 #else
 #define __AW(AW) __AW__(AW, A)
+#define __STR(AW) __AW__(, AW)
 #endif
 
 #endif /* __MINGW_H */
index 41ed7f6..71ceec7 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _COMMDLG_H
 #define _COMMDLG_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -137,9 +138,6 @@ extern "C" {
 #define OFN_SHARENOWARN 1
 #define OFN_SHAREWARN 0
 #define OFN_NODEREFERENCELINKS 0x100000
-#if (_WIN32_WINNT >= 0x0500)
-#define OFN_DONTADDTORECENT 0x02000000
-#endif
 #define FR_DIALOGTERM 64
 #define FR_DOWN 1
 #define FR_ENABLEHOOK 256
@@ -184,16 +182,6 @@ extern "C" {
 #define PD_DISABLEPRINTTOFILE  0x00080000
 #define PD_HIDEPRINTTOFILE     0x00100000
 #define PD_NONETWORKBUTTON     0x00200000
-#if (_WIN32_WINNT >= 0x0500)
-#define PD_CURRENTPAGE 0x00400000
-#define PD_NOCURRENTPAGE       0x00800000
-#define PD_EXCLUSIONFLAGS      0x01000000 
-#define PD_USELARGETEMPLATE    0x10000000
-#define PD_RESULT_CANCEL       0
-#define PD_RESULT_PRINT        1
-#define PD_RESULT_APPLY        2
-#define START_PAGE_GENERAL     0XFFFFFFFF
-#endif
 #define PSD_DEFAULTMINMARGINS  0
 #define PSD_INWININIINTLMEASURE        0
 #define PSD_MINMARGINS 1
@@ -224,9 +212,6 @@ extern "C" {
 #define CD_LBSELSUB      1
 #define CD_LBSELADD      2
 #define DN_DEFAULTPRN  1
-#if (_WIN32_WINNT >= 0x0500)
-#define OPENFILENAME_SIZE_VERSION_400  76
-#endif
 
 #ifndef SNDMSG
 #ifdef __cplusplus
@@ -487,7 +472,65 @@ typedef struct tagPDW {
        HANDLE hPrintTemplate;
        HANDLE hSetupTemplate;
 } PRINTDLGW,*LPPRINTDLGW;
-#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
+
+BOOL WINAPI ChooseColorA(LPCHOOSECOLORA);
+BOOL WINAPI ChooseColorW(LPCHOOSECOLORW);
+BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
+BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
+DWORD WINAPI CommDlgExtendedError(void);
+HWND WINAPI FindTextA(LPFINDREPLACEA);
+HWND WINAPI FindTextW(LPFINDREPLACEW);
+short WINAPI GetFileTitleA(LPCSTR,LPSTR,WORD);
+short WINAPI GetFileTitleW(LPCWSTR,LPWSTR,WORD);
+BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA);
+BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW);
+BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA);
+BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW);
+BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA);
+BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW);
+BOOL WINAPI PrintDlgA(LPPRINTDLGA);
+BOOL WINAPI PrintDlgW(LPPRINTDLGW);
+HWND WINAPI ReplaceTextA(LPFINDREPLACEA);
+HWND WINAPI ReplaceTextW(LPFINDREPLACEW);
+
+#define LBSELCHSTRING  __AW(LBSELCHSTRING)
+#define SHAREVISTRING  __AW(SHAREVISTRING)
+#define FILEOKSTRING   __AW(FILEOKSTRING)
+#define COLOROKSTRING  __AW(COLOROKSTRING)
+#define SETRGBSTRING   __AW(SETRGBSTRING)
+#define HELPMSGSTRING  __AW(HELPMSGSTRING)
+#define FINDMSGSTRING  __AW(FINDMSGSTRING)
+typedef __AW(CHOOSECOLOR) CHOOSECOLOR,*LPCHOOSECOLOR;
+typedef __AW(CHOOSEFONT) CHOOSEFONT,*LPCHOOSEFONT;
+typedef __AW(FINDREPLACE) FINDREPLACE,*LPFINDREPLACE;
+typedef __AW(OPENFILENAME) OPENFILENAME,*LPOPENFILENAME;
+typedef __AW(OFNOTIFY) OFNOTIFY,*LPOFNOTIFY;
+typedef __AW(PAGESETUPDLG) PAGESETUPDLG,*LPPAGESETUPDLG;
+typedef __AW(PRINTDLG) PRINTDLG,*LPPRINTDLG;
+#define ChooseColor __AW(ChooseColor)
+#define ChooseFont __AW(ChooseFont)
+#define FindText __AW(FindText)
+#define GetFileTitle __AW(GetFileTitle)
+#define GetOpenFileName __AW(GetOpenFileName)
+#define GetSaveFileName __AW(GetSaveFileName)
+#define PageSetupDlg __AW(PageSetupDlg)
+#define PrintDlg __AW(PrintDlg)
+#define ReplaceText __AW(ReplaceText)
+
+#if (WINVER >= 0x0500) 
+#define OFN_DONTADDTORECENT 0x02000000
+#define PD_CURRENTPAGE 0x00400000
+#define PD_NOCURRENTPAGE       0x00800000
+#define PD_EXCLUSIONFLAGS      0x01000000 
+#define PD_USELARGETEMPLATE    0x10000000
+#define PD_RESULT_CANCEL       0
+#define PD_RESULT_PRINT        1
+#define PD_RESULT_APPLY        2
+#define START_PAGE_GENERAL     0XFFFFFFFF
+#define OPENFILENAME_SIZE_VERSION_400  76
+#ifndef _OBJC_NO_COM
+typedef __AW(PRINTDLGEX) PRINTDLGEX, *LPPRINTDLGEX;
+#define PrintDlgEx __AW(PrintDlgEx)
 #include <unknwn.h>  /* for LPUNKNOWN  */ 
 #include <prsht.h>   /* for HPROPSHEETPAGE  */
 typedef struct tagPRINTPAGERANGE {
@@ -540,90 +583,13 @@ typedef struct tagPDEXW {
    DWORD nStartPage;
    DWORD dwResultAction;
 } PRINTDLGEXW, *LPPRINTDLGEXW;
-#endif /* WINVER >= 0x0500 */
-
-BOOL WINAPI ChooseColorA(LPCHOOSECOLORA);
-BOOL WINAPI ChooseColorW(LPCHOOSECOLORW);
-BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
-BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
-DWORD WINAPI CommDlgExtendedError(void);
-HWND WINAPI FindTextA(LPFINDREPLACEA);
-HWND WINAPI FindTextW(LPFINDREPLACEW);
-short WINAPI GetFileTitleA(LPCSTR,LPSTR,WORD);
-short WINAPI GetFileTitleW(LPCWSTR,LPWSTR,WORD);
-BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA);
-BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW);
-BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA);
-BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW);
-BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA);
-BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW);
-BOOL WINAPI PrintDlgA(LPPRINTDLGA);
-BOOL WINAPI PrintDlgW(LPPRINTDLGW);
-HWND WINAPI ReplaceTextA(LPFINDREPLACEA);
-HWND WINAPI ReplaceTextW(LPFINDREPLACEW);
-#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
 HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
 HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
+#endif /* _OBJC_NO_COM */
 #endif /* WINVER >= 0x0500 */
 
-#ifdef UNICODE
-#define LBSELCHSTRING  LBSELCHSTRINGW
-#define SHAREVISTRING  SHAREVISTRINGW
-#define FILEOKSTRING   FILEOKSTRINGW
-#define COLOROKSTRING  COLOROKSTRINGW
-#define SETRGBSTRING   SETRGBSTRINGW
-#define HELPMSGSTRING  HELPMSGSTRINGW
-#define FINDMSGSTRING  FINDMSGSTRINGW
-typedef CHOOSECOLORW CHOOSECOLOR,*LPCHOOSECOLOR;
-typedef CHOOSEFONTW CHOOSEFONT,*LPCHOOSEFONT;
-typedef FINDREPLACEW FINDREPLACE,*LPFINDREPLACE;
-typedef OPENFILENAMEW OPENFILENAME,*LPOPENFILENAME;
-typedef OFNOTIFYW OFNOTIFY,*LPOFNOTIFY;
-typedef PAGESETUPDLGW PAGESETUPDLG,*LPPAGESETUPDLG;
-typedef PRINTDLGW PRINTDLG,*LPPRINTDLG;
-#define ChooseColor ChooseColorW
-#define ChooseFont ChooseFontW
-#define FindText FindTextW
-#define GetFileTitle GetFileTitleW
-#define GetOpenFileName GetOpenFileNameW
-#define GetSaveFileName GetSaveFileNameW
-#define PageSetupDlg PageSetupDlgW
-#define PrintDlg PrintDlgW
-#define ReplaceText ReplaceTextW
-#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
-typedef PRINTDLGEXW PRINTDLGEX, *LPPRINTDLGEX;
-#define PrintDlgEx PrintDlgExW
-#endif /* WINVER >= 0x0500 */
-#else /* UNICODE */
-#define LBSELCHSTRING  LBSELCHSTRINGA
-#define SHAREVISTRING  SHAREVISTRINGA
-#define FILEOKSTRING   FILEOKSTRINGA
-#define COLOROKSTRING  COLOROKSTRINGA
-#define SETRGBSTRING   SETRGBSTRINGA
-#define HELPMSGSTRING  HELPMSGSTRINGA
-#define FINDMSGSTRING  FINDMSGSTRINGA
-typedef CHOOSECOLORA CHOOSECOLOR,*LPCHOOSECOLOR;
-typedef CHOOSEFONTA CHOOSEFONT,*LPCHOOSEFONT;
-typedef FINDREPLACEA FINDREPLACE,*LPFINDREPLACE;
-typedef OPENFILENAMEA OPENFILENAME,*LPOPENFILENAME;
-typedef OFNOTIFYA OFNOTIFY,*LPOFNOTIFY;
-typedef PAGESETUPDLGA PAGESETUPDLG,*LPPAGESETUPDLG;
-typedef PRINTDLGA PRINTDLG,*LPPRINTDLG;
-#define ChooseColor ChooseColorA
-#define ChooseFont ChooseFontA
-#define FindText FindTextA
-#define GetFileTitle GetFileTitleA
-#define GetOpenFileName GetOpenFileNameA
-#define GetSaveFileName GetSaveFileNameA
-#define PageSetupDlg PageSetupDlgA
-#define PrintDlg PrintDlgA
-#define ReplaceText ReplaceTextA
-#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
-typedef PRINTDLGEXA PRINTDLGEX, *LPPRINTDLGEX;
-#define PrintDlgEx PrintDlgExA
-#endif /* WINVER >= 0x0500 */
-#endif /* UNICODE */
 #pragma pack(pop)
+
 #ifdef __cplusplus
 }
 #endif
index 07e207e..52b2c1b 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef _COMPLEX_H_
 #define _COMPLEX_H_
 #pragma GCC system_header
-
-/* All the headers include this file. */
 #include <_mingw.h>
 
 /* These macros are specified by C99 standard */
@@ -116,8 +114,6 @@ long double _Complex  cpowl (long double _Complex, long double _Complex);
 long double _Complex  csqrtl (long double _Complex);
 long double _Complex __MINGW_ATTRIB_CONST cprojl (long double _Complex);
 
-#ifdef __GNUC__
-
 /* double */
 __CRT_INLINE double __MINGW_ATTRIB_CONST creal (double _Complex _Z)
 {
@@ -191,9 +187,6 @@ __CRT_INLINE  long double __MINGW_ATTRIB_CONST cargl (long double _Complex _Z)
   return res;
 }
 
-#endif /* __GNUC__ */
-
-
 #endif /* RC_INVOKED */
 
 #ifdef __cplusplus
index 3a4c112..0b13743 100644 (file)
 #ifndef        _CONIO_H_
 #define        _CONIO_H_
 #pragma GCC system_header
+#include <_mingw.h>
 
 /*
  * Low level console I/O functions. Pretty please try to use the ANSI
  * standard ones if you are writing new code.
  */
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 #ifndef RC_INVOKED
 
 #ifdef __cplusplus
index ec224c6..94f7b7f 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _CONTROL_H
 #define _CONTROL_H
 #pragma GCC system_header
+#include <mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
index f81b9bf..aec7196 100644 (file)
 #ifndef _CPL_H
 #define _CPL_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #define WM_CPL_LAUNCH (WM_USER+1000)
 #define WM_CPL_LAUNCHED (WM_USER+1001)
 #define CPL_DYNAMIC_RES 0
@@ -69,14 +71,11 @@ typedef struct tagNEWCPLINFOW {
        WCHAR szInfo[64];
        WCHAR szHelpFile[128];
 } NEWCPLINFOW,*LPNEWCPLINFOW;
-#ifdef UNICODE
-#define CPL_STARTWPARMS CPL_STARTWPARMSW
-typedef NEWCPLINFOW NEWCPLINFO,*LPNEWCPLINFO;
-#else
-#define CPL_STARTWPARMS CPL_STARTWPARMSA
-typedef NEWCPLINFOA NEWCPLINFO,*LPNEWCPLINFO;
-#endif
+#define CPL_STARTWPARMS __AW(CPL_STARTWPARMS)
+typedef __AW(NEWCPLINFO) NEWCPLINFO,*LPNEWCPLINFO;
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index 068120b..00045dd 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _CPLEXT_H
 #define _CPLEXT_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #define CPLPAGE_MOUSE_BUTTONS 1
 #define CPLPAGE_MOUSE_PTRMOTION 2
index 00ebdf7..f2ad187 100644 (file)
 #ifndef _CTYPE_H_
 #define _CTYPE_H_
 #pragma GCC system_header
+#include <_mingw.h>
 
 /* 
  * Functions for testing character types and converting characters.
  */
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 #define        __need_wchar_t
 #define        __need_wint_t
 #ifndef RC_INVOKED
index 0a7ad98..d7692df 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _CUSTCNTL_H
 #define _CUSTCNTL_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -102,22 +103,15 @@ typedef UINT(CALLBACK* LPFNCCINFOW)(LPCCINFOW);
 UINT CALLBACK CustomControlInfoA(LPCCINFOA acci);
 UINT CALLBACK CustomControlInfoW(LPCCINFOW acci);
 
-#ifdef UNICODE
-typedef CCSTYLEW CCSTYLE,*LPCCSTYLE;
-typedef CCSTYLEFLAGW CCSTYLEFLAG,*LPCCSTYLEFLAG;
-typedef CCINFOW CCINFO,*LPCCINFO;
-#define LPFNCCSTYLE LPFNCCSTYLEW
-#define LPFNCCSIZETOTEXT LPFNCCSIZETOTEXTW
-#define LPFNCCINFO LPFNCCINFOW
-#else
-typedef CCSTYLEA CCSTYLE,*LPCCSTYLE;
-typedef CCSTYLEFLAGA CCSTYLEFLAG,*LPCCSTYLEFLAG;
-typedef CCINFOA CCINFO,*LPCCINFO;
-#define LPFNCCSTYLE LPFNCCSTYLEA
-#define LPFNCCSIZETOTEXT LPFNCCSIZETOTEXTA
-#define LPFNCCINFO LPFNCCINFOA
-#endif
+typedef __AW(CCSTYLE) CCSTYLE,*LPCCSTYLE;
+typedef __AW(CCSTYLEFLAG) CCSTYLEFLAG,*LPCCSTYLEFLAG;
+typedef __AW(CCINFO) CCINFO,*LPCCINFO;
+#define LPFNCCSTYLE __AW(LPFNCCSTYLE)
+#define LPFNCCSIZETOTEXT __AW(LPFNCCSIZETOTEXT)
+#define LPFNCCINFO __AW(LPFNCCINFO)
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index ca96380..985000d 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DBT_H
 #define _DBT_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -41,10 +42,6 @@ extern "C" {
 #define DBT_DEVTYP_VOLUME      2
 #define DBT_DEVTYP_PORT        3
 #define DBT_DEVTYP_NET 4
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-#define DBT_DEVTYP_DEVICEINTERFACE 5
-#define DBT_DEVTYP_HANDLE 6
-#endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */
 #define DBT_APPYBEGIN 0
 #define DBT_APPYEND 1
 #define DBT_DEVNODES_CHANGED 7
@@ -79,14 +76,6 @@ extern "C" {
 #define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
 #define BSF_POSTMESSAGE 0x00000010
 #define BSF_QUERY 0x00000001
-#if (_WIN32_WINNT >= 0x0500)
-#define BSF_ALLOWSFW 0x00000080
-#define BSF_SENDNOTIFYMESSAGE 0x00000100
-#endif /* (_WIN32_WINNT >= 0x0500) */
-#if (_WIN32_WINNT >= 0x0501)
-#define BSF_LUID 0x00000400
-#define BSF_RETURNHDESK 0x00000200
-#endif /* (_WIN32_WINNT >= 0x0501) */
 
 #define BSF_MSGSRV32ISOK_BIT 31
 #define BSF_MSGSRV32ISOK 0x80000000
@@ -127,13 +116,13 @@ typedef struct _DEV_BROADCAST_VOLUME {
        WORD dbcv_flags;
 } DEV_BROADCAST_VOLUME,*PDEV_BROADCAST_VOLUME;
 
-#ifdef UNICODE
-typedef DEV_BROADCAST_PORT_W DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT;
-#else
-typedef DEV_BROADCAST_PORT_A DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT;
-#endif
+typedef __AW(DEV_BROADCAST_PORT_) DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT;
 
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K)
+#define DBT_DEVTYP_DEVICEINTERFACE 5
+#define DBT_DEVTYP_HANDLE 6
+#define BSF_ALLOWSFW 0x00000080
+#define BSF_SENDNOTIFYMESSAGE 0x00000100
 typedef struct _DEV_BROADCAST_DEVICEINTERFACE_A {
  DWORD dbcc_size;
  DWORD dbcc_devicetype;
@@ -149,13 +138,8 @@ typedef struct _DEV_BROADCAST_DEVICEINTERFACE_W {
  wchar_t dbcc_name[1];
 } DEV_BROADCAST_DEVICEINTERFACE_W, *PDEV_BROADCAST_DEVICEINTERFACE_W;
 
-#ifdef UNICODE
-typedef DEV_BROADCAST_DEVICEINTERFACE_W DEV_BROADCAST_DEVICEINTERFACE;
-typedef PDEV_BROADCAST_DEVICEINTERFACE_W PDEV_BROADCAST_DEVICEINTERFACE;
-#else
-typedef DEV_BROADCAST_DEVICEINTERFACE_A DEV_BROADCAST_DEVICEINTERFACE;
-typedef PDEV_BROADCAST_DEVICEINTERFACE_A PDEV_BROADCAST_DEVICEINTERFACE;
-#endif
+typedef __AW(DEV_BROADCAST_DEVICEINTERFACE_) DEV_BROADCAST_DEVICEINTERFACE;
+typedef __AW(PDEV_BROADCAST_DEVICEINTERFACE_) PDEV_BROADCAST_DEVICEINTERFACE;
 
 typedef struct _DEV_BROADCAST_HANDLE {
  DWORD dbch_size;
@@ -169,6 +153,11 @@ typedef struct _DEV_BROADCAST_HANDLE {
 } DEV_BROADCAST_HANDLE, *PDEV_BROADCAST_HANDLE;
 #endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */
 
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
+#define BSF_LUID 0x00000400
+#define BSF_RETURNHDESK 0x00000200
+#endif /* (_WIN32_WINNT >= 0x0501) */
+
 #ifdef __cplusplus
 }
 #endif
index 3c94b3e..8c095da 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DDE_H
 #define _DDE_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
index 58929e9..53f6644 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DDEML_H
 #define _DDEML_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -304,31 +305,18 @@ BOOL WINAPI DdeSetUserHandle(HCONV,DWORD,DWORD);
 BOOL WINAPI DdeUnaccessData(HDDEDATA);
 BOOL WINAPI DdeUninitialize(DWORD);
 
-#ifdef UNICODE
-#define SZDDESYS_TOPIC L"System"
-#define SZDDESYS_ITEM_TOPICS   L"Topics"
-#define SZDDESYS_ITEM_SYSITEMS L"SysItems"
-#define SZDDESYS_ITEM_RTNMSG   L"ReturnMessage"
-#define SZDDESYS_ITEM_STATUS   L"Status"
-#define SZDDESYS_ITEM_FORMATS  L"Formats"
-#define SZDDESYS_ITEM_HELP     L"Help"
-#define SZDDE_ITEM_ITEMLIST    L"TopicItemList"
-#define DdeCreateStringHandle DdeCreateStringHandleW
-#define DdeInitialize DdeInitializeW
-#define DdeQueryString DdeQueryStringW
-#else
-#define SZDDESYS_TOPIC "System"
-#define SZDDESYS_ITEM_TOPICS   "Topics"
-#define SZDDESYS_ITEM_SYSITEMS "SysItems"
-#define SZDDESYS_ITEM_RTNMSG   "ReturnMessage"
-#define SZDDESYS_ITEM_STATUS   "Status"
-#define SZDDESYS_ITEM_FORMATS  "Formats"
-#define SZDDESYS_ITEM_HELP     "Help"
-#define SZDDE_ITEM_ITEMLIST    "TopicItemList"
-#define DdeCreateStringHandle DdeCreateStringHandleA
-#define DdeInitialize DdeInitializeA
-#define DdeQueryString DdeQueryStringA
-#endif
+#define SZDDESYS_TOPIC __STR("System")
+#define SZDDESYS_ITEM_TOPICS   __STR("Topics")
+#define SZDDESYS_ITEM_SYSITEMS __STR("SysItems")
+#define SZDDESYS_ITEM_RTNMSG   __STR("ReturnMessage")
+#define SZDDESYS_ITEM_STATUS   __STR("Status")
+#define SZDDESYS_ITEM_FORMATS  __STR("Formats")
+#define SZDDESYS_ITEM_HELP     __STR("Help")
+#define SZDDE_ITEM_ITEMLIST    __STR("TopicItemList")
+#define DdeCreateStringHandle __AW(DdeCreateStringHandle)
+#define DdeInitialize __AW(DdeInitialize)
+#define DdeQueryString __AW(DdeQueryString)
+
 #ifdef __cplusplus
 }
 #endif
index 42143a6..de20c37 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DEVGUID_H
 #define _DEVGUID_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" { 
index 80f69e3..a4d20f2 100644 (file)
 #ifndef _DHCPCDSK_H
 #define _DHCPCDSK_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 #define DHCPCAPI_REGISTER_HANDLE_EVENT 0x00000001
 #define DHCPCAPI_REQUEST_PERSISTENT  0x00000001
 #define DHCPCAPI_REQUEST_SYNCHRONOUS 0x00000002
@@ -55,7 +56,7 @@ DWORD WINAPI DhcpDeRegisterParamChange(DWORD,LPVOID,LPVOID);
 DWORD WINAPI DhcpRegisterParamChange(DWORD,LPVOID,PWSTR,LPDHCPCAPI_CLASSID,DHCPCAPI_PARAMS_ARRAY,LPVOID);
 DWORD WINAPI DhcpRemoveDNSRegistrations(void);
 DWORD WINAPI DhcpUndoRequestParams(DWORD,LPVOID,LPWSTR,LPWSTR);
-#endif /* (_WIN32_WINNT >= 0x0500) */
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
index 5c576f5..3f8a295 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef        _DIRECT_H_
 #define        _DIRECT_H_
 #pragma GCC system_header
-
-/* All the headers include this file. */
 #include <_mingw.h>
 
 #define __need_wchar_t
index be11910..2408e63 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef _DIRENT_H_
 #define _DIRENT_H_
 #pragma GCC system_header
-
-/* All the headers include this file. */
 #include <_mingw.h>
 
 #include <io.h>
index 806a7c3..18af366 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DLGS_H
 #define _DLGS_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
index 67e628b..b93e451 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DOCOBJ_H
 #define _DOCOBJ_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
index e2c629f..10ae224 100644 (file)
 #ifndef        _DOS_H_
 #define        _DOS_H_
 #pragma GCC system_header
+#include <_mingw.h>
 
 /*
  * DOS-specific functions and structures.
  */
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 #define __need_wchar_t
 #ifndef RC_INVOKED
 #include <stddef.h>
index 696e26e..9c78ed9 100644 (file)
 #ifndef _DSADMIN_H
 #define _DSADMIN_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*--- Active Directory Reference - Active Directory Structures - Active Directory Admin Structures */
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 typedef struct {
        DWORD dwSize;
        HICON hObjClassIcon;
        LPWSTR lpszWizTitle;
        LPWSTR lpszContDisplayName;
 } DSA_NEWOBJ_DISPINFO,*LPDSA_NEWOBJ_DISPINFO;
-#endif /* (_WIN32_WINNT >= 0x0500) */
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
index e97371c..87ac627 100644 (file)
 #ifndef _DSCLIENT_H
 #define _DSCLIENT_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 /*--- Active Directory Reference - Active Directory Functions - Active Directory Display Functions - BFFCallBack */
 #define DSBM_QUERYINSERTW 0x0064
 #define DSBM_QUERYINSERTA 0x0065
 #define DSBM_CHANGEIMAGESTATE 0x0066
 #define DSBM_HELP 0x0067
 #define DSBM_CONTEXTMENU 0x0068
-#ifdef UNICODE
-#define DSBM_QUERYINSERT DSBM_QUERYINSERTW
-#else
-#define DSBM_QUERYINSERT DSBM_QUERYINSERTA
-#endif
+#define DSBM_QUERYINSERT __AW(DSBM_QUERYINSERT)
 /*--- Active Directory Reference - Active Directory Structures - Active Directory Display Structures */
 typedef struct _DOMAINDESC {
        LPWSTR pszName;
@@ -178,14 +175,9 @@ typedef struct {
 typedef struct {
        DWORD offsetString;
 } DSPROPERTYPAGEINFO,*LPDSPROPERTYPAGEINFO;
-#ifdef UNICODE
-typedef DSBITEMW DSBITEM,*PDSBITEM;
-typedef DSBROWSEINFOW DSBROWSEINFO,*PDSBROWSEINFO;
-#else
-typedef DSBITEMA DSBITEM,*PDSBITEM;
-typedef DSBROWSEINFOA DSBROWSEINFO,*PDSBROWSEINFO;
-#endif
-#endif /* (_WIN32_WINNT >= 0x0500) */
+typedef __AW(DSBITEM) DSBITEM,*PDSBITEM;
+typedef __AW(DSBROWSEINFO) DSBROWSEINFO,*PDSBROWSEINFO;
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
index eada768..3626d11 100644 (file)
 #ifndef _DSGETDC_H
 #define _DSGETDC_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*--- Active Directory Reference - Active Directory Structures - Directory Service Structures */
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 #define DS_FORCE_REDISCOVERY 0x00000001
 #define DS_DIRECTORY_SERVICE_REQUIRED 0x00000010
 #define DS_DIRECTORY_SERVICE_PREFERRED 0x00000020
@@ -111,16 +112,10 @@ typedef struct _DS_DOMAIN_TRUSTSW {
 DWORD WINAPI DsGetDcNameW(LPCWSTR, LPCWSTR, GUID*, LPCWSTR, ULONG, PDOMAIN_CONTROLLER_INFOW*);
 DWORD WINAPI DsGetDcNameA(LPCSTR, LPCSTR, GUID*, LPCSTR, ULONG, PDOMAIN_CONTROLLER_INFOA*);
 
-#ifdef UNICODE
-typedef DOMAIN_CONTROLLER_INFOW DOMAIN_CONTROLLER_INFO,*PDOMAIN_CONTROLLER_INFO;
-typedef DS_DOMAIN_TRUSTSW DS_DOMAIN_TRUSTS,*PDS_DOMAIN_TRUSTS;
-#define DsGetDcName DsGetDcNameW
-#else
-typedef DOMAIN_CONTROLLER_INFOA DOMAIN_CONTROLLER_INFO,*PDOMAIN_CONTROLLER_INFO;
-typedef DS_DOMAIN_TRUSTSA DS_DOMAIN_TRUSTS,*PDS_DOMAIN_TRUSTS;
-#define DsGetDcName DsGetDcNameA
-#endif
-#endif /* (_WIN32_WINNT >= 0x0500) */
+typedef __AW(DOMAIN_CONTROLLER_INFO) DOMAIN_CONTROLLER_INFO,*PDOMAIN_CONTROLLER_INFO;
+typedef __AW(DS_DOMAIN_TRUSTS) DS_DOMAIN_TRUSTS,*PDS_DOMAIN_TRUSTS;
+#define DsGetDcName __AW(DsGetDcName)
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
index 2f50f47..caeb524 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DSHOW_H
 #define _DSHOW_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #include <strmif.h>
 #include <amaudio.h>
index 2a0b721..a206c87 100644 (file)
 #ifndef _DSQUERY_H
 #define _DSQUERY_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*--- Active Directory Reference - Active Directory Structures - Active Directory Display Structures */
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 typedef struct {
        DWORD dwFlags;
        INT fmt;
@@ -71,7 +72,7 @@ typedef struct {
        DWORD dwReserved;
        DSCOLUMN aColumns[1];
 } DSQUERYPARAMS,*LPDSQUERYPARAMS;
-#endif /* (_WIN32_WINNT >= 0x0500) */
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
index 5e3df02..2930e30 100644 (file)
 #ifndef _DSROLE_H
 #define _DSROLE_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 /*--- Active Directory Reference - Active Directory Enumerations */
 typedef enum {
        DsRole_RoleStandaloneWorkstation,
@@ -74,7 +75,7 @@ typedef struct _DSROLE_UPGRADE_STATUS_INFO {
        ULONG OperationState;
        DSROLE_SERVER_STATE PreviousServerState;
 } DSROLE_UPGRADE_STATUS_INFO,*PDSROLE_UPGRADE_STATUS_INFO;
-#endif /* (_WIN32_WINNT >= 0x0500) */
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
index 1adb388..9768f6e 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DVDEVCOD_H
 #define _DVDEVCOD_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
index faea42a..a7a86e5 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _DVDMEDIA_H
 #define _DVDMEDIA_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #include <strmif.h>
 
index f3f813b..4d994cb 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _EDEVDEFS_H
 #define _EDEVDEFS_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #define ED_TOP 0x00000001
 #define ED_MIDDLE 0x00000002
index dd42ca6..287f7b5 100644 (file)
 #ifndef _ERRNO_H_
 #define        _ERRNO_H_
 #pragma GCC system_header
+#include <_mingw.h>
 
 /* 
  * Error numbers and access to error reporting.
  */
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 /*
  * Error numbers.
  * TODO: Can't be sure of some of these assignments, I guessed from the
index 45ed667..f97b002 100644 (file)
 #ifndef _ERRORREP_H
 #define _ERRORREP_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#if (_WIN32_WINNT >= 0x0501)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
 typedef enum {
        frrvErr = 3,
        frrvErrNoDW = 4,
@@ -43,16 +44,7 @@ typedef enum {
 BOOL WINAPI AddERExcludedApplicationA(LPCSTR);
 BOOL WINAPI AddERExcludedApplicationW(LPCWSTR);
 EFaultRepRetVal WINAPI ReportFault(LPEXCEPTION_POINTERS,DWORD);
-#endif
-
-#ifdef UNICODE
-#if (_WIN32_WINNT >= 0x0501)
-#define AddERExcludedApplication AddERExcludedApplicationW
-#endif
-#else
-#if (_WIN32_WINNT >= 0x0501)
-#define AddERExcludedApplication AddERExcludedApplicationA
-#endif
+#define AddERExcludedApplication __AW(AddERExcludedApplication)
 #endif
 
 #ifdef __cplusplus
index e296abd..23d29de 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _ERRORS_H
 #define _ERRORS_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -178,11 +179,7 @@ extern "C" {
 /*--- DirectShow Reference - Functions */
 DWORD WINAPI AMGetErrorTextA(HRESULT,CHAR*,DWORD);
 DWORD WINAPI AMGetErrorTextW(HRESULT,WCHAR*,DWORD);
-#ifdef UNICODE
-#define AMGetErrorText AMGetErrorTextW
-#else
-#define AMGetErrorText AMGetErrorTextA
-#endif
+#define AMGetErrorText __AW(AMGetErrorText)
 
 #ifdef __cplusplus
 }
index 89d34a2..5d4ed8a 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _EVCODE_H
 #define _EVCODE_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
index 93f44e0..b82acd8 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef        _EXCPT_H_
 #define        _EXCPT_H_
 #pragma GCC system_header
+#include <_mingw.h>
 
 /*
  * Support for operating system level structured exception handling.
@@ -32,9 +33,6 @@
  *       completely Intel specific.
  */
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 #include <windef.h>
 
 /*
index 4681320..66d0fbc 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _EXDISP_H
 #define _EXDISP_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
index 980f044..6884c99 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _EXDISPID_H
 #define _EXDISPID_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #define DISPID_BEFORENAVIGATE2 250
 #define DISPID_NEWWINDOW2 251
index 0c5b2eb..5264bc3 100644 (file)
 #ifndef _FCNTL_H_
 #define _FCNTL_H_
 #pragma GCC system_header
+#include <_mingw.h>
 
 /*
  * Access constants for _open. Note that the permissions constants are
  * in sys/stat.h (ick).
  */
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 /*
  * It appears that fcntl.h should include io.h for compatibility...
  */
 #define        _O_BINARY       0x8000  /* Input and output is not translated. */
 #define        _O_RAW          _O_BINARY
 
-#if (__MSVCRT_VERSION__ >= 0x0800)
-#define _O_WTEXT       0x10000
-#define _O_U16TEXT     0x20000
-#define _O_U8TEXT      0x40000
-#endif
-
 #ifndef        _NO_OLDNAMES
 
 /* POSIX/Non-ANSI names for increased portability */
 
 #endif /* Not _NO_OLDNAMES */
 
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN98)
+#define _O_WTEXT       0x10000
+#define _O_U16TEXT     0x20000
+#define _O_U8TEXT      0x40000
+#endif
+
 #endif /* Not _FCNTL_H_ */
index 91e0549..7865d83 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef _FENV_H_
 #define _FENV_H_
 #pragma GCC system_header
-
 #include <_mingw.h>
 
 /* FPU status word exception flags */
index 7b93660..0a4a383 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _MINGW_FLOAT_H_
 #define _MINGW_FLOAT_H_
 #pragma GCC system_header
+#include <_mingw.h>
 
 /* 
  * Constants related to floating point arithmetic.
@@ -55,9 +56,6 @@
 # include_next <float.h>
 #endif
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 /*
  * Functions and definitions for controlling the FPU.
  */
index 0bc8d80..33cda47 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _FLTDEFS_H
 #define _FLTDEFS_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 /*
  * Routing and Remote Access Services
@@ -34,7 +35,7 @@ extern "C" {
 #endif
 
 /*--- Packet Filtering Reference - Packet Filtering Enumerated Types */
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 typedef enum _GlobalFilter {
        GF_FRAGMENTS = 2,
        GF_STRONGHOST = 8,
@@ -53,7 +54,7 @@ typedef enum _PfFrameType {
        PFFT_FRAG = 2,
        PFFT_SPOOF = 3
 } PFFRAMETYPE,*PPFFRAMETYPE;
-#endif /* (_WIN32_WINNT >= 0x0500) */
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
index c7b758f..929f3cc 100644 (file)
 #ifndef _GETOPT_H
 #define _GETOPT_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 /* 
  * Defines constants and function prototypes required to implement
  * the `getopt', `getopt_long' and `getopt_long_only' APIs.
  */
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index d9fcef9..933253f 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _HTTPEXT_H
 #define _HTTPEXT_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 /*
  * ISAPI extensions.
index 2d70ce3..dfd8f4c 100644 (file)
@@ -53,6 +53,9 @@
  * http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
  */
 #define _WIN32_WINNT_NT4          0x0400
+#define _WIN32_WINNT_WIN95       0x0400
+#define _WIN32_WINNT_WIN98       0x0401
+#define _WIN32_WINNT_WINME       0x0402
 #define _WIN32_WINNT_WIN2K        0x0500
 #define _WIN32_WINNT_WINXP        0x0501
 #define _WIN32_WINNT_WS03         0x0502