Rename LINUX to _HOSTLINUX etc. to reduce clashes (#655)

Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
This commit is contained in:
tkchia 2022-10-11 11:31:25 +08:00 committed by GitHub
parent 9209ea63a7
commit 7a06760e6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 85 additions and 85 deletions

View file

@ -205,22 +205,22 @@ int arch_prctl(int code, int64_t addr) {
rc = efault();
} else {
switch (__hostos) {
case METAL:
case _HOSTMETAL:
rc = arch_prctl_msr(code, addr);
break;
case FREEBSD:
case _HOSTFREEBSD:
rc = arch_prctl_freebsd(code, addr);
break;
case NETBSD:
case _HOSTNETBSD:
rc = arch_prctl_netbsd(code, addr);
break;
case OPENBSD:
case _HOSTOPENBSD:
rc = arch_prctl_openbsd(code, addr);
break;
case LINUX:
case _HOSTLINUX:
rc = sys_arch_prctl(code, addr);
break;
case XNU:
case _HOSTXNU:
rc = arch_prctl_xnu(code, addr);
break;
default:

View file

@ -74,7 +74,7 @@ __msabi noasan EFI_STATUS EfiMain(EFI_HANDLE ImageHandle,
uint64_t p, pe, cr4, *m, *pd, *sp, *pml4t, *pdt1, *pdt2, *pdpt1, *pdpt2;
extern char __os asm("__hostos");
__os = METAL;
__os = _HOSTMETAL;
/*
* Allocates and clears PC-compatible memory and copies image.

View file

@ -266,7 +266,7 @@ __msabi textwindows int64_t WinMain(int64_t hInstance, int64_t hPrevInstance,
const char *lpCmdLine, int64_t nCmdShow) {
const char16_t *cmdline;
extern char os asm("__hostos");
os = WINDOWS; /* madness https://news.ycombinator.com/item?id=21019722 */
os = _HOSTWINDOWS; /* madness https://news.ycombinator.com/item?id=21019722 */
kStartTsc = rdtsc();
__pid = GetCurrentProcessId();
#if !IsTiny()