DOS+Watcom fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-12-05 17:03:33 +00:00
parent d2ce649bec
commit f48fa475c2

View File

@@ -77,6 +77,12 @@
#endif // __WINDOWS__ #endif // __WINDOWS__
#endif // native Win compiler #endif // native Win compiler
#if defined(__DOS__) && defined(__WATCOMC__)
#include <direct.h>
#include <dos.h>
#include <io.h>
#endif
#ifdef __GNUWIN32__ #ifdef __GNUWIN32__
#include <wchar.h> #include <wchar.h>
#ifndef __TWIN32__ #ifndef __TWIN32__
@@ -1186,7 +1192,7 @@ bool wxMkdir(const wxString& dir, int perm)
// assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too // assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too
// for the GNU compiler // for the GNU compiler
#if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) || defined(__WXMICROWIN__) #if (!(defined(__WXMSW__) || defined(__WXPM__) || defined(__DOS__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) || defined(__WXMICROWIN__)
if ( mkdir(wxFNCONV(dirname), perm) != 0 ) if ( mkdir(wxFNCONV(dirname), perm) != 0 )
#elif defined(__WXPM__) #elif defined(__WXPM__)
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's?? if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
@@ -1813,7 +1819,7 @@ wxString wxGetCwd()
bool wxSetWorkingDirectory(const wxString& d) bool wxSetWorkingDirectory(const wxString& d)
{ {
#if defined( __UNIX__ ) || defined( __WXMAC__ ) #if defined(__UNIX__) || defined(__WXMAC__) || defined(__DOS__)
return (chdir(wxFNSTRINGCAST d.fn_str()) == 0); return (chdir(wxFNSTRINGCAST d.fn_str()) == 0);
#elif defined(__WXPM__) #elif defined(__WXPM__)
return (::DosSetCurrentDir((PSZ)d.c_str()) == 0); return (::DosSetCurrentDir((PSZ)d.c_str()) == 0);