cosmopolitan/libc/sysv/consts/sicode.h
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

105 lines
3.4 KiB
C

#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_SICODE_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SICODE_H_
#include "libc/runtime/symbolic.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const long SI_USER;
extern const long SI_QUEUE;
extern const long SI_TIMER;
extern const long SI_MESGQ;
extern const long SI_ASYNCIO;
extern const long SI_TKILL;
extern const long SI_ASYNCNL;
extern const long SI_KERNEL;
extern const long SI_NOINFO;
extern const long CLD_EXITED;
extern const long CLD_KILLED;
extern const long CLD_DUMPED;
extern const long CLD_TRAPPED;
extern const long CLD_STOPPED;
extern const long CLD_CONTINUED;
extern const long TRAP_BRKPT;
extern const long TRAP_TRACE;
extern const long SEGV_MAPERR;
extern const long SEGV_ACCERR;
extern const long FPE_INTDIV;
extern const long FPE_INTOVF;
extern const long FPE_FLTDIV;
extern const long FPE_FLTOVF;
extern const long FPE_FLTUND;
extern const long FPE_FLTRES;
extern const long FPE_FLTINV;
extern const long FPE_FLTSUB;
extern const long ILL_ILLOPC;
extern const long ILL_ILLOPN;
extern const long ILL_ILLADR;
extern const long ILL_ILLTRP;
extern const long ILL_PRVOPC;
extern const long ILL_PRVREG;
extern const long ILL_COPROC;
extern const long ILL_BADSTK;
extern const long BUS_ADRALN;
extern const long BUS_ADRERR;
extern const long BUS_OBJERR;
extern const long BUS_MCEERR_AR;
extern const long BUS_MCEERR_AO;
extern const long POLL_IN;
extern const long POLL_OUT;
extern const long POLL_MSG;
extern const long POLL_ERR;
extern const long POLL_PRI;
extern const long POLL_HUP;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#define CLD_EXITED LITERALLY(1)
#define CLD_KILLED LITERALLY(2)
#define CLD_DUMPED LITERALLY(3)
#define CLD_TRAPPED LITERALLY(4)
#define CLD_STOPPED LITERALLY(5)
#define CLD_CONTINUED LITERALLY(6)
#define TRAP_BRKPT LITERALLY(1)
#define TRAP_TRACE LITERALLY(2)
#define SEGV_MAPERR LITERALLY(1)
#define SEGV_ACCERR LITERALLY(2)
#define ILL_ILLOPC LITERALLY(1)
#define ILL_PRVREG LITERALLY(6)
#define ILL_COPROC LITERALLY(7)
#define ILL_BADSTK LITERALLY(8)
#define BUS_ADRALN LITERALLY(1)
#define BUS_ADRERR LITERALLY(2)
#define BUS_OBJERR LITERALLY(3)
#define POLL_IN LITERALLY(1)
#define POLL_OUT LITERALLY(2)
#define POLL_MSG LITERALLY(3)
#define POLL_ERR LITERALLY(4)
#define POLL_PRI LITERALLY(5)
#define POLL_HUP LITERALLY(6)
#define SI_USER SYMBOLIC(SI_USER)
#define SI_QUEUE SYMBOLIC(SI_QUEUE)
#define SI_TIMER SYMBOLIC(SI_TIMER)
#define SI_MESGQ SYMBOLIC(SI_MESGQ)
#define SI_ASYNCIO SYMBOLIC(SI_ASYNCIO)
#define SI_TKILL SYMBOLIC(SI_TKILL)
#define SI_ASYNCNL SYMBOLIC(SI_ASYNCNL)
#define SI_KERNEL SYMBOLIC(SI_KERNEL)
#define SI_NOINFO SYMBOLIC(SI_NOINFO)
#define FPE_INTDIV SYMBOLIC(FPE_INTDIV)
#define FPE_INTOVF SYMBOLIC(FPE_INTOVF)
#define FPE_FLTDIV SYMBOLIC(FPE_FLTDIV)
#define FPE_FLTOVF SYMBOLIC(FPE_FLTOVF)
#define FPE_FLTUND SYMBOLIC(FPE_FLTUND)
#define FPE_FLTRES SYMBOLIC(FPE_FLTRES)
#define FPE_FLTINV SYMBOLIC(FPE_FLTINV)
#define FPE_FLTSUB SYMBOLIC(FPE_FLTSUB)
#define ILL_ILLOPN SYMBOLIC(ILL_ILLOPN)
#define ILL_ILLADR SYMBOLIC(ILL_ILLADR)
#define ILL_ILLTRP SYMBOLIC(ILL_ILLTRP)
#define ILL_PRVOPC SYMBOLIC(ILL_PRVOPC)
#define BUS_MCEERR_AR SYMBOLIC(BUS_MCEERR_AR)
#define BUS_MCEERR_AO SYMBOLIC(BUS_MCEERR_AO)
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SICODE_H_ */