Drop support for Windows 8

Microsoft caused some very gentle breakages for Cosmopolitan. They
removed the version information from the PEB which caused uname to
report WINDOWS 0.0.0. We should have called GetVersionExW but that
doesn't really exist anymore either. Windows policy is now to give
whatever version we used in ape/ape.S. Windows8 has been EOL since
2023-01-10 so lets avoid our modern executables being relegated to
legacy infrastructure. Requiring Windows 10+ going forward lets us
remove runtime compatibility bloat from the codebase. Further note
Cosmopolitan maintains a Windows Vista branch on GitHub, so anyone
preferring the older versions, can still have a future with Cosmo.

Another neat thing this fixes is UTF-8 support in the console. The
changes Microsoft made broke the if statement that enabled UTF8 in
terminals. This explains why bug reports had broken arrows. In the
future this should be less of an issue, since the PEB code is gone
which means we more strictly conform to only Microsoft's WIN32 API
This commit is contained in:
Justine Tunney 2024-05-29 19:21:26 -07:00
parent f31a98d50a
commit e4d25d68e4
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
26 changed files with 17 additions and 942 deletions

View file

@ -1,19 +0,0 @@
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_VERSION_H_
#define COSMOPOLITAN_LIBC_NT_ENUM_VERSION_H_
/**
* Known versions of the New Technology executive.
* @see IsAtLeastWindows10()
* @see NtGetVersion()
*/
#define kNtVersionWindows10 0x0a00
#define kNtVersionWindows81 0x0603
#define kNtVersionWindows8 0x0602
#define kNtVersionWindows7 0x0601
#define kNtVersionWindowsVista 0x0600 /* intended baseline */
#define kNtVersionWindowsXp64 0x0502 /* end of the road */
#define kNtVersionWindowsXp 0x0501 /* snowball's chance */
#define kNtVersionWindows2000 0x0500 /* the golden age */
#define kNtVersionFuture 0x0b00
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_VERSION_H_ */