From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-patches@cygwin.com
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH] Cygwin: Unconditionally require win32api >= 10.0.0
Date: Wed, 27 Apr 2022 21:35:14 +0100 [thread overview]
Message-ID: <20220427203515.13607-1-jon.turney@dronecode.org.uk> (raw)
Unconditionally require win32api >= 10.0.0, and check for it at
configure time.
Note that there remains a use of __MINGW64_VERSION_MAJOR in
pseudo-reloc.cc under !CYGWIN (since that file is shared with the
MinGW and MinGW64 runtimes).
---
winsup/configure.ac | 9 +++++++++
winsup/cygwin/ntdll.h | 6 ------
winsup/cygwin/sec_auth.cc | 19 -------------------
winsup/cygwin/winlean.h | 5 -----
4 files changed, 9 insertions(+), 30 deletions(-)
diff --git a/winsup/configure.ac b/winsup/configure.ac
index b8d2100db..41bf21c78 100644
--- a/winsup/configure.ac
+++ b/winsup/configure.ac
@@ -57,6 +57,15 @@ AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
AC_CHECK_TOOL(STRIP, strip, strip)
AC_CHECK_TOOL(WINDRES, windres, windres)
+w32api_maj_ver_req=10
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include <windows.h>
+#if __MINGW64_VERSION_MAJOR < $w32api_maj_ver_req
+#error "w32api headers version doesn't meet requirements"
+#endif
+])],,
+AC_MSG_FAILURE("Version >= $w32api_maj_ver_req of w32api headers is required"))
+
AC_ARG_ENABLE(debugging,
[AS_HELP_STRING([--enable-debugging],[Build a cygwin DLL which has more consistency checking for debugging])],
[case "${enableval}" in
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 59c396676..f6b31a19d 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -1467,12 +1467,6 @@ extern "C"
NTSTATUS NTAPI NtMapViewOfSection (HANDLE, HANDLE, PVOID *, ULONG_PTR, SIZE_T,
PLARGE_INTEGER, PSIZE_T, SECTION_INHERIT,
ULONG, ULONG);
-
-/* For the extended memory API. */
-#if __MINGW64_VERSION_MAJOR < 8
-#error "Version >= 8 of the w32api headers is required"
-#endif
-
NTSTATUS NTAPI NtMapViewOfSectionEx (HANDLE, HANDLE, PVOID *, PLARGE_INTEGER,
PSIZE_T, ULONG, ULONG,
PMEM_EXTENDED_PARAMETER, ULONG);
diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc
index 2b1ce2203..9ac476284 100644
--- a/winsup/cygwin/sec_auth.cc
+++ b/winsup/cygwin/sec_auth.cc
@@ -1232,25 +1232,6 @@ out:
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* In w32api prior to 10.0.0, MsV1_0S4ULogon and MSV1_0_S4U_LOGON are only
- defined in ddk/ntifs.h, which we can't include. */
-#if (__MINGW64_VERSION_MAJOR < 10)
-
-#define MsV1_0S4ULogon ((MSV1_0_LOGON_SUBMIT_TYPE) 12)
-
-typedef struct _MSV1_0_S4U_LOGON
-{
- MSV1_0_LOGON_SUBMIT_TYPE MessageType;
- ULONG Flags;
- UNICODE_STRING UserPrincipalName;
- UNICODE_STRING DomainName;
-} MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
-
-/* Missing in Mingw-w64 */
-#define KERB_S4U_LOGON_FLAG_IDENTIFY 0x08
-
-#endif
-
/* If logon is true we need an impersonation token. Otherwise we just
need an identification token, e. g. to fetch the group list. */
HANDLE
diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h
index de7305e26..6f9c1df24 100644
--- a/winsup/cygwin/winlean.h
+++ b/winsup/cygwin/winlean.h
@@ -99,11 +99,6 @@ details. */
extern "C" {
#endif
-/* For the extended memory API. */
-#if __MINGW64_VERSION_MAJOR < 8
-#error "Version >= 8 of the w32api headers is required"
-#endif
-
/* IsWow64Process2 should be declared in <w32api/wow64apiset.h> but
isn't yet. */
BOOL WINAPI IsWow64Process2(HANDLE, USHORT *, USHORT *);
--
2.36.0
next reply other threads:[~2022-04-27 20:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 20:35 Jon Turney [this message]
2022-04-28 14:06 ` Corinna Vinschen
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=20220427203515.13607-1-jon.turney@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-patches@cygwin.com \
/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).