X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c4f84521e8836229be50f396a436b677066ca88..92f5ff59ccde20a9395084bb29c281ed6831b1b1:/include/wx/wxchar.h?ds=sidebyside diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 0ab57e3987..ff21ca685b 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -366,7 +366,7 @@ typedef unsigned __WCHAR_TYPE__ wxUChar; # define wxUChar unsigned char # endif -# if defined(__FreeBSD__) || defined(__MACH__) +# if defined(__FreeBSD__) || (defined(__APPLE__) && defined(__UNIX__)) # undef _T # endif @@ -419,7 +419,7 @@ typedef unsigned __WCHAR_TYPE__ wxUChar; # elif defined(__SC__) || defined(__VISUALC__) || (defined(__MWERKS__) && defined(__INTEL__)) # define wxStricmp _stricmp # define wxStrnicmp _strnicmp -# elif defined(__UNIX__) || defined(__GNUWIN32__) || defined(__MACH__) +# elif defined(__UNIX__) || defined(__GNUWIN32__) # define wxStricmp strcasecmp # define wxStrnicmp strncasecmp # elif defined(__MWERKS__) && !defined(__INTEL__) @@ -511,11 +511,11 @@ typedef unsigned __WCHAR_TYPE__ wxUChar; #endif // checks whether the passed in pointer is NULL and if the string is empty -WXDLLEXPORT inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; } +inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; } #ifndef wxNEED_WX_STRING_H // safe version of strlen() (returns 0 if passed NULL pointer) -WXDLLEXPORT inline size_t wxStrlen(const wxChar *psz) +inline size_t wxStrlen(const wxChar *psz) { return psz ? wxStrlen_(psz) : 0; } #endif @@ -637,6 +637,13 @@ WXDLLEXPORT int wxSystem(const wxChar *psz); WXDLLEXPORT size_t wxStrftime(wxChar *s, size_t max, const wxChar *fmt, const struct tm *tm); #endif +// under VC++ 6.0 isspace() returns 1 for 8 bit chars which completely breaks +// the file parsing - this may be true for 5.0 as well, update #ifdef then +#if defined(__VISUALC__) && (__VISUALC__ >= 1200) && !wxUSE_UNICODE + #undef wxIsspace + #define wxIsspace(c) ((((unsigned)c) < 128) && isspace(c)) +#endif // VC++ + // ---------------------------------------------------------------------------- // common macros which are always defined // ----------------------------------------------------------------------------