From 48a76190e84be92a6f55b0f6db1197633f243e90 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 May 2021 10:57:47 +0200 Subject: [PATCH] Cygwin: utils: set _WIN32_WINNT and NTDDI_VERSION via Makefile Signed-off-by: Corinna Vinschen --- winsup/utils/Makefile.am | 2 +- winsup/utils/cygpath.cc | 2 -- winsup/utils/ldd.cc | 1 - winsup/utils/locale.cc | 2 -- winsup/utils/mingw/Makefile.am | 2 +- winsup/utils/mingw/cygcheck.cc | 1 - winsup/utils/mkgroup.c | 1 - winsup/utils/mkpasswd.c | 1 - winsup/utils/regtool.cc | 1 - 9 files changed, 2 insertions(+), 11 deletions(-) diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am index 5283fb343..9a846e39d 100644 --- a/winsup/utils/Makefile.am +++ b/winsup/utils/Makefile.am @@ -8,7 +8,7 @@ include $(top_srcdir)/Makefile.am.common -CFLAGS_COMMON=-Wimplicit-fallthrough=4 -Werror +CFLAGS_COMMON=-Wimplicit-fallthrough=4 -Werror -D_WIN32_WINNT=0x0a00 -DNTDDI_VERSION=WDK_NTDDI_VERSION AM_CFLAGS=$(cflags_common) $(CFLAGS_COMMON) AM_CXXFLAGS=$(cxxflags_common) $(CFLAGS_COMMON) diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc index bc5f11dd0..701c34998 100644 --- a/winsup/utils/cygpath.cc +++ b/winsup/utils/cygpath.cc @@ -21,8 +21,6 @@ details. */ #include #include -#define _WIN32_WINNT 0x0a00 -#define WINVER 0x0a00 #define NOCOMATTRIBUTE #include #include diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc index cc1349655..f9b04ed10 100644 --- a/winsup/utils/ldd.cc +++ b/winsup/utils/ldd.cc @@ -37,7 +37,6 @@ #include #include -#define _WIN32_WINNT 0x0a00 #define PSAPI_VERSION 1 #include #include diff --git a/winsup/utils/locale.cc b/winsup/utils/locale.cc index 1eee9d240..ed6102ebc 100644 --- a/winsup/utils/locale.cc +++ b/winsup/utils/locale.cc @@ -35,8 +35,6 @@ #include #include #include -#define _WIN32_WINNT 0x0a00 -#define WINVER 0x0a00 #include #define LOCALE_ALIAS "/usr/share/locale/locale.alias" diff --git a/winsup/utils/mingw/Makefile.am b/winsup/utils/mingw/Makefile.am index 874dce512..08a29828f 100644 --- a/winsup/utils/mingw/Makefile.am +++ b/winsup/utils/mingw/Makefile.am @@ -15,7 +15,7 @@ AM_CPPFLAGS = include $(top_srcdir)/Makefile.am.common -CFLAGS_COMMON=-Wimplicit-fallthrough=4 -Werror +CFLAGS_COMMON=-Wimplicit-fallthrough=4 -Werror -D_WIN32_WINNT=0x0a00 -DNTDDI_VERSION=WDK_NTDDI_VERSION AM_CXXFLAGS=-fno-exceptions -fno-rtti -fno-use-cxa-atexit $(flags_common) $(CFLAGS_COMMON) bin_PROGRAMS = \ diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc index a45ab5d4d..61fb90ee3 100644 --- a/winsup/utils/mingw/cygcheck.cc +++ b/winsup/utils/mingw/cygcheck.cc @@ -6,7 +6,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ -#define _WIN32_WINNT 0x0a00 #define cygwin_internal cygwin_internal_dontuse #include #include diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c index 3e99438c9..31f4629a5 100644 --- a/winsup/utils/mkgroup.c +++ b/winsup/utils/mkgroup.c @@ -6,7 +6,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ -#define _WIN32_WINNT 0x0a00 #include #include #include diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c index 3bbdb1c71..84fbc03c4 100644 --- a/winsup/utils/mkpasswd.c +++ b/winsup/utils/mkpasswd.c @@ -6,7 +6,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ -#define _WIN32_WINNT 0x0a00 #include #include #include diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc index 16972291f..fd2dd0590 100644 --- a/winsup/utils/regtool.cc +++ b/winsup/utils/regtool.cc @@ -13,7 +13,6 @@ details. */ #include #include #include -#define WINVER 0x0502 #include #include #include