Applied [ 1767537 ] [wxOS2]Watcom build - filefn
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -155,7 +155,7 @@ enum wxFileKind
|
|||||||
#define wxRmDir _wrmdir
|
#define wxRmDir _wrmdir
|
||||||
#define wxStat _wstat
|
#define wxStat _wstat
|
||||||
#define wxStructStat struct _stat
|
#define wxStructStat struct _stat
|
||||||
#elif defined(__WXMSW__) && !defined(__WXPALMOS__) && \
|
#elif (defined(__WXMSW__) || defined(__OS2__)) && !defined(__WXPALMOS__) && \
|
||||||
( \
|
( \
|
||||||
defined(__VISUALC__) || \
|
defined(__VISUALC__) || \
|
||||||
(defined(__MINGW32__) && !defined(__WINE__) && \
|
(defined(__MINGW32__) && !defined(__WINE__) && \
|
||||||
|
@@ -158,7 +158,7 @@ WXDLLEXPORT int wxOpen( const wxChar *pathname, int flags, mode_t mode )
|
|||||||
// BCC 5.5 and 5.5.1 have a bug in _wopen where files are created read only
|
// BCC 5.5 and 5.5.1 have a bug in _wopen where files are created read only
|
||||||
// regardless of the mode parameter. This hack works around the problem by
|
// regardless of the mode parameter. This hack works around the problem by
|
||||||
// setting the mode with _wchmod.
|
// setting the mode with _wchmod.
|
||||||
//
|
//
|
||||||
int wxOpen(const wchar_t *pathname, int flags, mode_t mode)
|
int wxOpen(const wchar_t *pathname, int flags, mode_t mode)
|
||||||
{
|
{
|
||||||
int moreflags = 0;
|
int moreflags = 0;
|
||||||
@@ -1578,10 +1578,10 @@ bool wxSetWorkingDirectory(const wxString& d)
|
|||||||
if (d[1] == ':')
|
if (d[1] == ':')
|
||||||
{
|
{
|
||||||
::DosSetDefaultDisk(1 + wxToupper(d[0]) - _T('A'));
|
::DosSetDefaultDisk(1 + wxToupper(d[0]) - _T('A'));
|
||||||
// do not call DosSetCurrentDir when just changing drive,
|
// do not call DosSetCurrentDir when just changing drive,
|
||||||
// since it requires e.g. "d:." instead of "d:"!
|
// since it requires e.g. "d:." instead of "d:"!
|
||||||
if (d.length() == 2)
|
if (d.length() == 2)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return (::DosSetCurrentDir((PSZ)d.c_str()) == 0);
|
return (::DosSetCurrentDir((PSZ)d.c_str()) == 0);
|
||||||
#elif defined(__UNIX__) || defined(__WXMAC__) || defined(__DOS__)
|
#elif defined(__UNIX__) || defined(__WXMAC__) || defined(__DOS__)
|
||||||
@@ -1860,7 +1860,7 @@ bool wxIsWritable(const wxString &path)
|
|||||||
{
|
{
|
||||||
#if defined( __UNIX__ ) || defined(__OS2__)
|
#if defined( __UNIX__ ) || defined(__OS2__)
|
||||||
// access() will take in count also symbolic links
|
// access() will take in count also symbolic links
|
||||||
return access(wxConvFile.cWX2MB(path), W_OK) == 0;
|
return wxAccess(wxConvFile.cWX2MB(path), W_OK) == 0;
|
||||||
#elif defined( __WINDOWS__ )
|
#elif defined( __WINDOWS__ )
|
||||||
return wxCheckWin32Permission(path, GENERIC_WRITE);
|
return wxCheckWin32Permission(path, GENERIC_WRITE);
|
||||||
#else
|
#else
|
||||||
@@ -1874,7 +1874,7 @@ bool wxIsReadable(const wxString &path)
|
|||||||
{
|
{
|
||||||
#if defined( __UNIX__ ) || defined(__OS2__)
|
#if defined( __UNIX__ ) || defined(__OS2__)
|
||||||
// access() will take in count also symbolic links
|
// access() will take in count also symbolic links
|
||||||
return access(wxConvFile.cWX2MB(path), R_OK) == 0;
|
return wxAccess(wxConvFile.cWX2MB(path), R_OK) == 0;
|
||||||
#elif defined( __WINDOWS__ )
|
#elif defined( __WINDOWS__ )
|
||||||
return wxCheckWin32Permission(path, GENERIC_READ);
|
return wxCheckWin32Permission(path, GENERIC_READ);
|
||||||
#else
|
#else
|
||||||
@@ -1888,7 +1888,7 @@ bool wxIsExecutable(const wxString &path)
|
|||||||
{
|
{
|
||||||
#if defined( __UNIX__ ) || defined(__OS2__)
|
#if defined( __UNIX__ ) || defined(__OS2__)
|
||||||
// access() will take in count also symbolic links
|
// access() will take in count also symbolic links
|
||||||
return access(wxConvFile.cWX2MB(path), X_OK) == 0;
|
return wxAccess(wxConvFile.cWX2MB(path), X_OK) == 0;
|
||||||
#elif defined( __WINDOWS__ )
|
#elif defined( __WINDOWS__ )
|
||||||
return wxCheckWin32Permission(path, GENERIC_EXECUTE);
|
return wxCheckWin32Permission(path, GENERIC_EXECUTE);
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user