public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: utils: set _WIN32_WINNT and NTDDI_VERSION via Makefile
Date: Wed, 26 May 2021 09:04:32 +0000 (GMT)	[thread overview]
Message-ID: <20210526090432.A74D53850415@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=48a76190e84be92a6f55b0f6db1197633f243e90

commit 48a76190e84be92a6f55b0f6db1197633f243e90
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed May 26 10:57:47 2021 +0200

    Cygwin: utils: set _WIN32_WINNT and NTDDI_VERSION via Makefile
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 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 <wctype.h>
 #include <errno.h>
 
-#define _WIN32_WINNT 0x0a00
-#define WINVER 0x0a00
 #define NOCOMATTRIBUTE
 #include <windows.h>
 #include <userenv.h>
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 <unistd.h>
 #include <libgen.h>
 
-#define _WIN32_WINNT 0x0a00
 #define PSAPI_VERSION 1
 #include <windows.h>
 #include <winternl.h>
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 <limits.h>
 #include <sys/cygwin.h>
 #include <cygwin/version.h>
-#define _WIN32_WINNT 0x0a00
-#define WINVER 0x0a00
 #include <windows.h>
 
 #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 <stdio.h>
 #include <stdlib.h>
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 <errno.h>
 #include <ctype.h>
 #include <stdlib.h>
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 <errno.h>
 #include <ctype.h>
 #include <stdlib.h>
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 <wchar.h>
 #include <getopt.h>
 #include <locale.h>
-#define WINVER 0x0502
 #include <windows.h>
 #include <sys/cygwin.h>
 #include <cygwin/version.h>


                 reply	other threads:[~2021-05-26  9:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210526090432.A74D53850415@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).