#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
#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
#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
#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>
#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>
#include "wx/mac/private.h" // includes mac headers
#endif
+#if defined(__MWERKS__) && wxUSE_UNICODE
+ #include <wtime.h>
+#endif
+
+
// ----------------------------------------------------------------------------
// non member functions
// ----------------------------------------------------------------------------
// 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 ) ;
#endif
#endif
+#if defined(__MWERKS__) && __MSL__ >= 0x6000
+using namespace std ;
+#endif
+
#if wxUSE_STREAMS
#include "wx/stream.h"
#include "wx/txtstrm.h"
#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)
{
{
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);