diff --git a/stepmania/src/archutils/Darwin/wchar.cpp b/stepmania/src/archutils/Darwin/wchar.cpp index 3f8cb9ca24..413d2dc845 100644 --- a/stepmania/src/archutils/Darwin/wchar.cpp +++ b/stepmania/src/archutils/Darwin/wchar.cpp @@ -1,9 +1,12 @@ #include #include +// This is very annoying. The 10.2.8 SDK uses GLIBCPP but the 10.4u SDK uses GLIBCXX +#define _GLIB_CHECK(x) (_GLIBCPP_ ## x || _GLIBCXX_ ## x) + extern "C" { -#if ! _GLIBCPP_HAVE_WCLEN +#if ! _GLIB_CHECK(HAVE_WCLEN) size_t wcslen( const wchar_t *ws ) { size_t n = 0; @@ -14,7 +17,7 @@ size_t wcslen( const wchar_t *ws ) } #endif -#if ! _GLIBCPP_HAVE_WMEMCHR +#if ! _GLIB_CHECK(HAVE_WMEMCHR) wchar_t *wmemchr( const wchar_t *ws, wchar_t wc, size_t n ) { for( unsigned i=0; i