]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: wincap: add wincap_10_1709, add has_posix_file_info item
authorCorinna Vinschen <corinna@vinschen.de>
Sat, 22 Dec 2018 23:21:21 +0000 (00:21 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Sat, 22 Dec 2018 23:24:05 +0000 (00:24 +0100)
Various new file info class members adding important POSIX semantics
have been added with W10 1709.  We may want to utilize them, so add
a matching wincaps.

Rearrange checking the W10 build number to prefer the latest builds
over the older builds.  Rename wincap_10 to wincap_10_1507 for
enhanced clarity.

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

index d5d8ef63cc7efc5b81892d66d49ea9fed74868fc..4ba9aa51d7ddd1f89d91c5821c1b8a85bdaa4ca2 100644 (file)
@@ -8,6 +8,7 @@ Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
 details. */
 
 #include "winsup.h"
+#include "miscfuncs.h"
 #include "security.h"
 #include "ntdll.h"
 
@@ -34,6 +35,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_unprivileged_createsymlink:false,
     has_unbiased_interrupt_time:false,
     has_precise_interrupt_time:false,
+    has_posix_file_info:false,
   },
 };
 
@@ -54,6 +56,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_unprivileged_createsymlink:false,
     has_unbiased_interrupt_time:true,
     has_precise_interrupt_time:false,
+    has_posix_file_info:false,
   },
 };
 
@@ -74,10 +77,11 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_unprivileged_createsymlink:false,
     has_unbiased_interrupt_time:true,
     has_precise_interrupt_time:false,
+    has_posix_file_info:false,
   },
 };
 
-wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
+wincaps  wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) = {
   def_guard_pages:2,
   {
     is_server:false,
@@ -94,6 +98,7 @@ wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_unprivileged_createsymlink:false,
     has_unbiased_interrupt_time:true,
     has_precise_interrupt_time:true,
+    has_posix_file_info:false,
   },
 };
 
@@ -114,6 +119,7 @@ wincaps wincap_10_1511 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_unprivileged_createsymlink:false,
     has_unbiased_interrupt_time:true,
     has_precise_interrupt_time:true,
+    has_posix_file_info:false,
   },
 };
 
@@ -134,6 +140,28 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_unprivileged_createsymlink:true,
     has_unbiased_interrupt_time:true,
     has_precise_interrupt_time:true,
+    has_posix_file_info:false,
+  },
+};
+
+wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = {
+  def_guard_pages:2,
+  {
+    is_server:false,
+    needs_count_in_si_lpres2:false,
+    has_gaa_largeaddress_bug:false,
+    has_broken_alloc_console:true,
+    has_console_logon_sid:true,
+    has_precise_system_time:true,
+    has_microsoft_accounts:true,
+    has_processor_groups:true,
+    has_broken_prefetchvm:false,
+    has_new_pebteb_region:true,
+    has_broken_whoami:false,
+    has_unprivileged_createsymlink:true,
+    has_unbiased_interrupt_time:true,
+    has_precise_interrupt_time:true,
+    has_posix_file_info:true,
   },
 };
 
@@ -171,18 +199,20 @@ wincapc::init ()
              caps = &wincap_8;
              break;
            default:
-             caps = &wincap_10;
+             caps = &wincap_10_1507;
              break;
          }
        break;
       case 10:
       default:
-       if (version.dwBuildNumber < 10586)
-         caps = &wincap_10;
-       else if (version.dwBuildNumber < 15063)
+       if (likely (version.dwBuildNumber >= 16299))
+         caps = &wincap_10_1709;
+       else if (version.dwBuildNumber >= 15063)
+         caps = &wincap_10_1703;
+       else if (version.dwBuildNumber >= 10586)
          caps = &wincap_10_1511;
        else
-         caps = &wincap_10_1703;
+         caps = & wincap_10_1507;
     }
 
   ((wincaps *)caps)->is_server = (version.wProductType != VER_NT_WORKSTATION);
index cc1c6ba99c3b514b1f1e586ea130535ebdbdc404..64924629936f01a7bb156c957bbbeb3258bbe2a6 100644 (file)
@@ -29,6 +29,7 @@ struct wincaps
     unsigned has_unprivileged_createsymlink    : 1;
     unsigned has_unbiased_interrupt_time       : 1;
     unsigned has_precise_interrupt_time                : 1;
+    unsigned has_posix_file_info               : 1;
   };
 };
 
@@ -78,6 +79,7 @@ public:
   bool IMPLEMENT (has_unprivileged_createsymlink)
   bool IMPLEMENT (has_unbiased_interrupt_time)
   bool IMPLEMENT (has_precise_interrupt_time)
+  bool IMPLEMENT (has_posix_file_info)
 
 #undef IMPLEMENT
 };
This page took 0.038347 seconds and 5 git commands to generate.