cosmopolitan/test/libc/runtime
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
..
prog Validate privileged code relationships 2023-06-08 04:38:06 -07:00
abort_test.c Remove accidental comment 2022-09-04 00:41:09 -07:00
clone_test.c Fix bugs in cosmocc toolchain 2023-06-08 23:44:03 -07:00
daemon_test.c Greatly expand system() shell code features 2022-10-11 21:30:31 -07:00
exit_test.c Fix bugs and make code tinier 2022-10-09 23:21:34 -07:00
fork_test.c Make more threading improvements 2022-11-01 23:28:26 -07:00
ftrace_test.c Validate privileged code relationships 2023-06-08 04:38:06 -07:00
getdosargv_test.c Add some tests for execve() 2022-10-02 14:58:14 -07:00
getdosenviron_test.c Add MODE=optlinux build mode (#141) 2021-10-14 19:36:49 -07:00
grow_test.c Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
itsatrap_test.c Get codebase completely working with LLVM 2021-02-09 02:57:32 -08:00
memtrack_test.c Unbloat the build 2022-08-11 00:15:29 -07:00
mmap_test.c Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00
mprotect_test.c Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
msync_test.c Add msync_test 2023-02-05 16:49:52 -08:00
munmap_test.c Remove problematic test 2023-02-05 16:50:04 -08:00
sigsetjmp_test.c Port a lot more code to AARCH64 2023-05-14 09:37:26 -07:00
test.mk Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00
tls_test.c Port a lot more code to AARCH64 2023-05-14 09:37:26 -07:00