public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] Cygwin: Unconditionally require win32api >= 10.0.0
@ 2022-04-27 20:35 Jon Turney
  2022-04-28 14:06 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Turney @ 2022-04-27 20:35 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon Turney

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Cygwin: Unconditionally require win32api >= 10.0.0
  2022-04-27 20:35 [PATCH] Cygwin: Unconditionally require win32api >= 10.0.0 Jon Turney
@ 2022-04-28 14:06 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2022-04-28 14:06 UTC (permalink / raw)
  To: cygwin-patches

On Apr 27 21:35, Jon Turney wrote:
> 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(-)

LGTM


Thx,
Corinna

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-28 14:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 20:35 [PATCH] Cygwin: Unconditionally require win32api >= 10.0.0 Jon Turney
2022-04-28 14:06 ` Corinna Vinschen

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).