diff options
author | Eli Zaretskii <eliz@gnu.org> | 2016-09-24 15:38:22 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-09-24 15:38:22 +0300 |
commit | 727c2b4c7011c252fd1973358629cccbfecfc25d (patch) | |
tree | 6f23f76a951b594921e7161a5035cace9f46683c /pc | |
parent | 9cfede253d3d5f6907a6a1c0263b08442267cd55 (diff) | |
download | egawk-727c2b4c7011c252fd1973358629cccbfecfc25d.tar.gz egawk-727c2b4c7011c252fd1973358629cccbfecfc25d.tar.bz2 egawk-727c2b4c7011c252fd1973358629cccbfecfc25d.zip |
Fix compilation warnings on MinGW with the latest runtime
reported by Marc de Bourget <marcdebourget@gmail.com>.
Diffstat (limited to 'pc')
-rw-r--r-- | pc/ChangeLog | 15 | ||||
-rw-r--r-- | pc/config.h | 2 | ||||
-rw-r--r-- | pc/config.sed | 1 | ||||
-rw-r--r-- | pc/socket.h | 5 |
4 files changed, 21 insertions, 2 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index b2d4eddb..7ba5fd9c 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,18 @@ +2016-09-24 Eli Zaretskii <eliz@gnu.org> + + Fix compilation warnings on MinGW with the latest runtime. + Reported by Marc de Bourget <marcdebourget@gmail.com>. + + * socket.h (_WIN32_WINNT): If it's already defined, redefine it + only if the value is less than what we need. This avoids compiler + warnings about redefinitions. + + * config.h (HAVE_STRINGS_H): Define to 1. + + * config.sed: Define STRINGS_H as well, as MinGW runtime 3.22 and + later needs that to get the prototypes of strcasecmp and + strncasecmp. + 2016-09-08 Scott Deifik <scottd.mail@sbcglobal.net> * Makefile.tst: Sync with mainline. diff --git a/pc/config.h b/pc/config.h index e166c53b..d584973a 100644 --- a/pc/config.h +++ b/pc/config.h @@ -261,7 +261,7 @@ #define HAVE_STRINGIZE 1 /* Define to 1 if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H +#define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 diff --git a/pc/config.sed b/pc/config.sed index 6c1fb3ab..a95ee2ef 100644 --- a/pc/config.sed +++ b/pc/config.sed @@ -155,6 +155,7 @@ s/^#undef HAVE_STRERROR *$/#define HAVE_STRERROR 1/ #define HAVE_STRFTIME 1\ #endif s/^#undef HAVE_STRINGIZE *$/#define HAVE_STRINGIZE 1/ +s/^#undef HAVE_STRINGS_H *$/#define HAVE_STRINGS_H 1/ s/^#undef HAVE_STRING_H *$/#define HAVE_STRING_H 1/ /^#undef HAVE_STRNCASECMP *$/c\ #define HAVE_STRNCASECMP 1\ diff --git a/pc/socket.h b/pc/socket.h index 41dd23cf..d7b890dd 100644 --- a/pc/socket.h +++ b/pc/socket.h @@ -7,7 +7,10 @@ #include <io.h> -#define _WIN32_WINNT 0x501 +#if !defined _WIN32_WINNT || _WIN32_WINNT < 0x501 +# undef _WIN32_WINNT +# define _WIN32_WINNT 0x501 +#endif #include <winsock2.h> #include <ws2tcpip.h> |