Cygwin: wincap: drop has_broken_prefetchvm flag and related code
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
		
							parent
							
								
									24363cffef
								
							
						
					
					
						commit
						bf6940a413
					
				|  | @ -1487,16 +1487,8 @@ posix_madvise (void *addr, size_t len, int advice) | ||||||
| 	WIN32_MEMORY_RANGE_ENTRY me = { base, size }; | 	WIN32_MEMORY_RANGE_ENTRY me = { base, size }; | ||||||
| 	if (!PrefetchVirtualMemory (GetCurrentProcess (), 1, &me, 0) | 	if (!PrefetchVirtualMemory (GetCurrentProcess (), 1, &me, 0) | ||||||
| 	    && GetLastError () != ERROR_PROC_NOT_FOUND) | 	    && GetLastError () != ERROR_PROC_NOT_FOUND) | ||||||
| 	  { |  | ||||||
| 	    /* FIXME 2015-08-27: On W10 build 10240 under WOW64,
 |  | ||||||
| 	       PrefetchVirtualMemory always returns ERROR_INVALID_PARAMETER |  | ||||||
| 	       for some reason.  If we're running on W10 WOW64, ignore this |  | ||||||
| 	       error.  This has been fixed in W10 1511. */ |  | ||||||
| 	    if (!wincap.has_broken_prefetchvm () |  | ||||||
| 		|| GetLastError () != ERROR_INVALID_PARAMETER) |  | ||||||
| 	  ret = EINVAL; | 	  ret = EINVAL; | ||||||
|       } |       } | ||||||
|       } |  | ||||||
|       break; |       break; | ||||||
|     case POSIX_MADV_DONTNEED: |     case POSIX_MADV_DONTNEED: | ||||||
|       { |       { | ||||||
|  |  | ||||||
|  | @ -27,7 +27,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { | ||||||
|     has_gaa_largeaddress_bug:true, |     has_gaa_largeaddress_bug:true, | ||||||
|     has_precise_system_time:false, |     has_precise_system_time:false, | ||||||
|     has_microsoft_accounts:false, |     has_microsoft_accounts:false, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:false, |     has_new_pebteb_region:false, | ||||||
|     has_broken_whoami:true, |     has_broken_whoami:true, | ||||||
|     has_unprivileged_createsymlink:false, |     has_unprivileged_createsymlink:false, | ||||||
|  | @ -58,7 +57,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:false, |     has_new_pebteb_region:false, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:false, |     has_unprivileged_createsymlink:false, | ||||||
|  | @ -89,7 +87,6 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:false, |     has_new_pebteb_region:false, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:false, |     has_unprivileged_createsymlink:false, | ||||||
|  | @ -120,7 +117,6 @@ wincaps  wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:true, |  | ||||||
|     has_new_pebteb_region:false, |     has_new_pebteb_region:false, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:false, |     has_unprivileged_createsymlink:false, | ||||||
|  | @ -151,7 +147,6 @@ wincaps  wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared)) | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:true, |  | ||||||
|     has_new_pebteb_region:false, |     has_new_pebteb_region:false, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:false, |     has_unprivileged_createsymlink:false, | ||||||
|  | @ -182,7 +177,6 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:true, |     has_new_pebteb_region:true, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:true, |     has_unprivileged_createsymlink:true, | ||||||
|  | @ -213,7 +207,6 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:true, |     has_new_pebteb_region:true, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:true, |     has_unprivileged_createsymlink:true, | ||||||
|  | @ -244,7 +237,6 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:true, |     has_new_pebteb_region:true, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:true, |     has_unprivileged_createsymlink:true, | ||||||
|  | @ -275,7 +267,6 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:true, |     has_new_pebteb_region:true, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:true, |     has_unprivileged_createsymlink:true, | ||||||
|  | @ -306,7 +297,6 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:true, |     has_new_pebteb_region:true, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:true, |     has_unprivileged_createsymlink:true, | ||||||
|  | @ -337,7 +327,6 @@ wincaps wincap_10_2004 __attribute__((section (".cygwin_dll_common"), shared)) = | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:true, |     has_new_pebteb_region:true, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:true, |     has_unprivileged_createsymlink:true, | ||||||
|  | @ -368,7 +357,6 @@ wincaps wincap_11 __attribute__((section (".cygwin_dll_common"), shared)) = { | ||||||
|     has_gaa_largeaddress_bug:false, |     has_gaa_largeaddress_bug:false, | ||||||
|     has_precise_system_time:true, |     has_precise_system_time:true, | ||||||
|     has_microsoft_accounts:true, |     has_microsoft_accounts:true, | ||||||
|     has_broken_prefetchvm:false, |  | ||||||
|     has_new_pebteb_region:true, |     has_new_pebteb_region:true, | ||||||
|     has_broken_whoami:false, |     has_broken_whoami:false, | ||||||
|     has_unprivileged_createsymlink:true, |     has_unprivileged_createsymlink:true, | ||||||
|  | @ -450,7 +438,6 @@ wincapc::init () | ||||||
|   ((wincaps *)caps)->is_server = (version.wProductType != VER_NT_WORKSTATION); |   ((wincaps *)caps)->is_server = (version.wProductType != VER_NT_WORKSTATION); | ||||||
|     { |     { | ||||||
|       ((wincaps *)caps)->has_gaa_largeaddress_bug = false; |       ((wincaps *)caps)->has_gaa_largeaddress_bug = false; | ||||||
|       ((wincaps *)caps)->has_broken_prefetchvm = false; |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|   __small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion, |   __small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion, | ||||||
|  |  | ||||||
|  | @ -21,7 +21,6 @@ struct wincaps | ||||||
|     unsigned has_gaa_largeaddress_bug				: 1; |     unsigned has_gaa_largeaddress_bug				: 1; | ||||||
|     unsigned has_precise_system_time				: 1; |     unsigned has_precise_system_time				: 1; | ||||||
|     unsigned has_microsoft_accounts				: 1; |     unsigned has_microsoft_accounts				: 1; | ||||||
|     unsigned has_broken_prefetchvm				: 1; |  | ||||||
|     unsigned has_new_pebteb_region				: 1; |     unsigned has_new_pebteb_region				: 1; | ||||||
|     unsigned has_broken_whoami					: 1; |     unsigned has_broken_whoami					: 1; | ||||||
|     unsigned has_unprivileged_createsymlink			: 1; |     unsigned has_unprivileged_createsymlink			: 1; | ||||||
|  | @ -82,7 +81,6 @@ public: | ||||||
|   bool	IMPLEMENT (has_gaa_largeaddress_bug) |   bool	IMPLEMENT (has_gaa_largeaddress_bug) | ||||||
|   bool	IMPLEMENT (has_precise_system_time) |   bool	IMPLEMENT (has_precise_system_time) | ||||||
|   bool	IMPLEMENT (has_microsoft_accounts) |   bool	IMPLEMENT (has_microsoft_accounts) | ||||||
|   bool	IMPLEMENT (has_broken_prefetchvm) |  | ||||||
|   bool	IMPLEMENT (has_new_pebteb_region) |   bool	IMPLEMENT (has_new_pebteb_region) | ||||||
|   bool	IMPLEMENT (has_broken_whoami) |   bool	IMPLEMENT (has_broken_whoami) | ||||||
|   bool	IMPLEMENT (has_unprivileged_createsymlink) |   bool	IMPLEMENT (has_unprivileged_createsymlink) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue