]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: drop wincap::needs_query_information
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 15 Nov 2022 16:10:57 +0000 (17:10 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Sun, 4 Dec 2022 13:01:41 +0000 (14:01 +0100)
Only required for Windows 7 and 8.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/local_includes/wincap.h
winsup/cygwin/sigproc.cc
winsup/cygwin/wincap.cc

index 9fff129097aea16c2ba7f7634eb46992fb843430..1075f3bea85e061fbfcf9e359d8dd85bbd1856ec 100644 (file)
@@ -17,7 +17,6 @@ struct wincaps
      ops generated by gcc are off by 4 bytes. */
   struct  __attribute__ ((aligned (8))) {
     unsigned is_server                                         : 1;
-    unsigned needs_query_information                           : 1;
     unsigned has_precise_system_time                           : 1;
     unsigned has_microsoft_accounts                            : 1;
     unsigned has_new_pebteb_region                             : 1;
@@ -76,7 +75,6 @@ public:
   }
   intptr_t IMPLEMENT (mmap_storage_high)
   bool  IMPLEMENT (is_server)
-  bool IMPLEMENT (needs_query_information)
   bool IMPLEMENT (has_precise_system_time)
   bool IMPLEMENT (has_microsoft_accounts)
   bool IMPLEMENT (has_new_pebteb_region)
index a99876dc9fb9a6f33c011f8eac621a787fd5ab40..ce36c8be37fb0102e62e71168955d1e90e3e7caf 100644 (file)
@@ -846,14 +846,7 @@ child_info::child_info (unsigned in_cb, child_info_types chtype,
   DWORD perms = PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ
                | PROCESS_VM_OPERATION | SYNCHRONIZE;
   if (type == _CH_FORK)
-    {
-      perms |= PROCESS_DUP_HANDLE;
-      /* VirtualQueryEx is documented to require PROCESS_QUERY_INFORMATION.
-        That's true for Windows 7, but PROCESS_QUERY_LIMITED_INFORMATION
-        appears to be sufficient on Windows 8 and later. */
-      if (wincap.needs_query_information ())
-       perms |= PROCESS_QUERY_INFORMATION;
-    }
+    perms |= PROCESS_DUP_HANDLE;
 
   if (!DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (),
                        GetCurrentProcess (), &parent, perms, TRUE, 0))
index 7309516bf311a4964258972b28cc97fabe82e7a8..15400d8d0f57b2ea93fef1f84b0e58a1f7008ef3 100644 (file)
@@ -24,7 +24,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
   mmap_storage_high:__MMAP_STORAGE_HIGH_LEGACY,
   {
     is_server:false,
-    needs_query_information:true,
     has_precise_system_time:false,
     has_microsoft_accounts:false,
     has_new_pebteb_region:false,
@@ -55,7 +54,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
   mmap_storage_high:__MMAP_STORAGE_HIGH_LEGACY,
   {
     is_server:false,
-    needs_query_information:true,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:false,
@@ -86,7 +84,6 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = {
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:false,
@@ -117,7 +114,6 @@ wincaps  wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared))
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:false,
@@ -148,7 +144,6 @@ wincaps  wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared))
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:false,
@@ -179,7 +174,6 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) =
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:true,
@@ -210,7 +204,6 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) =
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:true,
@@ -241,7 +234,6 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) =
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:true,
@@ -272,7 +264,6 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) =
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:true,
@@ -303,7 +294,6 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) =
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:true,
@@ -334,7 +324,6 @@ wincaps wincap_10_2004 __attribute__((section (".cygwin_dll_common"), shared)) =
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:true,
@@ -365,7 +354,6 @@ wincaps wincap_11 __attribute__((section (".cygwin_dll_common"), shared)) = {
   mmap_storage_high:__MMAP_STORAGE_HIGH,
   {
     is_server:false,
-    needs_query_information:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
     has_new_pebteb_region:true,
This page took 0.038493 seconds and 5 git commands to generate.