summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-12-23 00:21:21 +0100
committerCorinna Vinschen <corinna@vinschen.de>2018-12-23 00:24:05 +0100
commit092a768885fceb0962c8654b176d1046e2af081d (patch)
treeae5cb0976d9841b04db0d7b8aa20e372c0d82efd
parent29cfc892a50a6fe2ffff585c1861e255c2196513 (diff)
downloadcygnal-092a768885fceb0962c8654b176d1046e2af081d.tar.gz
cygnal-092a768885fceb0962c8654b176d1046e2af081d.tar.bz2
cygnal-092a768885fceb0962c8654b176d1046e2af081d.zip
Cygwin: wincap: add wincap_10_1709, add has_posix_file_info item
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>
-rw-r--r--winsup/cygwin/wincap.cc42
-rw-r--r--winsup/cygwin/wincap.h2
2 files changed, 38 insertions, 6 deletions
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index d5d8ef63c..4ba9aa51d 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -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);
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index cc1c6ba99..649246299 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -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
};