mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 01:38:30 +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
|
@ -81,7 +81,7 @@ struct Zipos *__zipos_get(void) {
|
|||
fd = open(progpath, O_RDONLY);
|
||||
}
|
||||
if (fd != -1) {
|
||||
if ((size = getfiledescriptorsize(fd)) != -1ul &&
|
||||
if ((size = lseek(fd, 0, SEEK_END)) != -1 &&
|
||||
(map = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0)) != MAP_FAILED) {
|
||||
if ((base = FindEmbeddedApe(map, size))) {
|
||||
size -= base - map;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue