cosmopolitan/third_party/quickjs
Justine Tunney 4778cd4d27
Fix bugs in termios library and cleanup code
This change fixes an issue with the tcflow() magic numbers that was
causing bash to freeze up on Linux. While auditing termios polyfills,
several other issues were identified with XNU/BSD compatibility.

Out of an abundance of caution this change undefines as much surface
area from libc/calls/struct/termios.h as possible, so that autoconf
scripts are less likely to detect non-POSIX teletypewriter APIs that
haven't been polyfilled by Cosmopolitan.

This is a *breaking change* for your static archives in /opt/cosmos if
you use the cosmocc toolchain. That's because this change disables the
ioctl() undiamonding trick for code outside the monorepo, specifically
because it'll lead to brittle ABI breakages like this. If you're using
the cosmocc toolchain, you'll need to rebuild libraries like ncurses,
readline, etc. Yes diamonds cause bloat. To work around that, consider
using tcgetwinsize() instead of ioctl(TIOCGWINSZ) since it'll help you
avoid pulling every single ioctl-related polyfill into the linkage.

The cosmocc script was specifying -DNDEBUG for some reason. It's fixed.
2023-06-14 19:30:52 -07:00
..
doc Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
examples Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
tests Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
array.c Unbloat the build 2022-08-11 00:15:29 -07:00
atof.c Unbloat the build 2022-08-11 00:15:29 -07:00
atom.c Unbloat the build 2022-08-11 00:15:29 -07:00
atomics.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
bigdecimal.c Unbloat the build 2022-08-11 00:15:29 -07:00
bigint.c Unbloat the build 2022-08-11 00:15:29 -07:00
byte.c Unbloat the build 2022-08-11 00:15:29 -07:00
call.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
Changelog Add quickjs-2021-03-27 to third_party 2021-04-08 20:55:43 -07:00
cutils.c Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
cutils.h Fold LIBC_BITS into LIBC_INTRIN 2022-08-11 12:13:18 -07:00
date.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
dbuf.c Unbloat the build 2022-08-11 00:15:29 -07:00
diglet.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
diglet.h Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
eq.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
err.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
float.c Unbloat the build 2022-08-11 00:15:29 -07:00
gc.c Unbloat the build 2022-08-11 00:15:29 -07:00
gen.c Unbloat the build 2022-08-11 00:15:29 -07:00
internal.h Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
iter.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
json.c Unbloat the build 2022-08-11 00:15:29 -07:00
leb128.c Fold LIBC_BITS into LIBC_INTRIN 2022-08-11 12:13:18 -07:00
leb128.h Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
libbf.c Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
libbf.h Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
libregexp-opcode.inc Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
libregexp.c Fold LIBC_BITS into LIBC_INTRIN 2022-08-11 12:13:18 -07:00
libregexp.h Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
libunicode-table.inc Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
libunicode.c Unbloat the build 2022-08-11 00:15:29 -07:00
libunicode.h Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
LICENSE Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
list.h Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
map.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
math.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
mem.c Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
object.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
parse.c Unbloat the build 2022-08-11 00:15:29 -07:00
prim.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
promise.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
proxy.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
qjs.c Add /.args feature to Redbean/Lua/SQLite/Python/QuickJS 2022-05-12 11:04:47 -07:00
qjsc.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
qjscalc.js Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
quickjs-atom.inc Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
quickjs-libc.c Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
quickjs-libc.h Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
quickjs-opcode.inc Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
quickjs.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
quickjs.h Fold LIBC_BITS into LIBC_INTRIN 2022-08-11 12:13:18 -07:00
quickjs.mk Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
README.cosmo Fix issues revealed by ECMAScript test262 2021-04-10 17:15:35 -07:00
readme.txt Add quickjs-2021-03-27 to third_party 2021-04-08 20:55:43 -07:00
reflect.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
regexp.c Unbloat the build 2022-08-11 00:15:29 -07:00
repl.js Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
run-test262.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
shape.c Unbloat the build 2022-08-11 00:15:29 -07:00
str.c Unbloat the build 2022-08-11 00:15:29 -07:00
strbuf.c Unbloat the build 2022-08-11 00:15:29 -07:00
test262.conf Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
test262_errors.txt Add quickjs-2021-03-27 to third_party 2021-04-08 20:55:43 -07:00
test262o.conf Add quickjs-2021-03-27 to third_party 2021-04-08 20:55:43 -07:00
test262o_errors.txt Add quickjs-2021-03-27 to third_party 2021-04-08 20:55:43 -07:00
TODO Add quickjs-2021-03-27 to third_party 2021-04-08 20:55:43 -07:00
tok.c Unbloat the build 2022-08-11 00:15:29 -07:00
typedarray.c Unbloat the build 2022-08-11 00:15:29 -07:00
unicode_download.sh Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
unicode_gen.c Increase stack size to 128k and guard size to 16k 2022-12-18 22:58:29 -08:00
unicode_gen_def.inc Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
uri.c Unbloat the build 2022-08-11 00:15:29 -07:00
usage.c Unbloat the build 2022-08-11 00:15:29 -07:00

The main documentation is in doc/quickjs.pdf or doc/quickjs.html.