Under Cygwin, in platform.h default to wxMSW unless otherwise specified.
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
This commit is contained in:
@@ -156,7 +156,7 @@
|
||||
#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__)
|
||||
|
@@ -88,7 +88,7 @@ PDIB wxDibReadBitmapInfo(HFILE fh);
|
||||
#define wxDibFlipY(lpbi, y) ((int)(lpbi)->biHeight-1-(y))
|
||||
|
||||
//HACK for NT BI_BITFIELDS DIBs
|
||||
#ifdef WIN32
|
||||
#ifdef __WIN32__
|
||||
#define wxDibPtr(lpbi) ((lpbi)->biCompression == BI_BITFIELDS \
|
||||
? (LPVOID)(wxDibColors(lpbi) + 3) \
|
||||
: (LPVOID)(wxDibColors(lpbi) + (UINT)(lpbi)->biClrUsed))
|
||||
|
@@ -18,6 +18,22 @@
|
||||
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__
|
||||
|
@@ -218,10 +218,11 @@ OPTIONS = -DSTRICT $(_USE_W32API_HEADER_IF_SUPPORTED)
|
||||
|
||||
# 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
|
||||
@@ -240,7 +241,7 @@ WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ # Generic WIN32
|
||||
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.
|
||||
@@ -261,10 +262,10 @@ WARN = -Wall
|
||||
# build wxbase/wxMSW
|
||||
ifeq ($(wxUSE_GUI),1)
|
||||
TOOLKIT=msw
|
||||
GUI = -D__WXMSW__ -D__WINDOWS__
|
||||
GUI =
|
||||
else
|
||||
TOOLKIT=base
|
||||
GUI = -D__WXMSW__ -D__WINDOWS__ -DwxUSE_GUI=0
|
||||
GUI = -DwxUSE_GUI=0
|
||||
endif
|
||||
|
||||
ifeq ($(FINAL),1)
|
||||
@@ -290,15 +291,15 @@ OLELIBS=-lole32 -loleaut32 -luuid
|
||||
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 \
|
||||
# -lwinspool -lwinmm -lshell32 \
|
||||
# -lwinspool -lwinmm -lshell32 \
|
||||
# -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames
|
||||
|
||||
# Shouldn't need to change these...
|
||||
|
@@ -183,7 +183,7 @@ PDIB wxDibOpenFile(LPTSTR szFile)
|
||||
LPVOID p;
|
||||
OFSTRUCT of;
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#if defined(__WIN32__)
|
||||
#define GetCurrentInstance() GetModuleHandle(NULL)
|
||||
#else
|
||||
#define GetCurrentInstance() (HINSTANCE)SELECTOROF((LPVOID)&of)
|
||||
|
@@ -89,7 +89,7 @@ wxWindowsPrinter::~wxWindowsPrinter()
|
||||
{
|
||||
// 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
|
||||
}
|
||||
|
@@ -5025,7 +5025,7 @@ void wxSetKeyboardHook(bool doIt)
|
||||
|
||||
// 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
|
||||
}
|
||||
|
Reference in New Issue
Block a user