X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..92f5ff59ccde20a9395084bb29c281ed6831b1b1:/include/wx/wxchar.h diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 6e6e875c54..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 -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || (defined(__APPLE__) && defined(__UNIX__)) # undef _T # endif @@ -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 // ----------------------------------------------------------------------------