]> git.saurik.com Git - wxWidgets.git/commitdiff
unicode and __MACH__ additions for wxMac
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 29 Mar 2003 15:50:13 +0000 (15:50 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 29 Mar 2003 15:50:13 +0000 (15:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/cwy_tab.c
src/common/datetime.cpp
src/common/file.cpp
src/common/filefn.cpp
src/common/filename.cpp
src/common/log.cpp
src/common/utilscmn.cpp
src/common/variant.cpp
src/common/wxchar.cpp

index b83301066b290c02c4d288202f66195124118eaa..8cbbcb14c310f491e8a251099310f61d68a91a36 100644 (file)
@@ -29,13 +29,15 @@ int yyback(int *, int);
 #if __MSL__ < 0x6000
 int read( int , char * , int ) ;
 #else
+#ifndef __MACH__
 int _read( int , void * , size_t ) ;
 #define read _read
 #endif
+#endif
 #ifdef __WXMSW__
 //int fileno( FILE* ) ; This is defined in watcom
 #else
-#if __MSL__ < 0x6000
+#if __MSL__ < 0x6000L
 int fileno( void* ) ;
 #endif
 #endif
index 5ab055b3ccf5f6dd418751ed19c580434f2cb4b3..d796e6e12743cb498ad38cfd90c4ccc80993cfc4 100644 (file)
     #undef HAVE_STRPTIME
 #endif // broken strptime()
 
+#if defined(__MWERKS__) && wxUSE_UNICODE
+    #include <wtime.h>
+#endif
+
 #if !defined(WX_TIMEZONE) && !defined(WX_GMTOFF_IN_TM)
     #if defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__)
         #define WX_TIMEZONE _timezone
index 372c69246152991dc0c378b395f8794018880df4..04fd887a9383cef8849c980e3653b9134ba739e2 100644 (file)
 #include  <stdio.h>       // SEEK_xxx constants
 #include  <fcntl.h>       // O_RDONLY &c
 
-#if !defined(__MWERKS__) || defined(__WXMSW__)
+#ifndef __MWERKS__
+    #include  <sys/types.h>   // needed for stat
+    #include  <sys/stat.h>    // stat
+#elif defined(__MWERKS__) && ( defined(__WXMSW__) || defined(__MACH__) )
     #include  <sys/types.h>   // needed for stat
     #include  <sys/stat.h>    // stat
 #endif
index 7f54e8896d5d7d25de63ed324e3cee762a5b1453..d05fb1ecc3ba4d921f569b33b6af48646e4b525d 100644 (file)
 #ifndef __MWERKS__
     #include <sys/types.h>
     #include <sys/stat.h>
+#else
+#ifdef __MACH__
+#include <sys/types.h>
+#include <utime.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #else
     #include <stat.h>
     #include <unistd.h>
     #include <unix.h>
     #include <fcntl.h>
 #endif
+#endif
 
 #ifdef __UNIX__
     #include <unistd.h>
index 639e5363c3eeca932e0ce501eeeefab5c522193e..82efd1a6ae8e091640a385b24f42864af4638064 100644 (file)
 #endif
 
 #ifdef __MWERKS__
+#ifdef __MACH__
+#include <sys/types.h>
+#include <utime.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#else
 #include <stat.h>
 #include <unistd.h>
 #include <unix.h>
 #endif
+#endif
 
 #ifdef __WATCOMC__
 #include <io.h>
index 9214732ed839a4a80bdfea044152b860577c5660..02b83693bfc8bbc3f2dfc6ed0fdff2b76a8b616d 100644 (file)
   #include  "wx/mac/private.h"  // includes mac headers
 #endif
 
+#if defined(__MWERKS__) && wxUSE_UNICODE
+    #include <wtime.h>
+#endif
+
+
 // ----------------------------------------------------------------------------
 // non member functions
 // ----------------------------------------------------------------------------
index 2ba6e858302520c7d1b6df3e7fc196880bb4fc2c..ae8c7e79dc1349becec4e1f21bc2bde72cae63db 100644 (file)
@@ -801,13 +801,11 @@ wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit)
 // missing C RTL functions (FIXME shouldn't be here at all)
 // ----------------------------------------------------------------------------
 
-#ifdef __MWERKS__
-#if __MSL__ < 0x7000
+#if defined( __MWERKS__ ) && !defined(__MACH__)
 char *strdup(const char *s)
 {
         return strcpy( (char*) malloc( strlen( s ) + 1 ) , s ) ;
 }
-#endif
 int isascii( int c )
 {
         return ( c >= 0 && c < 128 ) ;
index c6a70f2a33c74f08411f48e8531d63d10f1a6670..7994a92651673a8e1a81b69a108d01c10d4393c6 100644 (file)
     #endif
 #endif
 
+#if defined(__MWERKS__) && __MSL__ >= 0x6000
+using namespace std ;
+#endif
+
 #if wxUSE_STREAMS
 #include "wx/stream.h"
 #include "wx/txtstrm.h"
index afff852e810621c44ac5de19bc3c636ee7c15143..7e6c8f21f4146dd90f5f299df2faa07a867022f5 100644 (file)
   #include <winnt.h>
 #endif
 
+#if defined(__MWERKS__) && __MSL__ >= 0x6000
+using namespace std ;
+#endif
+
 #if wxUSE_WCHAR_T
 size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
 {
@@ -848,11 +852,7 @@ int wxFscanf( FILE *stream, const wxChar *format, ... )
 {
     va_list argptr;
     va_start(argptr, format);
-#ifdef __WXMAC__ 
-    int ret = ::vfwscanf(stream, wxFormatConverter(format), argptr);
-#else
     int ret = vfwscanf(stream, wxFormatConverter(format), argptr);
-#endif
 
     va_end(argptr);