[PATCH] Cygwin: wincap: Add capabilities for Windows 11.

Takashi Yano takashi.yano@nifty.ne.jp
Wed Feb 16 09:33:11 GMT 2022


- The capability changes since Windows 11 have been reflected in
  wincap.cc. The capability has_con_broken_tabs is added, which is
  false since Windows 11.
---
 winsup/cygwin/wincap.cc | 47 ++++++++++++++++++++++++++++++++++++++++-
 winsup/cygwin/wincap.h  |  2 ++
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index b8376b8ed..244ebc8e5 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -46,6 +46,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_linux_tcp_keepalive_sockopts:false,
     has_tcp_maxrtms:false,
     has_query_process_handle_info:false,
+    has_con_broken_tabs:false,
   },
 };
 
@@ -77,6 +78,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_linux_tcp_keepalive_sockopts:false,
     has_tcp_maxrtms:false,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:false,
   },
 };
 
@@ -108,6 +110,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_linux_tcp_keepalive_sockopts:false,
     has_tcp_maxrtms:false,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:false,
   },
 };
 
@@ -139,6 +142,7 @@ wincaps  wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared))
     has_linux_tcp_keepalive_sockopts:false,
     has_tcp_maxrtms:false,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:false,
   },
 };
 
@@ -170,6 +174,7 @@ wincaps  wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared))
     has_linux_tcp_keepalive_sockopts:false,
     has_tcp_maxrtms:true,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:false,
   },
 };
 
@@ -201,6 +206,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_linux_tcp_keepalive_sockopts:false,
     has_tcp_maxrtms:true,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:true,
   },
 };
 
@@ -232,6 +238,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_linux_tcp_keepalive_sockopts:true,
     has_tcp_maxrtms:true,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:true,
   },
 };
 
@@ -263,6 +270,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_linux_tcp_keepalive_sockopts:true,
     has_tcp_maxrtms:true,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:true,
   },
 };
 
@@ -294,6 +302,7 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_linux_tcp_keepalive_sockopts:true,
     has_tcp_maxrtms:true,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:true,
   },
 };
 
@@ -325,6 +334,7 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_linux_tcp_keepalive_sockopts:true,
     has_tcp_maxrtms:true,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:true,
   },
 };
 
@@ -356,6 +366,39 @@ wincaps wincap_10_2004 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_linux_tcp_keepalive_sockopts:true,
     has_tcp_maxrtms:true,
     has_query_process_handle_info:true,
+    has_con_broken_tabs:true,
+  },
+};
+
+wincaps wincap_11 __attribute__((section (".cygwin_dll_common"), shared)) = {
+  def_guard_pages:2,
+  mmap_storage_high:0x700000000000LL,
+  {
+    is_server:false,
+    needs_query_information:false,
+    has_gaa_largeaddress_bug:false,
+    has_precise_system_time:true,
+    has_microsoft_accounts:true,
+    has_broken_prefetchvm:false,
+    has_new_pebteb_region:true,
+    has_broken_whoami:false,
+    has_unprivileged_createsymlink:true,
+    has_precise_interrupt_time:true,
+    has_posix_unlink_semantics:true,
+    has_posix_unlink_semantics_with_ignore_readonly:true,
+    has_case_sensitive_dirs:true,
+    has_posix_rename_semantics:true,
+    no_msv1_0_s4u_logon_in_wow64:false,
+    has_con_24bit_colors:true,
+    has_con_broken_csi3j:false,
+    has_con_broken_il_dl:false,
+    has_con_esc_rep:true,
+    has_extended_mem_api:true,
+    has_tcp_fastopen:true,
+    has_linux_tcp_keepalive_sockopts:true,
+    has_tcp_maxrtms:true,
+    has_query_process_handle_info:true,
+    has_con_broken_tabs:false,
   },
 };
 
@@ -396,7 +439,9 @@ wincapc::init ()
 	break;
       case 10:
       default:
-	if (likely (version.dwBuildNumber >= 19041))
+	if (likely (version.dwBuildNumber >= 22000))
+	  caps = &wincap_11;
+	if (version.dwBuildNumber >= 19041)
 	  caps = &wincap_10_2004;
 	else if (version.dwBuildNumber >= 18362)
 	  caps = &wincap_10_1903;
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index ba9a3b59d..1602ed6e1 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -40,6 +40,7 @@ struct wincaps
     unsigned has_linux_tcp_keepalive_sockopts			: 1;
     unsigned has_tcp_maxrtms					: 1;
     unsigned has_query_process_handle_info			: 1;
+    unsigned has_con_broken_tabs				: 1;
   };
 };
 
@@ -103,6 +104,7 @@ public:
   bool	IMPLEMENT (has_linux_tcp_keepalive_sockopts)
   bool	IMPLEMENT (has_tcp_maxrtms)
   bool	IMPLEMENT (has_query_process_handle_info)
+  bool	IMPLEMENT (has_con_broken_tabs)
 
   void disable_case_sensitive_dirs ()
   {
-- 
2.35.1



More information about the Cygwin-patches mailing list