From f9600ccfd9100717c24bba3cc1c15d6edd58e6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 30 Aug 2018 22:55:15 +0200 Subject: [PATCH] Only provide strcasestr for WIN32 toolchains All the other toolchains appear to be providing this function and only MSVC+mingw are missing out. cf. https://github.com/OpenRCT2/OpenRCT2/pull/7942 --- src/openrct2/util/Util.cpp | 2 +- src/openrct2/util/Util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/util/Util.cpp b/src/openrct2/util/Util.cpp index 26ba239cd8..ff58a84a42 100644 --- a/src/openrct2/util/Util.cpp +++ b/src/openrct2/util/Util.cpp @@ -483,7 +483,7 @@ char* safe_strtrimleft(char* destination, const char* source, size_t size) return safe_strcpy(destination, source, size); } -#if !(defined(_GNU_SOURCE) || (defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L)) +#if defined(_WIN32) char* strcasestr(const char* haystack, const char* needle) { const char* p1 = haystack; diff --git a/src/openrct2/util/Util.h b/src/openrct2/util/Util.h index bf4dc23f41..462e46308a 100644 --- a/src/openrct2/util/Util.h +++ b/src/openrct2/util/Util.h @@ -44,7 +44,7 @@ char* safe_strcpy(char* destination, const char* source, size_t num); char* safe_strcat(char* destination, const char* source, size_t size); char* safe_strcat_path(char* destination, const char* source, size_t size); char* safe_strtrimleft(char* destination, const char* source, size_t size); -#if !(defined(_GNU_SOURCE) || (defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L)) +#if defined(_WIN32) char* strcasestr(const char* haystack, const char* needle); #endif