From a8c5ec05320d58347ed434964e05818b082f00b4 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 27 Mar 2022 22:40:16 +0200 Subject: Moved FoundationEx closer to c++ standard It now builds with gcc on Linux --- FoundationEx/Text.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'FoundationEx/Text.h') diff --git a/FoundationEx/Text.h b/FoundationEx/Text.h index 0ade946..736c6b9 100644 --- a/FoundationEx/Text.h +++ b/FoundationEx/Text.h @@ -15,10 +15,12 @@ #define Text_h #include +#include #include -#include -#include +#ifndef _WIN32 +#include +#endif // +-------------------------------------------------------------------+ @@ -138,7 +140,11 @@ inline int Text::compare(const char* s) const if (rep->sensitive) return strcmp(sym, s); else +#ifdef _WIN32 return _stricmp(sym, s); +#else + return strcasecmp(sym, s); +#endif } inline int Text::compare(const Text& s) const @@ -146,7 +152,11 @@ inline int Text::compare(const Text& s) const if (rep->sensitive && s.rep->sensitive) return strcmp(sym, s.sym); else +#ifdef _WIN32 return _stricmp(sym, s.sym); +#else + return strcasecmp(sym, s.sym); +#endif } // +-------------------------------------------------------------------+ -- cgit v1.1