]> git.saurik.com Git - wxWidgets.git/commitdiff
Unicode fixes for Watcom (part of patch 813225)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 30 Sep 2003 12:41:46 +0000 (12:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 30 Sep 2003 12:41:46 +0000 (12:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h
include/wx/filefn.h
include/wx/log.h

index 04e4eb439d64ce1981d6ab7a70ffe49916f2aa2c..1309723ae5167259dd881f31069b66d09754e200 100644 (file)
@@ -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 <iostream> code.
 #if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
index 2acd4857c446a254eb22e9c148dde65b04988a85..b0daaceef509aa7c823e42cb14f1e0a7865c9bc2 100644 (file)
@@ -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
index 758c44e6e83ed355c05ad4499a736b9bdf853f93..a2670f451d9f80f17b1a62fe35333b8614fa2887 100644 (file)
@@ -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++