diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 75313630d8..42bc28cd00 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -78,6 +78,9 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; || ( defined(__MINGW32__) && !defined(__WINE__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \ || ( defined(__MWERKS__) && defined(__WXMSW__) ) // functions +#ifdef __BORLANDC__ + #define _tell tell +#endif #define wxClose _close #define wxRead _read #define wxWrite _write @@ -89,7 +92,11 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; #if wxUSE_UNICODE #if wxUSE_UNICODE_MSLU - #define wxOpen wxMSLU__wopen +#ifdef __BORLANDC__ + #define wxOpen open +#else + #define wxOpen _open +#endif #define wxAccess wxMSLU__waccess #define wxMkDir wxMSLU__wmkdir #define wxRmDir wxMSLU__wrmdir @@ -113,14 +120,16 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; #define wxStructStat struct _stat // constants (unless already defined by the user code) - #ifndef O_RDONLY + #if !defined(O_RDONLY) && !defined(__BORLANDC__) #define O_RDONLY _O_RDONLY #define O_WRONLY _O_WRONLY #define O_RDWR _O_RDWR #define O_EXCL _O_EXCL #define O_CREAT _O_CREAT #define O_BINARY _O_BINARY + #endif + #ifndef __BORLANDC__ #define S_IFMT _S_IFMT #define S_IFDIR _S_IFDIR #define S_IFREG _S_IFREG diff --git a/include/wx/msw/mslu.h b/include/wx/msw/mslu.h index e9ed1ce901..e8700dd40c 100644 --- a/include/wx/msw/mslu.h +++ b/include/wx/msw/mslu.h @@ -58,7 +58,8 @@ WXDLLEXPORT int wxMSLU__tremove(const wxChar *name); #if defined( __VISUALC__ ) \ || ( 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__waccess(const wxChar *name, int mode); WXDLLEXPORT int wxMSLU__wmkdir(const wxChar *name); diff --git a/src/msw/mslu.cpp b/src/msw/mslu.cpp index be480f683f..d4bfce13e5 100644 --- a/src/msw/mslu.cpp +++ b/src/msw/mslu.cpp @@ -18,6 +18,7 @@ #ifdef __BORLANDC__ #pragma hdrstop +#include