mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
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:
parent
f31a98d50a
commit
e4d25d68e4
26 changed files with 17 additions and 942 deletions
|
@ -43,7 +43,6 @@
|
|||
#include "libc/nt/startupinfo.h"
|
||||
#include "libc/nt/struct/ldrdatatableentry.h"
|
||||
#include "libc/nt/struct/startupinfo.h"
|
||||
#include "libc/nt/struct/teb.h"
|
||||
#include "libc/runtime/clktck.h"
|
||||
#include "libc/runtime/internal.h"
|
||||
#include "libc/runtime/memtrack.internal.h"
|
||||
|
@ -83,19 +82,6 @@ static const char *FindNameById(const struct IdName *names, unsigned long id) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void PrintDependencies(const char *prologue) {
|
||||
#ifdef __x86_64__
|
||||
struct NtLinkedList *head = &NtGetPeb()->Ldr->InLoadOrderModuleList;
|
||||
struct NtLinkedList *ldr = head->Next;
|
||||
do {
|
||||
const struct NtLdrDataTableEntry *dll =
|
||||
(const struct NtLdrDataTableEntry *)ldr;
|
||||
PRINT(" ☼ %.*!hs (%'zukb @ %p)", dll->FullDllName.Length,
|
||||
dll->FullDllName.Data, dll->SizeOfImage / 1024, dll->DllBase);
|
||||
} while ((ldr = ldr->Next) && ldr != head);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void Print(const char *prologue) {
|
||||
}
|
||||
|
||||
|
@ -693,29 +679,6 @@ textstartup void __printargs(const char *prologue) {
|
|||
GetStdHandle(kNtStdErrorHandle));
|
||||
if (GetConsoleMode(GetStdHandle(kNtStdErrorHandle), &cm))
|
||||
PRINT(" %s", DescribeNtConsoleOutFlags(cm));
|
||||
|
||||
#ifdef __x86_64__
|
||||
PRINT("");
|
||||
PRINT("TEB");
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x00, "NtGetSeh()", _NtGetSeh());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x08, "NtGetStackHigh()", _NtGetStackHigh());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x10, "NtGetStackLow()", _NtGetStackLow());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x18, "_NtGetSubsystemTib()",
|
||||
_NtGetSubsystemTib());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x20, "NtGetFib()", _NtGetFib());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x30, "NtGetTeb()", NtGetTeb());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x38, "NtGetEnv()", _NtGetEnv());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x40, "NtGetPid()", NtGetPid());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x48, "NtGetTid()", NtGetTid());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x50, "NtGetRpc()", _NtGetRpc());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x58, "NtGetTls()", _NtGetTls());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x60, "NtGetPeb()", NtGetPeb());
|
||||
PRINT(" ☼ gs:0x%02x %s = %p", 0x68, "NtGetErr()", NtGetErr());
|
||||
#endif
|
||||
|
||||
PRINT("");
|
||||
PRINT("DEPENDENCIES");
|
||||
PrintDependencies(prologue);
|
||||
}
|
||||
|
||||
PRINT("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue