unicode and __MACH__ additions for wxMac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-03-29 15:50:13 +00:00
parent 1940f66914
commit 31907d0307
9 changed files with 39 additions and 9 deletions

View File

@@ -29,13 +29,15 @@ int yyback(int *, int);
#if __MSL__ < 0x6000 #if __MSL__ < 0x6000
int read( int , char * , int ) ; int read( int , char * , int ) ;
#else #else
#ifndef __MACH__
int _read( int , void * , size_t ) ; int _read( int , void * , size_t ) ;
#define read _read #define read _read
#endif #endif
#endif
#ifdef __WXMSW__ #ifdef __WXMSW__
//int fileno( FILE* ) ; This is defined in watcom //int fileno( FILE* ) ; This is defined in watcom
#else #else
#if __MSL__ < 0x6000 #if __MSL__ < 0x6000L
int fileno( void* ) ; int fileno( void* ) ;
#endif #endif
#endif #endif

View File

@@ -97,6 +97,10 @@
#undef HAVE_STRPTIME #undef HAVE_STRPTIME
#endif // broken strptime() #endif // broken strptime()
#if defined(__MWERKS__) && wxUSE_UNICODE
#include <wtime.h>
#endif
#if !defined(WX_TIMEZONE) && !defined(WX_GMTOFF_IN_TM) #if !defined(WX_TIMEZONE) && !defined(WX_GMTOFF_IN_TM)
#if defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__) #if defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__)
#define WX_TIMEZONE _timezone #define WX_TIMEZONE _timezone

View File

@@ -91,7 +91,10 @@
#include <stdio.h> // SEEK_xxx constants #include <stdio.h> // SEEK_xxx constants
#include <fcntl.h> // O_RDONLY &c #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/types.h> // needed for stat
#include <sys/stat.h> // stat #include <sys/stat.h> // stat
#endif #endif

View File

@@ -59,12 +59,19 @@
#ifndef __MWERKS__ #ifndef __MWERKS__
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#else
#ifdef __MACH__
#include <sys/types.h>
#include <utime.h>
#include <sys/stat.h>
#include <unistd.h>
#else #else
#include <stat.h> #include <stat.h>
#include <unistd.h> #include <unistd.h>
#include <unix.h> #include <unix.h>
#include <fcntl.h> #include <fcntl.h>
#endif #endif
#endif
#ifdef __UNIX__ #ifdef __UNIX__
#include <unistd.h> #include <unistd.h>

View File

@@ -107,10 +107,17 @@
#endif #endif
#ifdef __MWERKS__ #ifdef __MWERKS__
#ifdef __MACH__
#include <sys/types.h>
#include <utime.h>
#include <sys/stat.h>
#include <unistd.h>
#else
#include <stat.h> #include <stat.h>
#include <unistd.h> #include <unistd.h>
#include <unix.h> #include <unix.h>
#endif #endif
#endif
#ifdef __WATCOMC__ #ifdef __WATCOMC__
#include <io.h> #include <io.h>

View File

@@ -65,6 +65,11 @@
#include "wx/mac/private.h" // includes mac headers #include "wx/mac/private.h" // includes mac headers
#endif #endif
#if defined(__MWERKS__) && wxUSE_UNICODE
#include <wtime.h>
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// non member functions // non member functions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -801,13 +801,11 @@ wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit)
// missing C RTL functions (FIXME shouldn't be here at all) // missing C RTL functions (FIXME shouldn't be here at all)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __MWERKS__ #if defined( __MWERKS__ ) && !defined(__MACH__)
#if __MSL__ < 0x7000
char *strdup(const char *s) char *strdup(const char *s)
{ {
return strcpy( (char*) malloc( strlen( s ) + 1 ) , s ) ; return strcpy( (char*) malloc( strlen( s ) + 1 ) , s ) ;
} }
#endif
int isascii( int c ) int isascii( int c )
{ {
return ( c >= 0 && c < 128 ) ; return ( c >= 0 && c < 128 ) ;

View File

@@ -28,6 +28,10 @@
#endif #endif
#endif #endif
#if defined(__MWERKS__) && __MSL__ >= 0x6000
using namespace std ;
#endif
#if wxUSE_STREAMS #if wxUSE_STREAMS
#include "wx/stream.h" #include "wx/stream.h"
#include "wx/txtstrm.h" #include "wx/txtstrm.h"

View File

@@ -47,6 +47,10 @@
#include <winnt.h> #include <winnt.h>
#endif #endif
#if defined(__MWERKS__) && __MSL__ >= 0x6000
using namespace std ;
#endif
#if wxUSE_WCHAR_T #if wxUSE_WCHAR_T
size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n) 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_list argptr;
va_start(argptr, format); va_start(argptr, format);
#ifdef __WXMAC__
int ret = ::vfwscanf(stream, wxFormatConverter(format), argptr);
#else
int ret = vfwscanf(stream, wxFormatConverter(format), argptr); int ret = vfwscanf(stream, wxFormatConverter(format), argptr);
#endif
va_end(argptr); va_end(argptr);