config: only define str[n]casecmp if necessary
Recent versions of MinGW-W64 already have these symbols defined and throw a warning if we attempt to re-define them.
This commit is contained in:
parent
6e8dc57e94
commit
62c8b62c5e
2 changed files with 8 additions and 1 deletions
|
|
@ -77,6 +77,7 @@ AC_CHECK_LIB(m, log)
|
|||
|
||||
AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h])
|
||||
AC_CHECK_FUNCS(mmap ioperm)
|
||||
AC_CHECK_DECLS([strcasecmp, strncasecmp], [], [], [[#include <strings.h>]])
|
||||
|
||||
# OpenBSD I/O i386 library for I/O port access.
|
||||
# (64 bit has the same thing with a different name!)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
#ifndef __DOOMTYPE__
|
||||
#define __DOOMTYPE__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__cplusplus)
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
|
@ -29,11 +31,15 @@
|
|||
// Outside Windows, we use strings.h for str[n]casecmp.
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#if !HAVE_DECL_STRCASECMP || !HAVE_DECL_STRNCASECMP
|
||||
|
||||
#include <string.h>
|
||||
#if !HAVE_DECL_STRCASECMP
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
#if !HAVE_DECL_STRNCASECMP
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue