]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/gccpriv.h
3 Purpose: MinGW/Cygwin definitions
8 Copyright: (c) Vadim Zeitlin
9 Licence: wxWindows Licence
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
14 #ifndef _WX_MSW_GCCPRIV_H_
15 #define _WX_MSW_GCCPRIV_H_
17 #if defined(__MINGW32__) && !defined(__GNUWIN32__)
21 #if defined(__MINGW32__) && ( ( __GNUC__ > 2 ) || ( ( __GNUC__ == 2 ) && ( __GNUC_MINOR__ >= 95 ) ) )
25 #if defined( __MINGW32__ ) && !defined(__WINE__) && !defined( HAVE_W32API_H )
26 #if __MINGW32_MAJOR_VERSION >= 1
29 #elif defined( __CYGWIN__ ) && !defined( HAVE_W32API_H )
35 #if wxCHECK_WATCOM_VERSION(1,0)
39 /* check for MinGW/Cygwin w32api version ( releases >= 0.5, only ) */
40 #if defined( HAVE_W32API_H )
44 /* Watcom can't handle defined(xxx) here: */
45 #if defined(__W32API_MAJOR_VERSION) && defined(__W32API_MINOR_VERSION)
46 #define wxCHECK_W32API_VERSION( major, minor ) \
47 ( ( ( __W32API_MAJOR_VERSION > (major) ) \
48 || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor) ) ) )
50 #define wxCHECK_W32API_VERSION( major, minor ) (0)
53 /* Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which
54 are more ms-like (header author is Anders Norlander, hence the name) */
55 #if (defined(__MINGW32__) || defined(__CYGWIN__) || defined(__WINE__)) && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>=95)))
56 #ifndef wxUSE_NORLANDER_HEADERS
57 #define wxUSE_NORLANDER_HEADERS 1
60 #ifndef wxUSE_NORLANDER_HEADERS
61 #define wxUSE_NORLANDER_HEADERS 0
65 /* "old" GNUWIN32 is the one without Norlander's headers: it lacks the
66 standard Win32 headers and we define the used stuff ourselves for it
67 in wx/msw/gnuwin32/extra.h */
68 #if defined(__GNUC__) && !wxUSE_NORLANDER_HEADERS
69 #define __GNUWIN32_OLD__
73 #if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9))
77 /* Mingw runtime 1.0-20010604 has some missing _tXXXX functions,
78 so let's define them ourselves: */
79 #if defined(__GNUWIN32__) && wxCHECK_W32API_VERSION( 1, 0 ) \
80 && !wxCHECK_W32API_VERSION( 1, 1 )
83 #define _tsetlocale _wsetlocale
85 #define _tsetlocale setlocale
90 #define _tgetenv _wgetenv
92 #define _tgetenv getenv
97 #define _tfopen _wfopen
104 /* current (= before mingw-runtime 3.3) mingw32 headers forget to
105 define _puttchar, this will probably be fixed in the next versions but
106 for now do it ourselves
108 #if defined( __MINGW32__ ) && \
109 !wxCHECK_MINGW32_VERSION(3,3) && !defined( _puttchar )
111 #define _puttchar putwchar
113 #define _puttchar puttchar
118 /* _WX_MSW_GCCPRIV_H_ */