mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 12:18:31 +00:00
Remove some problematic APIs
In order to improve our chances of success building other open source projects we shouldn't define APIs that'll lead any ./configure script astray. For example: - brk() and sbrk() can break mac/windows support - syscall() is a superb way to break portability - arch_prctl() is the greatest of all horror shows
This commit is contained in:
parent
7512318a2a
commit
32682f0ce7
24 changed files with 37 additions and 919 deletions
|
@ -21,7 +21,6 @@
|
|||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/brk.internal.h"
|
||||
#include "libc/runtime/memtrack.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/winargs.internal.h"
|
||||
|
@ -29,11 +28,6 @@
|
|||
#define UNSHADOW(x) ((int64_t)(MAX(0, (x)-0x7fff8000)) << 3)
|
||||
#define FRAME(x) ((int)((x) >> 16))
|
||||
|
||||
forceinline pureconst bool IsBrkFrame(int x) {
|
||||
unsigned char *p = (unsigned char *)ADDR_32_TO_48(x);
|
||||
return _weaken(__brk) && p >= _end && p < _weaken(__brk)->p;
|
||||
}
|
||||
|
||||
static const char *GetFrameName(int x) {
|
||||
if (!x) {
|
||||
return "null";
|
||||
|
@ -47,8 +41,6 @@ static const char *GetFrameName(int x) {
|
|||
return "arena";
|
||||
} else if (IsStaticStackFrame(x)) {
|
||||
return "stack";
|
||||
} else if (IsBrkFrame(x)) {
|
||||
return "brk";
|
||||
} else if (IsGfdsFrame(x)) {
|
||||
return "g_fds";
|
||||
} else if (IsZiposFrame(x)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue