]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Always include strings.h when strcasecmp is used
authorCameron Cawley <ccawley2011@gmail.com>
Fri, 19 May 2023 14:17:41 +0000 (15:17 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 16 Sep 2023 09:08:25 +0000 (11:08 +0200)
test/minideflate.c

index 87513df3805262cf0cf62085a3a028327e1be64f..61fbe43cb636d821a318f5883b2467aadb06874f 100644 (file)
 #if defined(_WIN32) || defined(__CYGWIN__)
 #  include <fcntl.h>
 #  include <io.h>
-#  include <string.h>
 #  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#  ifdef _MSC_VER
-#    define strcasecmp _stricmp
-#  endif
 #else
-#  include <strings.h>
 #  define SET_BINARY_MODE(file)
 #endif
 
+#ifdef _MSC_VER
+#  include <string.h>
+#  define strcasecmp _stricmp
+#else
+#  include <strings.h>
+#endif
+
 #define CHECK_ERR(err, msg) { \
     if (err != Z_OK) { \
         fprintf(stderr, "%s error: %d\n", msg, err); \