From 3d94765e6ee6011ac8e4ecfd81760a127aa3e716 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Thu, 16 Jun 2005 13:58:23 +0000 Subject: [PATCH 1/1] Let Cygwin be a Windows build for wxMSW and a unix build otherwise git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 1 + configure.in | 1 + include/wx/dlimpexp.h | 3 +++ include/wx/platform.h | 8 ++++---- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 1b3409e752..79c9028f57 100755 --- a/configure +++ b/configure @@ -10562,6 +10562,7 @@ case "${host}" in *-*-cygwin*) if test "$wxUSE_MSW" = 1 ; then wants_win32=1 + BAKEFILE_FORCE_PLATFORM=win32 else doesnt_want_win32=1 fi diff --git a/configure.in b/configure.in index 1ed4c4bcd8..76cc44cf5a 100644 --- a/configure.in +++ b/configure.in @@ -1328,6 +1328,7 @@ case "${host}" in *-*-cygwin*) if test "$wxUSE_MSW" = 1 ; then wants_win32=1 + BAKEFILE_FORCE_PLATFORM=win32 else doesnt_want_win32=1 fi diff --git a/include/wx/dlimpexp.h b/include/wx/dlimpexp.h index 6bdfbf458b..16e58d4974 100644 --- a/include/wx/dlimpexp.h +++ b/include/wx/dlimpexp.h @@ -48,6 +48,9 @@ # define WXEXPORT __declspec(export) # define WXIMPORT __declspec(import) # endif +#elif defined(__CYGWIN__) +# define WXEXPORT __declspec(dllexport) +# define WXIMPORT __declspec(dllimport) #endif /* for other platforms/compilers we don't anything */ diff --git a/include/wx/platform.h b/include/wx/platform.h index 6bb277a2bf..4df0aa5ab4 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -57,9 +57,9 @@ 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 */ +#if defined(__CYGWIN__) && defined(__WINDOWS__) + /* for Cygwin, a build of wxMSW, or a build with -mno-cygwin is treated + * as a Windows build. Otherwise it is treated as a unix compiler. */ # ifndef __WXMSW__ # define __WXMSW__ # endif @@ -499,7 +499,7 @@ at least maj.min */ #if ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \ - defined( __CYGWIN__ ) || \ + ( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \ (defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \ !defined(__DOS__) && \ !defined(__WXMOTIF__) && \ -- 2.47.2