Make improvements

- Fix build flakes
- Polyfill SIGWINCH on Windows
- Fix an execve issue on Windows
- Make strerror show more information
- Improve cmd.exe setup/teardown on Windows
- Support bracketed paste mode in Blinkenlights
- Show keyboard shortcuts in Blinkenlights status bar
- Fixed copy_file_range() and copyfile() w/ zip filesystem
- Size optimize GetDosArgv() to keep life.com 12kb in size
- Improve Blinkenlights ability to load weird ELF executables
- Fix program_executable_name and add GetInterpreterExecutableName
- Make Python in tiny mode fail better if docstrings are requested
- Update Python test exclusions in tiny* modes such as tinylinux
- Add bulletproof unbreakable kprintf() troubleshooting function
- Remove "oldskool" keyword from ape.S for virus scanners
- Fix issue that caused backtraces to not print sometimes
- Improve Blinkenlights serial uart character i/o
- Make clock_gettime() not clobber errno on xnu
- Improve sha256 cpuid check for old computers
- Integrate some bestline linenoise fixes
- Show runit process names better in htop
- Remove SIGPIPE from ShowCrashReports()
- Make realpath() not clobber errno
- Avoid attaching GDB on non-Linux
- Improve img.com example
This commit is contained in:
Justine Tunney 2022-03-16 13:33:13 -07:00
parent 2a938b3eaa
commit b45d50b690
194 changed files with 4881 additions and 2966 deletions

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_CANARY,0,0,16,0,0,0

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_CANARYLEN,0,0,17,0,0,0

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_EHDRFLAGS,0,0,24,0,0,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_EXECFN,31,31,999,999,2014,31
.syscon auxv,AT_EXECFN,31,31,15,999,2014,31

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_EXECPATH,31,31,15,999,2014,31

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_FLAGS,8,0,0,0,0,0
.syscon auxv,AT_FLAGS,8,0,8,0,8,0

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_NCPUS,0,0,19,0,0,0

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_PAGESIZES,0,0,20,0,0,0

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_PAGESIZESLEN,0,0,21,0,0,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_RANDOM,25,0,0,0,0,0
.syscon auxv,AT_RANDOM,25,0,16,0,0,0

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_STACKBASE,0,0,0,0,13,0

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_STACKPROT,0,0,23,0,0,0

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon auxv,AT_TIMEKEEP,0,0,22,0,0,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_DODUMP,17,0,0,0,0,0
.syscon madv,MADV_DODUMP,17,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_DOFORK,11,0,0,0,0,0
.syscon madv,MADV_DOFORK,11,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_DONTDUMP,16,0,0,0,0,0
.syscon madv,MADV_DONTDUMP,16,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_DONTFORK,10,0,0,0,0,0
.syscon madv,MADV_DONTFORK,10,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_DONTNEED,4,4,4,4,4,0
.syscon madv,MADV_DONTNEED,4,4,4,4,4,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_HUGEPAGE,14,0,0,0,0,0
.syscon madv,MADV_HUGEPAGE,14,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_HWPOISON,100,0,0,0,0,0
.syscon madv,MADV_HWPOISON,100,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_MERGEABLE,12,0,0,0,0,0
.syscon madv,MADV_MERGEABLE,12,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_NOHUGEPAGE,15,0,0,0,0,0
.syscon madv,MADV_NOHUGEPAGE,15,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_REMOVE,9,0,0,0,0,0
.syscon madv,MADV_REMOVE,9,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon madv,MADV_UNMERGEABLE,13,0,0,0,0,0
.syscon madv,MADV_UNMERGEABLE,13,127,127,127,127,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,MAP_ANON,0x20,0x1000,0x1000,0x1000,0x1000,0x20
.syscon compat,MAP_ANON,0x20,0x1000,0x0001000,0x1000,0x1000,0x20

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon mmap,MAP_ANONYMOUS,0x20,0x1000,0x1000,0x1000,0x1000,0x20
.syscon mmap,MAP_ANONYMOUS,0x20,0x1000,0x0001000,0x1000,0x1000,0x20

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon mmap,MAP_FIXED,0x10,0x10,0x10,0x10,0x10,0x10
.syscon mmap,MAP_FIXED,0x0000010,0x0000010,0x0000010,0x0000010,0x0000010,0x0000010

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon mmap,MAP_FIXED_NOREPLACE,0x8000000,0x8000000,0x8000000,0x8000000,0x8000000,0x8000000

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon mmap,MAP_GROWSDOWN,0x0100,0,0x0400,0x4000,0x4000,0x100000
.syscon mmap,MAP_GROWSDOWN,0x0100,0,0x0000400,0x4000,0x4000,0x100000

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,MAP_NOCORE,0,0,0x20000,0x8000,0x8000,0
.syscon compat,MAP_NOCORE,0,0,0x0020000,0x8000,0x8000,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,MAP_STACK,0x0100,0,0x0400,0x4000,0x2000,0x100000
.syscon mmap,MAP_STACK,0x0100,0,0x0000400,0x4000,0x2000,0x100000

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_DONTNEED,4,0,4,4,4,0
.syscon compat,POSIX_FADV_DONTNEED,4,127,4,4,4,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon fadv,POSIX_FADV_NOREUSE,5,0,5,0,5,0
.syscon fadv,POSIX_FADV_NOREUSE,5,127,5,127,5,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_RANDOM,1,0,1,1,1,0x10000000
.syscon compat,POSIX_FADV_RANDOM,1,127,1,1,1,0x10000000

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_SEQUENTIAL,2,0,2,2,2,0x8000000
.syscon compat,POSIX_FADV_SEQUENTIAL,2,127,2,2,2,0x8000000

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_WILLNEED,3,0,3,3,3,3
.syscon compat,POSIX_FADV_WILLNEED,3,127,3,3,3,3

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_MADV_DONTNEED,4,4,4,4,4,0
.syscon compat,POSIX_MADV_DONTNEED,4,4,4,4,4,127

