]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
Applied patch [ 619386 ] uxtheme.dll support
[wxWidgets.git] / src / common / filefn.cpp
index f6d5b9d69ff5def30a23ed614504705b8efaaca2..de78ad948a3e52ecd6ae72037363d342b1562c46 100644 (file)
     #include <windows.h>
     #include "wx/msw/mslu.h"
 
+    // for _getcwd
+    #ifdef __MINGW32__
+        #include <io.h>
+    #endif
+
     // sys/cygwin.h is needed for cygwin_conv_to_full_win32_path()
     //
     // note that it must be included after <windows.h>
         #ifdef __CYGWIN__
             #include <sys/cygwin.h>
         #endif
-
-        #ifndef __TWIN32__
-            #include <sys/unistd.h>
-        #endif
     #endif // __GNUWIN32__
 #endif // __WINDOWS__
 
@@ -1497,7 +1498,7 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
     if ( needsANSI )
 #endif // wxUSE_UNICODE
     {
-    #ifdef _MSC_VER
+    #if defined(_MSC_VER) || defined(__MINGW32__)
         ok = _getcwd(cbuf, sz) != NULL;
     #elif defined(__WXMAC__) && !defined(__DARWIN__)
         FSSpec cwdSpec ;