From 3e45e9a48a196d3199d54a949c663b2349b6e58c Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Wed, 18 Mar 2015 23:37:54 +0200 Subject: [PATCH] Remove no longer required strnlen wrapper It was used for MinGW & OS X < 10.7. Minimal OS X version was bumped to 10.7 and MinGW support was recently dropped (see 1eaa64c49caeb753facf36c5173d5236c1f969e0). --- components/esm/esmcommon.hpp | 2 +- components/esm/esmreader.hpp | 2 +- libs/platform/string.h | 34 ---------------------------------- 3 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 libs/platform/string.h diff --git a/components/esm/esmcommon.hpp b/components/esm/esmcommon.hpp index 54b18aeaf..d90a3444d 100644 --- a/components/esm/esmcommon.hpp +++ b/components/esm/esmcommon.hpp @@ -5,7 +5,7 @@ #include #include -#include +#include namespace ESM { diff --git a/components/esm/esmreader.hpp b/components/esm/esmreader.hpp index ebbc935f6..2df2a86b3 100644 --- a/components/esm/esmreader.hpp +++ b/components/esm/esmreader.hpp @@ -2,7 +2,7 @@ #define OPENMW_ESM_READER_H #include -#include +#include #include #include #include diff --git a/libs/platform/string.h b/libs/platform/string.h deleted file mode 100644 index 5368d757c..000000000 --- a/libs/platform/string.h +++ /dev/null @@ -1,34 +0,0 @@ -// Wrapper for string.h on Mac and MinGW -#ifndef _STRING_WRAPPER_H -#define _STRING_WRAPPER_H - -#ifdef __APPLE__ -#include -#endif - -#include -#if (defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070) || defined(__MINGW32__) -// need our own implementation of strnlen -#ifdef __MINGW32__ -static size_t strnlen(const char *s, size_t n) -{ - const char *p = (const char *)memchr(s, 0, n); - return(p ? p-s : n); -} -#elif (defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070) -static size_t mw_strnlen(const char *s, size_t n) -{ - if (strnlen != NULL) { - return strnlen(s, n); - } - else { - const char *p = (const char *)memchr(s, 0, n); - return(p ? p-s : n); - } -} -#define strnlen mw_strnlen -#endif - -#endif - -#endif