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
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

View File

@ -97,6 +97,10 @@
#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

View File

@ -91,7 +91,10 @@
#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

View File

@ -59,12 +59,19 @@
#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>

View File

@ -107,10 +107,17 @@
#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>

View File

@ -65,6 +65,11 @@
#include "wx/mac/private.h" // includes mac headers
#endif
#if defined(__MWERKS__) && wxUSE_UNICODE
#include <wtime.h>
#endif
// ----------------------------------------------------------------------------
// 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)
// ----------------------------------------------------------------------------
#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 ) ;

View File

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

View File

@ -47,6 +47,10 @@
#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);