git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14681
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// for the compilers which have Unicode version of _getcwd(), call it
// directly, for the others call the ANSI version and do the translation
#if !wxUSE_UNICODE
// for the compilers which have Unicode version of _getcwd(), call it
// directly, for the others call the ANSI version and do the translation
#if !wxUSE_UNICODE
- #if !defined(HAVE_WGETCWD) || wxUSE_UNICODE_MSLU
+ #if !defined(HAVE_WGETCWD) || wxUSE_UNICODE_MSLU
wxCharBuffer c_buffer(sz);
wxCharBuffer c_buffer(sz);
- char *cbuf = (char*)(const char*)c_buffer;
- #endif
+ char *cbuf = (char*)(const char*)c_buffer;
+ #endif
- #if wxUSE_UNICODE_MSLU
- if ( wxGetOsVersion() != wxWIN95 )
+ #if wxUSE_UNICODE_MSLU
+ if ( wxGetOsVersion() != wxWIN95 )
#else
char *cbuf = NULL; // never really used because needsANSI will always be FALSE
#else
char *cbuf = NULL; // never really used because needsANSI will always be FALSE
- #endif
- {
- ok = _wgetcwd(buf, sz) != NULL;
- needsANSI = FALSE;
- }
+ #endif
+ {
+ ok = _wgetcwd(buf, sz) != NULL;
+ needsANSI = FALSE;
+ }
#ifdef _MSC_VER
ok = _getcwd(cbuf, sz) != NULL;
#elif defined(__WXMAC__) && !defined(__DARWIN__)
#ifdef _MSC_VER
ok = _getcwd(cbuf, sz) != NULL;
#elif defined(__WXMAC__) && !defined(__DARWIN__)
#else // !Win32/VC++ !Mac !OS2
ok = getcwd(cbuf, sz) != NULL;
#endif // platform
#else // !Win32/VC++ !Mac !OS2
ok = getcwd(cbuf, sz) != NULL;
#endif // platform
+
+ #if wxUSE_UNICODE
+ // finally convert the result to Unicode if needed
+ wxConvFile.MB2WC(buf, cbuf, sz);
+ #endif // wxUSE_UNICODE
+ }
wxString pathUnix = buf;
cygwin_conv_to_full_win32_path(pathUnix, buf);
#endif // __CYGWIN__
wxString pathUnix = buf;
cygwin_conv_to_full_win32_path(pathUnix, buf);
#endif // __CYGWIN__
-
- // finally convert the result to Unicode if needed
-#if wxUSE_UNICODE
- wxConvFile.MB2WC(buf, cbuf, sz);
-#endif // wxUSE_UNICODE
}
return buf;
#if !wxUSE_UNICODE
}
return buf;
#if !wxUSE_UNICODE