View file

@ -31,6 +31,16 @@ extern const long AT_SECURE;
extern const long AT_SYSINFO_EHDR;
extern const long AT_UCACHEBSIZE;
extern const long AT_UID;
extern const long AT_STACKBASE;
extern const long AT_EXECPATH;
extern const long AT_CANARY;
extern const long AT_CANARYLEN;
extern const long AT_NCPUS;
extern const long AT_PAGESIZES;
extern const long AT_PAGESIZESLEN;
extern const long AT_TIMEKEEP;
extern const long AT_STACKPROT;
extern const long AT_EHDRFLAGS;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
@ -62,5 +72,15 @@ COSMOPOLITAN_C_END_
#define AT_SYSINFO_EHDR SYMBOLIC(AT_SYSINFO_EHDR)
#define AT_UCACHEBSIZE SYMBOLIC(AT_UCACHEBSIZE)
#define AT_UID SYMBOLIC(AT_UID)
#define AT_STACKBASE SYMBOLIC(AT_STACKBASE)
#define AT_EXECPATH SYMBOLIC(AT_EXECPATH)
#define AT_CANARY SYMBOLIC(AT_CANARY)
#define AT_CANARYLEN SYMBOLIC(AT_CANARYLEN)
#define AT_NCPUS SYMBOLIC(AT_NCPUS)
#define AT_PAGESIZES SYMBOLIC(AT_PAGESIZES)
#define AT_PAGESIZESLEN SYMBOLIC(AT_PAGESIZESLEN)
#define AT_TIMEKEEP SYMBOLIC(AT_TIMEKEEP)
#define AT_STACKPROT SYMBOLIC(AT_STACKPROT)
#define AT_EHDRFLAGS SYMBOLIC(AT_EHDRFLAGS)
#endif /* COSMOPOLITAN_LIBC_CALLS_AUXV_H_ */

View file

