mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Switch public headers to getopt_long() entirely
Cosmopolitan's getopt() is now redefined as __getopt().
This commit is contained in:
parent
0c630d95b5
commit
fe044e22cc
137 changed files with 148 additions and 179 deletions
|
@ -40,22 +40,23 @@ __tailcontext:
|
|||
movaps 0x60(%rax),%xmm14
|
||||
movaps 0x70(%rax),%xmm15
|
||||
|
||||
mov 40(%rdi),%r8
|
||||
mov 48(%rdi),%r9
|
||||
mov 56(%rdi),%r10
|
||||
mov 64(%rdi),%r11
|
||||
mov 72(%rdi),%r12
|
||||
mov 80(%rdi),%r13
|
||||
mov 88(%rdi),%r14
|
||||
mov 96(%rdi),%r15
|
||||
mov 112(%rdi),%rsi
|
||||
mov 120(%rdi),%rbp
|
||||
mov 128(%rdi),%rbx
|
||||
mov 136(%rdi),%rdx
|
||||
mov 152(%rdi),%rcx
|
||||
mov 160(%rdi),%rsp
|
||||
push 168(%rdi)
|
||||
mov 104(%rdi),%rdi
|
||||
lea 80(%rdi),%rax
|
||||
mov -40(%rax),%r8
|
||||
mov -32(%rax),%r9
|
||||
mov -24(%rax),%r10
|
||||
mov -16(%rax),%r11
|
||||
mov -8(%rax),%r12
|
||||
mov 0(%rax),%r13
|
||||
mov 8(%rax),%r14
|
||||
mov 16(%rax),%r15
|
||||
mov 32(%rax),%rsi
|
||||
mov 40(%rax),%rbp
|
||||
mov 48(%rax),%rbx
|
||||
mov 56(%rax),%rdx
|
||||
mov 72(%rax),%rcx
|
||||
mov 80(%rax),%rsp
|
||||
push 88(%rax)
|
||||
mov 24(%rax),%rdi
|
||||
|
||||
xor %eax,%eax
|
||||
ret
|
||||
|
|
|
@ -43,7 +43,7 @@ typedef struct Elf64_Rel {
|
|||
*
|
||||
* Each relocation type specifies a mathematical formula that's used
|
||||
* to compute the appropriate value for the fixed-up object code. If
|
||||
* if needs an addend, then this struct doesn't have one, but it can
|
||||
* it needs an addend, then this struct doesn't have one, but it can
|
||||
* still be embedded by the compiler in the location to be modified.
|
||||
*/
|
||||
Elf64_Xword r_info;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef _GETOPT_H
|
||||
#define _GETOPT_H
|
||||
#include "third_party/getopt/getopt.h"
|
||||
#include "third_party/getopt/long.h"
|
||||
#endif /* _GETOPT_H */
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "libc/stdio/temp.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/exit.h"
|
||||
#include "third_party/getopt/getopt.h"
|
||||
#include "third_party/getopt/long.h"
|
||||
#include "third_party/musl/crypt.h"
|
||||
#include "third_party/musl/rand48.h"
|
||||
#endif /* _STDLIB_H */
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/ok.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/getopt/getopt.h"
|
||||
#include "third_party/getopt/long.h"
|
||||
#include "third_party/musl/crypt.h"
|
||||
#include "third_party/musl/lockf.h"
|
||||
#endif /* _UNISTD_H */
|
||||
|
|
|
@ -60,9 +60,8 @@
|
|||
? __ckd_##op##ll((__ckd_dword *)(res), (x), (y)) \
|
||||
: __ckd_trap()))
|
||||
|
||||
__funline int __ckd_trap(void) {
|
||||
volatile int __x = 0;
|
||||
return 1 / __x;
|
||||
__funline wontreturn int __ckd_trap(void) {
|
||||
*(volatile int *)0 = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
#include "libc/sysv/consts/sig.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "third_party/dlmalloc/dlmalloc.h"
|
||||
#include "third_party/getopt/getopt.h"
|
||||
#include "third_party/getopt/getopt.internal.h"
|
||||
|
||||
#define USAGE \
|
||||
" [FLAGS]\n\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue