cosmopolitan/libc/runtime
Justine Tunney bf03b2e64c Make major improvements to redbean and libraries
The most exciting improvement is dynamic pages will soon be able to use
the executable itself as an object store. it required a heroic technique
for overcoming ETXTBSY restrictions which lets us open the executable in
read/write mode, which means (1) wa can restore the APE header, and (2)
we can potentially containerize redbean extension code so that modules
you download for your redbean online will only impact your redbean.

Here's a list of breaking changes to redbean:

- Remove /tool/net/ prefix from magic ZIP paths
- GetHeader() now returns NIL if header is absent

Here's a list of fixes and enhancements to redbean:

- Support 64-bit ZIP archives
- Record User-Agent header in logs
- Add twelve error handlers to accept()
- Display octal st_mode on listing page
- Show ZIP file comments on listing page
- Restore APE MZ header on redbean startup
- Track request count on redbean index page
- Report server uptime on redbean index page
- Don't bind server socket using SO_REUSEPORT
- Fix #151 where Lua LoadAsset() could free twice
- Report rusage accounting when workers exit w/ -vv
- Use ZIP iattr field as text/plain vs. binary hint
- Add ParseUrl() API for parsing things like a.href
- Add ParseParams() API for parsing HTTP POST bodies
- Add IsAcceptablePath() API for checking dots, etc.
- Add IsValidHttpToken() API for validating sane ASCII
- Add IsAcceptableHostPort() for validating HOST[:PORT]
- Send 400 response to HTTP/1.1 requests without a Host
- Send 403 response if ZIP or file isn't other readable
- Add virtual hosting that tries prepending Host to path
- Route requests based on Host in Request-URI if present
- Host routing will attempt to remove or add the www. prefix
- Sign-extend UNIX timestamps and don't adjust FileTime zone

Here's some of the improvements made to Cosmopolitan Libc:

- Fix ape.S indentation
- Improve consts.sh magnums
- Write pretty good URL parser
- Improve rusage accounting apis
- Bring mremap() closer to working
- Added ZIP APIs which will change
- Check for overflow in reallocarray()
- Remove overly fancy linkage in strerror()
- Fix GDB attach on crash w/ OpenBSD msyscall()
- Make sigqueue() portable to most UNIX distros
- Make integer serialization macros more elegant
- Bring back 34x tprecode8to16() performance boost
- Make malloc() more resilient to absurdly large sizes
2021-04-18 12:34:15 -07:00
..
abort-nt.c Improve signal handling and math 2021-02-25 18:33:33 -08:00
abort.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
arch_prctl.c Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
arememoryintervalsok.c Eliminate some flakes 2021-02-03 06:25:27 -08:00
assertfail.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
atexit.c Change license 2020-12-27 17:18:44 -08:00
brk.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
buffer.h Initial import 2020-06-15 07:18:57 -07:00
carsort.h Add x86_64-linux-gnu emulator 2020-08-25 04:43:42 -07:00
carsort100.c Change license 2020-12-27 17:18:44 -08:00
carsort1000.c Change license 2020-12-27 17:18:44 -08:00
clearenv.c Change license 2020-12-27 17:18:44 -08:00
clktck.c Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
clktck.h Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
close_s.c Change license 2020-12-27 17:18:44 -08:00
closesymboltable.c Change license 2020-12-27 17:18:44 -08:00
construct.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cosmo.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cxaatexit.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
describeos.c Change license 2020-12-27 17:18:44 -08:00
directmap-metal.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
directmap-nt.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
directmap.c Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
directmap.internal.h Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
dlfcn.h Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
dsohandle.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
e820.internal.h Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
efimain.greg.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
exit.c Restore Windows command prompt mode on exit 2021-02-27 12:53:51 -08:00
exit2.c Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
exit3.c Perform some code cleanup 2021-02-27 10:33:32 -08:00
ezmap.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ezmap.internal.h Improve documentation 2020-12-27 07:02:35 -08:00
fegetround.c Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
fenv.c Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
fenv.h Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
fesetround.c Fix issues revealed by ECMAScript test262 2021-04-10 17:15:35 -07:00
findcombinary.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
finddebugbinary.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
findmemoryinterval.c Eliminate some flakes 2021-02-03 06:25:27 -08:00
fltrounds.c Fix issues revealed by ECMAScript test262 2021-04-10 17:15:35 -07:00
fork-nt.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
fork.c Apply some touchups 2021-02-07 07:02:46 -08:00
fpreset.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
free_s.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
ftrace-hook.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ftrace.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
g_argc.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
gc.h Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
gc.internal.h Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
getdosargv.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
getdosenviron.c Eliminate some flakes 2021-02-03 06:25:27 -08:00
getpagesize.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
grow.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
hook.greg.c Perform minor fixups 2021-03-13 19:40:04 -08:00
init.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
internal.h Restore Windows command prompt mode on exit 2021-02-27 12:53:51 -08:00
interruptiblecall.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
interruptiblecall.h Initial import 2020-06-15 07:18:57 -07:00
isheap.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
issetugid.c Change license 2020-12-27 17:18:44 -08:00
jmpstack.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ldso.c Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
mapanon.c Change license 2020-12-27 17:18:44 -08:00
mapelfread.c Change license 2020-12-27 17:18:44 -08:00
memtrack.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
memtrack.h Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
memtracknt.c Eliminate some flakes 2021-02-03 06:25:27 -08:00
metalprintf.greg.c Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
metalprintf.internal.h Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
mman.greg.c Bring life.com executable size back down to 12kb 2021-03-02 01:13:32 -08:00
mman.internal.h Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
mmap.c Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
mmi.c Change license 2020-12-27 17:18:44 -08:00
mremap-sysv.c Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
mremap.c Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
msync-nt.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
msync.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
munmap-metal.c Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
munmap.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
openexecutable.S Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
opensymboltable.c Change license 2020-12-27 17:18:44 -08:00
pc.internal.h Improve signal handling and math 2021-02-25 18:33:33 -08:00
peekall.S Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
print.greg.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
printmemoryintervals.c Support proper %g, %f, and %a float formatting 2021-03-05 10:31:16 -08:00
progname.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
program_invocation_short_name.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
pthread.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
runtime.h Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
runtime.mk Perform some code cleanup 2021-02-27 10:33:32 -08:00
setstack.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
stackchkfail.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
stackchkfaillocal.c Change license 2020-12-27 17:18:44 -08:00
symbolic.h wip on intellisense (again) 2021-02-02 11:14:45 -05:00
symbols.internal.h Get codebase completely working with LLVM 2021-02-09 02:57:32 -08:00
sysconf.c Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
sysconf.h Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
untrackmemoryintervals.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
valist.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
valist.h Further refine documentation 2020-12-27 17:05:03 -08:00
vfork.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
weakfree.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
winmain.greg.c Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00