From 18da7cf2922954ae6534821bec658c51fd200b21 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 30 Sep 2003 12:41:46 +0000 Subject: [PATCH] Unicode fixes for Watcom (part of patch 813225) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 4 ++++ include/wx/filefn.h | 13 +++++++++---- include/wx/log.h | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 04e4eb439d..1309723ae5 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -619,6 +619,10 @@ typedef int wxWindowID; #define except(x) catch(...) #endif // Metrowerks +#if defined(__WATCOMC__) + typedef short mode_t; +#endif + // where should i put this? we need to make sure of this as it breaks // the code. #if !wxUSE_IOSTREAMH && defined(__WXDEBUG__) diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 2acd4857c4..b0daaceef5 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -74,9 +74,10 @@ enum wxSeekMode // Microsoft compiler loves underscores, feed them to it #if defined( __VISUALC__ ) \ || ( defined(__MINGW32__) && !defined(__WINE__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \ - || ( defined(__MWERKS__) && defined(__WXMSW__) ) + || ( defined(__MWERKS__) && defined(__WXMSW__) ) \ + || ( defined(__WATCOMC__) && defined(__WXMSW__) ) // functions -#ifdef __BORLANDC__ +#if defined(__BORLANDC__) || defined(__WATCOMC__) #define _tell tell #endif #define wxClose _close @@ -116,10 +117,14 @@ enum wxSeekMode #endif // types +#if defined(__WATCOMC__)&& wxUSE_UNICODE + #define wxStructStat struct _wstat +#else #define wxStructStat struct _stat +#endif // constants (unless already defined by the user code) - #if !defined(O_RDONLY) && !defined(__BORLANDC__) + #if !defined(O_RDONLY) && !defined(__BORLANDC__) && !defined(__WATCOMC__) #define O_RDONLY _O_RDONLY #define O_WRONLY _O_WRONLY #define O_RDWR _O_RDWR @@ -128,7 +133,7 @@ enum wxSeekMode #define O_BINARY _O_BINARY #endif - #ifndef __BORLANDC__ + #if !defined(__BORLANDC__) && !defined(__WATCOMC__) #define S_IFMT _S_IFMT #define S_IFDIR _S_IFDIR #define S_IFREG _S_IFREG diff --git a/include/wx/log.h b/include/wx/log.h index 758c44e6e8..a2670f451d 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -530,8 +530,8 @@ wxSafeShowMessage(const wxString& title, const wxString& text); (long)rc, wxSysErrorMsg(rc)) #else // !VC++ #define wxLogApiError(api, rc) \ - wxLogDebug(wxT("In file %s at line %d: '%s' failed with " \ - "error 0x%08lx (%s)."), \ + wxLogDebug(wxT("In file %s at line %d: '%s' failed with ") \ + wxT("error 0x%08lx (%s)."), \ __TFILE__, __LINE__, api, \ (long)rc, wxSysErrorMsg(rc)) #endif // VC++/!VC++ -- 2.45.2