Fix MinGW compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -270,13 +270,13 @@ WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0);
|
|||||||
#define wxPATH_SEP_MAC wxT(";")
|
#define wxPATH_SEP_MAC wxT(";")
|
||||||
|
|
||||||
// platform independent versions
|
// platform independent versions
|
||||||
#if defined(__UNIX__) && !defined(__GNUWIN32__)
|
#if defined(__UNIX__) && !defined(__CYGWIN__)
|
||||||
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
|
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
|
||||||
#define wxPATH_SEP wxPATH_SEP_UNIX
|
#define wxPATH_SEP wxPATH_SEP_UNIX
|
||||||
#elif defined(__MAC__)
|
#elif defined(__MAC__)
|
||||||
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC
|
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC
|
||||||
#define wxPATH_SEP wxPATH_SEP_MAC
|
#define wxPATH_SEP wxPATH_SEP_MAC
|
||||||
#elif defined(__GNUWIN32__) // Cygwin
|
#elif defined(__CYGWIN__) // Cygwin
|
||||||
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS
|
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS
|
||||||
#define wxPATH_SEP wxPATH_SEP_UNIX
|
#define wxPATH_SEP wxPATH_SEP_UNIX
|
||||||
#else // Windows and OS/2
|
#else // Windows and OS/2
|
||||||
|
@@ -119,7 +119,9 @@
|
|||||||
//
|
//
|
||||||
// note that it must be included after <windows.h>
|
// note that it must be included after <windows.h>
|
||||||
#ifdef __GNUWIN32__
|
#ifdef __GNUWIN32__
|
||||||
|
#ifdef __CYGWIN__
|
||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
|
#endif
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#ifndef __TWIN32__
|
#ifndef __TWIN32__
|
||||||
#include <sys/unistd.h>
|
#include <sys/unistd.h>
|
||||||
@@ -1461,11 +1463,11 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
|
|||||||
}
|
}
|
||||||
#endif // __DJGPP__
|
#endif // __DJGPP__
|
||||||
|
|
||||||
#ifdef __GNUWIN32__
|
#ifdef __CYGWIN__
|
||||||
// another example of DOS/Unix mix (Cygwin)
|
// another example of DOS/Unix mix (Cygwin)
|
||||||
wxString pathUnix = buf;
|
wxString pathUnix = buf;
|
||||||
cygwin_conv_to_full_win32_path(pathUnix, buf);
|
cygwin_conv_to_full_win32_path(pathUnix, buf);
|
||||||
#endif // __GNUWIN32__
|
#endif // __CYGWIN__
|
||||||
|
|
||||||
// finally convert the result to Unicode if needed
|
// finally convert the result to Unicode if needed
|
||||||
#if wxUSE_UNICODE && !defined(HAVE_WGETCWD)
|
#if wxUSE_UNICODE && !defined(HAVE_WGETCWD)
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/utils.h"
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif //GNUWIN32
|
#endif //GNUWIN32
|
||||||
|
|
||||||
#if defined(__GNUWIN32__) && !defined(__TWIN32__)
|
#if defined(__CYGWIN__) && !defined(__TWIN32__)
|
||||||
#include <sys/unistd.h>
|
#include <sys/unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/cygwin.h> // for cygwin_conv_to_full_win32_path()
|
#include <sys/cygwin.h> // for cygwin_conv_to_full_win32_path()
|
||||||
@@ -374,7 +374,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
|
|||||||
if ( strDir.Last() != wxT('/') )
|
if ( strDir.Last() != wxT('/') )
|
||||||
strDir << wxT('/');
|
strDir << wxT('/');
|
||||||
|
|
||||||
#ifdef __GNUWIN32__
|
#ifdef __CYGWIN__
|
||||||
// Cygwin returns unix type path but that does not work well
|
// Cygwin returns unix type path but that does not work well
|
||||||
static wxChar windowsPath[MAX_PATH];
|
static wxChar windowsPath[MAX_PATH];
|
||||||
cygwin_conv_to_full_win32_path(strDir, windowsPath);
|
cygwin_conv_to_full_win32_path(strDir, windowsPath);
|
||||||
|
Reference in New Issue
Block a user