@ -2,42 +2,42 @@
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MADV_H_
#include "libc/runtime/symbolic.h"
#define MADV_DODUMP SYMBOLIC(MADV_DODUMP)
#define MADV_DOFORK SYMBOLIC(MADV_DOFORK)
#define MADV_DONTDUMP SYMBOLIC(MADV_DONTDUMP)
#define MADV_DONTFORK SYMBOLIC(MADV_DONTFORK)
#define MADV_DONTNEED SYMBOLIC(MADV_DONTNEED)
#define MADV_FREE SYMBOLIC(MADV_FREE)
#define MADV_HUGEPAGE SYMBOLIC(MADV_HUGEPAGE)
#define MADV_HWPOISON SYMBOLIC(MADV_HWPOISON)
#define MADV_MERGEABLE SYMBOLIC(MADV_MERGEABLE)
#define MADV_NOHUGEPAGE SYMBOLIC(MADV_NOHUGEPAGE)
#define MADV_NORMAL SYMBOLIC(MADV_NORMAL)
#define MADV_RANDOM SYMBOLIC(MADV_RANDOM)
#define MADV_REMOVE SYMBOLIC(MADV_REMOVE)
#define MADV_SEQUENTIAL SYMBOLIC(MADV_SEQUENTIAL)
#define MADV_DODUMP SYMBOLIC(MADV_DODUMP)
#define MADV_DOFORK SYMBOLIC(MADV_DOFORK)
#define MADV_DONTDUMP SYMBOLIC(MADV_DONTDUMP)
#define MADV_DONTFORK SYMBOLIC(MADV_DONTFORK)
#define MADV_DONTNEED SYMBOLIC(MADV_DONTNEED)
#define MADV_FREE SYMBOLIC(MADV_FREE)
#define MADV_HUGEPAGE SYMBOLIC(MADV_HUGEPAGE)
#define MADV_HWPOISON SYMBOLIC(MADV_HWPOISON)
#define MADV_MERGEABLE SYMBOLIC(MADV_MERGEABLE)
#define MADV_NOHUGEPAGE SYMBOLIC(MADV_NOHUGEPAGE)
#define MADV_NORMAL SYMBOLIC(MADV_NORMAL)
#define MADV_RANDOM SYMBOLIC(MADV_RANDOM)
#define MADV_REMOVE SYMBOLIC(MADV_REMOVE)
#define MADV_SEQUENTIAL SYMBOLIC(MADV_SEQUENTIAL)
#define MADV_UNMERGEABLE SYMBOLIC(MADV_UNMERGEABLE)
#define MADV_WILLNEED SYMBOLIC(MADV_WILLNEED)
#define MADV_WILLNEED SYMBOLIC(MADV_WILLNEED)
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const long MADV_DODUMP;
extern const long MADV_DOFORK;
extern const long MADV_DONTDUMP;
extern const long MADV_DONTFORK;
extern const long MADV_DONTNEED;
extern const long MADV_FREE;
extern const long MADV_HUGEPAGE;
extern const long MADV_HWPOISON;
extern const long MADV_MERGEABLE;
extern const long MADV_NOHUGEPAGE;
extern const long MADV_NORMAL;
extern const long MADV_RANDOM;
extern const long MADV_REMOVE;
extern const long MADV_SEQUENTIAL;
extern const long MADV_UNMERGEABLE;
extern const long MADV_WILLNEED;
extern const unsigned MADV_DODUMP;
extern const unsigned MADV_DOFORK;
extern const unsigned MADV_DONTDUMP;
extern const unsigned MADV_DONTFORK;
extern const unsigned MADV_DONTNEED;
extern const unsigned MADV_FREE;
extern const unsigned MADV_HUGEPAGE;
extern const unsigned MADV_HWPOISON;
extern const unsigned MADV_MERGEABLE;
extern const unsigned MADV_NOHUGEPAGE;
extern const unsigned MADV_NORMAL;
extern const unsigned MADV_RANDOM;
extern const unsigned MADV_REMOVE;
extern const unsigned MADV_SEQUENTIAL;
extern const unsigned MADV_UNMERGEABLE;
extern const unsigned MADV_WILLNEED;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

File diff suppressed because it is too large Load diff

View file

@ -4,39 +4,39 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const long O_ACCMODE;
extern const long O_APPEND;
extern const long O_ASYNC;
extern const long O_CLOEXEC;
extern const long O_CREAT;
extern const long O_DIRECT;
extern const long O_DIRECTORY;
extern const long O_DSYNC;
extern const long O_EXCL;
extern const long O_EXEC;
extern const long O_EXLOCK;
extern const long O_LARGEFILE;
extern const long O_NDELAY;
extern const long O_NOATIME;
extern const long O_NOCTTY;
extern const long O_NOFOLLOW;
extern const long O_NOFOLLOW_ANY;
extern const long O_NONBLOCK;
extern const long O_PATH;
extern const long O_RANDOM;
extern const long O_RDONLY;
extern const long O_RDWR;
extern const long O_RSYNC;
extern const long O_SEARCH;
extern const long O_SEQUENTIAL;
extern const long O_SHLOCK;
extern const long O_SPARSE;
extern const long O_SYNC;
extern const long O_TMPFILE;
extern const long O_TRUNC;
extern const long O_TTY_INIT;
extern const long O_VERIFY;
extern const long O_WRONLY;
extern const unsigned O_ACCMODE;
extern const unsigned O_APPEND;
extern const unsigned O_ASYNC;
extern const unsigned O_CLOEXEC;
extern const unsigned O_CREAT;
extern const unsigned O_DIRECT;
extern const unsigned O_DIRECTORY;
extern const unsigned O_DSYNC;
extern const unsigned O_EXCL;
extern const unsigned O_EXEC;
extern const unsigned O_EXLOCK;
extern const unsigned O_LARGEFILE;
extern const unsigned O_NDELAY;
extern const unsigned O_NOATIME;
extern const unsigned O_NOCTTY;
extern const unsigned O_NOFOLLOW;
extern const unsigned O_NOFOLLOW_ANY;
extern const unsigned O_NONBLOCK;
extern const unsigned O_PATH;
extern const unsigned O_RANDOM;
extern const unsigned O_RDONLY;
extern const unsigned O_RDWR;
extern const unsigned O_RSYNC;
extern const unsigned O_SEARCH;
extern const unsigned O_SEQUENTIAL;
extern const unsigned O_SHLOCK;
extern const unsigned O_SPARSE;
extern const unsigned O_SYNC;
extern const unsigned O_TMPFILE;
extern const unsigned O_TRUNC;
extern const unsigned O_TTY_INIT;
extern const unsigned O_VERIFY;
extern const unsigned O_WRONLY;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */