From ea04951947c9d0297f97a8b4fa4197776bb50881 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sat, 18 Apr 2020 20:00:35 -0400 Subject: [PATCH] Buildfixes for CentOS, MinGW, osxcross --- mojoshader_internal.h | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/mojoshader_internal.h b/mojoshader_internal.h index 6c26fb84..8936c856 100644 --- a/mojoshader_internal.h +++ b/mojoshader_internal.h @@ -11,7 +11,8 @@ #ifdef MOJOSHADER_USE_SDL_STDLIB #include #include -#ifdef _MSC_VER +#include /* Needed for isinf/isnan :( */ +#ifndef __APPLE__ #include /* Needed for alloca :( */ #endif @@ -54,13 +55,6 @@ typedef Uint64 uint64; #define sqrt SDL_sqrt /* string.h */ -#define strchr SDL_strchr -#define strcmp SDL_strcmp -#define strlen SDL_strlen -#define strncmp SDL_strncmp -#define strstr SDL_strstr - -/* string.h but with undefs for Apple systems */ #ifdef memcmp #undef memcmp #endif @@ -73,6 +67,26 @@ typedef Uint64 uint64; #undef memset #endif #define memset SDL_memset +#ifdef strchr +#undef strchr +#endif +#define strchr SDL_strchr +#ifdef strcmp +#undef strcmp +#endif +#define strcmp SDL_strcmp +#ifdef strlen +#undef strlen +#endif +#define strlen SDL_strlen +#ifdef strncmp +#undef strncmp +#endif +#define strncmp SDL_strncmp +#ifdef strstr +#undef strstr +#endif +#define strstr SDL_strstr #ifdef strcat #undef strcat #endif