From 7644356e6ea1b8e38b1ae8cdd90481f05f347513 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 18 Oct 2007 23:38:53 +0000 Subject: Fix for strcasecmp in MSVC; #define to stricmp. Outside MSVC, use strings.h. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 975 --- src/deh_main.c | 1 - src/doomdef.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/deh_main.c b/src/deh_main.c index 7d86e4b2..b69c049d 100644 --- a/src/deh_main.c +++ b/src/deh_main.c @@ -25,7 +25,6 @@ //----------------------------------------------------------------------------- #include -#include #include "doomdef.h" #include "doomtype.h" diff --git a/src/doomdef.h b/src/doomdef.h index bcd27e27..08d06422 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -31,6 +31,21 @@ #include #include +// Portable header to provide the strcasecmp/strncasecmp functions. +// On Windows, stricmp/strnicmp is used as a replacement. + +#ifdef _WIN32 + +#define strcasecmp stricmp +#define strncasecmp strnicmp + +#else + +#include + +#endif + + // // The packed attribute forces structures to be packed into the minimum // space necessary. If this is not done, the compiler may align structure -- cgit v1.2.3