SF patch [ 708702 ] Wide character filename support for BCC

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Chris Elliott
2003-04-28 20:58:29 +00:00
parent 6cee329241
commit a3bb1d14a5
3 changed files with 20 additions and 4 deletions

View File

@@ -78,6 +78,9 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|| ( defined(__MINGW32__) && !defined(__WINE__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \ || ( defined(__MINGW32__) && !defined(__WINE__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
|| ( defined(__MWERKS__) && defined(__WXMSW__) ) || ( defined(__MWERKS__) && defined(__WXMSW__) )
// functions // functions
#ifdef __BORLANDC__
#define _tell tell
#endif
#define wxClose _close #define wxClose _close
#define wxRead _read #define wxRead _read
#define wxWrite _write #define wxWrite _write
@@ -89,7 +92,11 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
#if wxUSE_UNICODE #if wxUSE_UNICODE
#if wxUSE_UNICODE_MSLU #if wxUSE_UNICODE_MSLU
#define wxOpen wxMSLU__wopen #ifdef __BORLANDC__
#define wxOpen open
#else
#define wxOpen _open
#endif
#define wxAccess wxMSLU__waccess #define wxAccess wxMSLU__waccess
#define wxMkDir wxMSLU__wmkdir #define wxMkDir wxMSLU__wmkdir
#define wxRmDir wxMSLU__wrmdir #define wxRmDir wxMSLU__wrmdir
@@ -113,14 +120,16 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
#define wxStructStat struct _stat #define wxStructStat struct _stat
// constants (unless already defined by the user code) // constants (unless already defined by the user code)
#ifndef O_RDONLY #if !defined(O_RDONLY) && !defined(__BORLANDC__)
#define O_RDONLY _O_RDONLY #define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY #define O_WRONLY _O_WRONLY
#define O_RDWR _O_RDWR #define O_RDWR _O_RDWR
#define O_EXCL _O_EXCL #define O_EXCL _O_EXCL
#define O_CREAT _O_CREAT #define O_CREAT _O_CREAT
#define O_BINARY _O_BINARY #define O_BINARY _O_BINARY
#endif
#ifndef __BORLANDC__
#define S_IFMT _S_IFMT #define S_IFMT _S_IFMT
#define S_IFDIR _S_IFDIR #define S_IFDIR _S_IFDIR
#define S_IFREG _S_IFREG #define S_IFREG _S_IFREG

View File

@@ -58,7 +58,8 @@ WXDLLEXPORT int wxMSLU__tremove(const wxChar *name);
#if defined( __VISUALC__ ) \ #if defined( __VISUALC__ ) \
|| ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \ || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
|| ( defined(__MWERKS__) && defined(__WXMSW__) ) || ( defined(__MWERKS__) && defined(__WXMSW__) ) \
|| ( defined(__BORLANDC__) && (__BORLANDC__ > 0x460) )
WXDLLEXPORT int wxMSLU__wopen(const wxChar *name, int flags, int mode); WXDLLEXPORT int wxMSLU__wopen(const wxChar *name, int flags, int mode);
WXDLLEXPORT int wxMSLU__waccess(const wxChar *name, int mode); WXDLLEXPORT int wxMSLU__waccess(const wxChar *name, int mode);
WXDLLEXPORT int wxMSLU__wmkdir(const wxChar *name); WXDLLEXPORT int wxMSLU__wmkdir(const wxChar *name);

View File

@@ -18,6 +18,7 @@
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#include <dir.h>
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
@@ -148,12 +149,17 @@ WXDLLEXPORT int wxMSLU__tremove(const wxChar *name)
#if defined( __VISUALC__ ) \ #if defined( __VISUALC__ ) \
|| ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \ || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
|| ( defined(__MWERKS__) && defined(__WXMSW__) ) || ( defined(__MWERKS__) && defined(__WXMSW__) ) \
|| ( defined(__BORLANDC__) && (__BORLANDC__ > 0x460) )
WXDLLEXPORT int wxMSLU__wopen(const wxChar *name, int flags, int mode) WXDLLEXPORT int wxMSLU__wopen(const wxChar *name, int flags, int mode)
{ {
if ( wxUsingUnicowsDll() ) if ( wxUsingUnicowsDll() )
#ifdef __BORLANDC__
return open(wxConvFile.cWX2MB(name), flags, mode);
#else
return _open(wxConvFile.cWX2MB(name), flags, mode); return _open(wxConvFile.cWX2MB(name), flags, mode);
#endif
else else
return _wopen(name, flags, mode); return _wopen(name, flags, mode);
} }