mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 00:08:30 +00:00
Rename LINUX to _HOSTLINUX etc. to reduce clashes (#655)
Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
This commit is contained in:
parent
9209ea63a7
commit
7a06760e6f
15 changed files with 85 additions and 85 deletions
|
@ -52,21 +52,21 @@ syscall:
|
|||
// convert from consts.sh to syscalls.sh encoding
|
||||
push %rcx
|
||||
mov __hostos(%rip),%cl
|
||||
test $LINUX,%cl
|
||||
test $_HOSTLINUX,%cl
|
||||
jnz 2f
|
||||
1: test $FREEBSD,%cl
|
||||
1: test $_HOSTFREEBSD,%cl
|
||||
jz 1f
|
||||
shl $4*7,%rax
|
||||
jmp 2f
|
||||
1: test $OPENBSD,%cl
|
||||
1: test $_HOSTOPENBSD,%cl
|
||||
jz 1f
|
||||
shl $4*10,%rax
|
||||
jmp 2f
|
||||
1: test $NETBSD,%cl
|
||||
1: test $_HOSTNETBSD,%cl
|
||||
jz 1f
|
||||
shl $4*13,%rax
|
||||
jmp 2f
|
||||
1: test $XNU,%cl
|
||||
1: test $_HOSTXNU,%cl
|
||||
jz 2f
|
||||
mov %eax,%ecx
|
||||
and $0x0f000000,%ecx
|
||||
|
|
|
@ -219,7 +219,7 @@ systemfive_xnu:
|
|||
#if SupportsOpenbsd()
|
||||
cmpq $0,(%r15) # OpenBSD has no auxv
|
||||
jnz 0f
|
||||
mov $OPENBSD,%al
|
||||
mov $_HOSTOPENBSD,%al
|
||||
jmp _init_systemfive_detected
|
||||
0:
|
||||
#endif
|
||||
|
@ -227,14 +227,14 @@ systemfive_xnu:
|
|||
xor %ecx,%ecx
|
||||
0: cmpq $2014,(%r15,%rcx,8) # NetBSD's AT_EXECFN
|
||||
jne 1f
|
||||
mov $NETBSD,%al
|
||||
mov $_HOSTNETBSD,%al
|
||||
jmp _init_systemfive_detected
|
||||
1: cmpq $0,(%r15,%rcx,8)
|
||||
lea 2(%ecx),%ecx
|
||||
jnz 0b
|
||||
2:
|
||||
#endif
|
||||
mov $LINUX,%al
|
||||
mov $_HOSTLINUX,%al
|
||||
_init_systemfive_detected:
|
||||
stosq #→ __hostos
|
||||
bsr %eax,%eax
|
||||
|
@ -356,7 +356,7 @@ _init_systemfive_pid:
|
|||
ezlea __hostos,cx
|
||||
mov (%rcx),%al
|
||||
mov (%rdi),%eax
|
||||
testb $WINDOWS|METAL,(%rcx)
|
||||
testb $_HOSTWINDOWS|_HOSTMETAL,(%rcx)
|
||||
jnz 1f
|
||||
mov __NR_getpid,%eax
|
||||
syscall
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue