Do not #define __WIN95__, __WINDOWS__, __WXMSW__ on the command line for
Cygwin/MinGW (when build with makefiles), since platform.h already does
that for us.
Always check for __WIN32__, not for WIN32 or _WIN32 (just for
consistency).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18793
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
// Watcom 11+ supports bool
#define HAVE_BOOL
#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
// Watcom 11+ supports bool
#define HAVE_BOOL
- #elif defined(__GNUWIN32__)
+ #elif defined(__GNUWIN32__) || defined(__MINGW32__) || defined(__CYGWIN__)
// Cygwin supports bool
#define HAVE_BOOL
#elif defined(__VISAGECPP__)
// Cygwin supports bool
#define HAVE_BOOL
#elif defined(__VISAGECPP__)
#define wxDibFlipY(lpbi, y) ((int)(lpbi)->biHeight-1-(y))
//HACK for NT BI_BITFIELDS DIBs
#define wxDibFlipY(lpbi, y) ((int)(lpbi)->biHeight-1-(y))
//HACK for NT BI_BITFIELDS DIBs
#define wxDibPtr(lpbi) ((lpbi)->biCompression == BI_BITFIELDS \
? (LPVOID)(wxDibColors(lpbi) + 3) \
: (LPVOID)(wxDibColors(lpbi) + (UINT)(lpbi)->biClrUsed))
#define wxDibPtr(lpbi) ((lpbi)->biCompression == BI_BITFIELDS \
? (LPVOID)(wxDibColors(lpbi) + 3) \
: (LPVOID)(wxDibColors(lpbi) + (UINT)(lpbi)->biClrUsed))
first define Windows symbols if they're not defined on the command line: we
can autodetect everything we need if _WIN32 is defined
*/
first define Windows symbols if they're not defined on the command line: we
can autodetect everything we need if _WIN32 is defined
*/
+#if defined(__CYGWIN32__) && !defined(__WXMOTIF__) && !defined(__WXGTK__) \
+ && !defined(__WXX11__)
+ /* for Cygwin, default to wxMSW unless otherwise specified */
+ #ifndef __WXMSW__
+ #define __WXMSW__
+ #endif
+
+ #ifndef _WIN32
+ #define _WIN32
+ #endif
+
+ #ifndef WIN32
+ #define WIN32
+ #endif
+#endif
+
#if defined(_WIN32) || defined(WIN32) || defined(__NT__) || defined(__WXWINCE__)
#ifndef __WXMSW__
#define __WXMSW__
#if defined(_WIN32) || defined(WIN32) || defined(__NT__) || defined(__WXWINCE__)
#ifndef __WXMSW__
#define __WXMSW__
# Add "-mthreads" if you want to have threads under mingw32
# Add "-mno-cygwin" if you want to link with msvcrt.dll in Cywin and Wine
# Add "-mthreads" if you want to have threads under mingw32
# Add "-mno-cygwin" if you want to link with msvcrt.dll in Cywin and Wine
-# Otherwise, you link against the native runtime (cygwin.dll or libc)
-# Having the flag in mingw32 does not hurt as you always link against msvcrt.dll
-# By default it should be on, to minimize dependencies on Cygwin, and
-# have more correct filename behaviour in Wine.
+# Otherwise, you link against the native runtime (cygwin.dll
+# or libc). Having the flag in mingw32 does not hurt as you
+# always link against msvcrt.dll By default it should be on,
+# to minimize dependencies on Cygwin, and have more correct
+# filename behaviour in Wine.
COMMON_FLAGS = -mno-cygwin # -mthreads
# Debugging information
COMMON_FLAGS = -mno-cygwin # -mthreads
# Debugging information
else
APPVER=4.0 # 3.50
# This means 'enable Windows 95 features' (in wxWindows and in the compiler).
else
APPVER=4.0 # 3.50
# This means 'enable Windows 95 features' (in wxWindows and in the compiler).
-WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__
+WINVERSION=-DWINVER=0x0400 -D__GNUWIN32__
endif
# This is never used and should be expunged.
endif
# This is never used and should be expunged.
# build wxbase/wxMSW
ifeq ($(wxUSE_GUI),1)
TOOLKIT=msw
# build wxbase/wxMSW
ifeq ($(wxUSE_GUI),1)
TOOLKIT=msw
- GUI = -D__WXMSW__ -D__WINDOWS__
- GUI = -D__WXMSW__ -D__WINDOWS__ -DwxUSE_GUI=0
BASELIBS=-lstdc++ -lgcc -lodbc32 -lwsock32
ifeq ($(wxUSE_GUI),1)
WINLIBS= $(BASELIBS) \
BASELIBS=-lstdc++ -lgcc -lodbc32 -lwsock32
ifeq ($(wxUSE_GUI),1)
WINLIBS= $(BASELIBS) \
- -lwinspool -lwinmm -lshell32 \
- -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
- -lodbc32 -lwsock32 -lopengl32 -lglu32 $(OLELIBS) # -loldnames
+ -lwinspool -lwinmm -lshell32 \
+ -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
+ -lodbc32 -lwsock32 -lopengl32 -lglu32 $(OLELIBS) # -loldnames
else
WINLIBS=$(BASELIBS)
endif
#WINLIBS=-lstdc++ -lgcc \
else
WINLIBS=$(BASELIBS)
endif
#WINLIBS=-lstdc++ -lgcc \
-# -lwinspool -lwinmm -lshell32 \
+# -lwinspool -lwinmm -lshell32 \
# -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames
# Shouldn't need to change these...
# -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames
# Shouldn't need to change these...
-#if defined(WIN32) || defined(_WIN32)
#define GetCurrentInstance() GetModuleHandle(NULL)
#else
#define GetCurrentInstance() (HINSTANCE)SELECTOROF((LPVOID)&of)
#define GetCurrentInstance() GetModuleHandle(NULL)
#else
#define GetCurrentInstance() (HINSTANCE)SELECTOROF((LPVOID)&of)
{
// avoids warning about statement with no effect (FreeProcInstance
// doesn't do anything under Win32)
{
// avoids warning about statement with no effect (FreeProcInstance
// doesn't do anything under Win32)
-#if !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(__NT__) && !defined(__GNUWIN32__)
+#if !defined(__WIN32__) && !defined(__NT__)
FreeProcInstance((FARPROC) m_lpAbortProc);
#endif
}
FreeProcInstance((FARPROC) m_lpAbortProc);
#endif
}
// avoids warning about statement with no effect (FreeProcInstance
// doesn't do anything under Win32)
// avoids warning about statement with no effect (FreeProcInstance
// doesn't do anything under Win32)
-#if !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(__NT__) && !defined(__GNUWIN32__)
+#if !defined(__WIN32__) && !defined(__NT__)
FreeProcInstance(wxTheKeyboardHookProc);
#endif
}
FreeProcInstance(wxTheKeyboardHookProc);
#endif
}