From e02e8816c7a9be2082f914f6d53fcdba0d7d5416 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Mon, 28 Jan 2002 22:37:48 +0000 Subject: [PATCH] Fix MinGW compilation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/filefn.h | 4 ++-- src/common/filefn.cpp | 8 +++++--- src/msw/settings.cpp | 1 + src/msw/utils.cpp | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/wx/filefn.h b/include/wx/filefn.h index dff1b66eee..e590ff3fe8 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -270,13 +270,13 @@ WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0); #define wxPATH_SEP_MAC wxT(";") // platform independent versions -#if defined(__UNIX__) && !defined(__GNUWIN32__) +#if defined(__UNIX__) && !defined(__CYGWIN__) #define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX #define wxPATH_SEP wxPATH_SEP_UNIX #elif defined(__MAC__) #define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC #define wxPATH_SEP wxPATH_SEP_MAC -#elif defined(__GNUWIN32__) // Cygwin +#elif defined(__CYGWIN__) // Cygwin #define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS #define wxPATH_SEP wxPATH_SEP_UNIX #else // Windows and OS/2 diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index cfc915390c..583c0711b3 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -119,7 +119,9 @@ // // note that it must be included after #ifdef __GNUWIN32__ - #include + #ifdef __CYGWIN__ + #include + #endif #include #ifndef __TWIN32__ #include @@ -1461,11 +1463,11 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) } #endif // __DJGPP__ -#ifdef __GNUWIN32__ +#ifdef __CYGWIN__ // another example of DOS/Unix mix (Cygwin) wxString pathUnix = buf; cygwin_conv_to_full_win32_path(pathUnix, buf); -#endif // __GNUWIN32__ +#endif // __CYGWIN__ // finally convert the result to Unicode if needed #if wxUSE_UNICODE && !defined(HAVE_WGETCWD) diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 85d8b311f4..b2788d0aae 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -25,6 +25,7 @@ #endif #ifndef WX_PRECOMP + #include "wx/utils.h" #include "wx/gdicmn.h" #endif diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 6d23a03728..00ea5c39eb 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -61,7 +61,7 @@ extern "C" { #endif #endif //GNUWIN32 -#if defined(__GNUWIN32__) && !defined(__TWIN32__) +#if defined(__CYGWIN__) && !defined(__TWIN32__) #include #include #include // for cygwin_conv_to_full_win32_path() @@ -374,7 +374,7 @@ const wxChar* wxGetHomeDir(wxString *pstr) if ( strDir.Last() != wxT('/') ) strDir << wxT('/'); - #ifdef __GNUWIN32__ + #ifdef __CYGWIN__ // Cygwin returns unix type path but that does not work well static wxChar windowsPath[MAX_PATH]; cygwin_conv_to_full_win32_path(strDir, windowsPath); -- 2.45.2