Avoid redefinition of strcasecmp in mingw-w64

This commit is contained in:
Milton Woods 2021-08-24 16:27:26 +10:00
parent 09e0e04227
commit cb56d5af38
5 changed files with 7 additions and 5 deletions

View File

@ -57,7 +57,7 @@ are set when opening a binary file on Windows. */
#define _OFF_T_DEFINED
#endif
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
#ifndef strcasecmp
#define strcasecmp _stricmp
#endif
@ -656,7 +656,7 @@ with zip */
#cmakedefine uintptr_t unsigned long
/* Define strcasecmp, strncasecmp, snprintf on Win32 systems. */
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
#ifndef HAVE_STRCASECMP
#define strcasecmp _stricmp
#endif

View File

@ -1655,7 +1655,7 @@ AC_SUBST(HAS_LOGGING,[$enable_logging])
#AH_VERBATIM([_WIN32_STRICMP],
AH_BOTTOM(
[/* Define strcasecmp, strncasecmp, snprintf on Win32 systems. */
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define snprintf _snprintf

View File

@ -14,7 +14,7 @@ TODO: make utf8 safe
#include <assert.h>
#include "ncjson.h"
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
#define strcasecmp _stricmp
#else
#include <strings.h>

View File

@ -6,7 +6,7 @@
#include "nclist.h"
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
#define strcasecmp _stricmp
#endif

View File

@ -9,8 +9,10 @@
#ifdef _WIN32
#include <float.h>
#include "isnan.h"
#ifndef __MINGW32__
#define strcasecmp _stricmp
#endif
#endif
#ifdef USE_NETCDF4
#define CLASSICONLY 0