diff options
Diffstat (limited to 'src/string.cpp')
-rw-r--r-- | src/string.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp index 66140b7d4..845225d6f 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -33,6 +33,10 @@ #include "os/windows/string_uniscribe.h" #endif +#if defined(WITH_COCOA) +#include "os/macosx/string_osx.h" +#endif + #ifdef WITH_ICU_SORT /* Required by strnatcmp. */ #include <unicode/ustring.h> @@ -593,6 +597,11 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front) if (res != 0) return res - 2; // Convert to normal C return values. #endif +#if defined(WITH_COCOA) && !defined(STRGEN) && !defined(SETTINGSGEN) + int res = MacOSStringCompare(s1, s2); + if (res != 0) return res - 2; // Convert to normal C return values. +#endif + /* Do a normal comparison if ICU is missing or if we cannot create a collator. */ return strcasecmp(s1, s2); } |