X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30b21f9a048d957a989cf5623c369745fec8a27d..1a33c3ba91c23c1b143ce2d44a7d23e31220cf30:/include/wx/string.h diff --git a/include/wx/string.h b/include/wx/string.h index d2b6a60a85..50f9fbf4a1 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -26,6 +26,10 @@ #include #include +#ifdef HAVE_STRINGS_H + #include // for strcasecmp() +#endif // AIX + #ifndef WX_PRECOMP #include "wx/defs.h" @@ -79,7 +83,7 @@ inline size_t WXDLLEXPORT Strlen(const char *psz) // portable strcasecmp/_stricmp inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2) { -#if defined(__VISUALC__) || defined(__MWERKS__) +#if defined(__VISUALC__) || ( defined(__MWERKS__) && defined(__INTEL__) ) return _stricmp(psz1, psz2); #elif defined(__SC__) return _stricmp(psz1, psz2); @@ -91,7 +95,7 @@ inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2) return stricmp(psz1, psz2); #elif defined(__UNIX__) || defined(__GNUWIN32__) return strcasecmp(psz1, psz2); -#elif defined(__MWERKS__) && !defined(_MSC_VER) +#elif defined(__MWERKS__) && !defined(__INTEL__) register char c1, c2; do { c1 = tolower(*psz1++); @@ -316,9 +320,10 @@ public: char& Last() { wxASSERT( !IsEmpty() ); CopyBeforeWrite(); return m_pchData[Len()-1]; } - // on alpha-linux this gives overload problems: - // Also on Solaris, so removing for now (JACS) -#if ! defined(__ALPHA__) + // under Unix it is tested with configure, assume it works on other + // platforms (there might be overloading problems if size_t and int are + // the same type) +#if !defined(__UNIX__) || wxUSE_SIZE_T_STRING_OPERATOR // operator version of GetChar char operator[](size_t n) const { ASSERT_VALID_INDEX( n ); return m_pchData[n]; }