cosmopolitan/libc/calls/struct
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
..
aarch64.internal.h Fix build breakage 2023-06-04 09:33:48 -07:00
bpf.internal.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
cpuset.h Make more compatibility improvements 2022-09-06 07:04:13 -07:00
dirent.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
fd.internal.h Validate privileged code relationships 2023-06-08 04:38:06 -07:00
filter.internal.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
flock.h Make fixes and improvements 2022-10-19 07:19:19 -07:00
flock.internal.h Elevate Windows production worthiness 2022-10-13 13:44:41 -07:00
framebuffercolormap.h Add some definitions for Linux frame buffer/console ioctl APIs (#712) 2023-01-01 16:28:03 -08:00
framebufferfixedscreeninfo.h Initial import 2020-06-15 07:18:57 -07:00
framebuffervirtualscreeninfo.h Initial import 2020-06-15 07:18:57 -07:00
fsid.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
iovec.h Greatly expand system() shell code features 2022-10-11 21:30:31 -07:00
iovec.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
itimerval.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
itimerval.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
metasigaltstack.h Improve memory safety 2021-10-13 17:27:13 -07:00
metastat.internal.h Make more progress on aarch64 2023-05-10 04:20:47 -07:00
metatermios.internal.h Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
rlimit.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
rlimit.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
rusage.h Improve cancellations, randomness, and time 2022-11-05 23:45:32 -07:00
rusage.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
sched_param.h Make more ML improvements 2023-05-16 08:07:23 -07:00
sched_param.internal.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
seccomp.internal.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
sigaction.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
sigaction.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
sigaltstack.h Improve memory safety 2021-10-13 17:27:13 -07:00
sigaltstack.internal.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
siginfo-freebsd.internal.h Improve signals and memory protection 2022-04-12 22:11:00 -07:00
siginfo-meta.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
siginfo-netbsd.internal.h Improve signals and memory protection 2022-04-12 22:11:00 -07:00
siginfo-openbsd.internal.h Improve signals and memory protection 2022-04-12 22:11:00 -07:00
siginfo-xnu.internal.h Improve signals and memory protection 2022-04-12 22:11:00 -07:00
siginfo.h Introduce sigtimedwait() and sigwaitinfo() 2022-10-10 07:39:44 -07:00
siginfo.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
sigset.h Make fixes and improvements 2022-10-19 07:19:19 -07:00
sigset.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
sigval.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
sigval.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
stat.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
stat.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
stat.macros.h Make some foss compatibility improvements 2022-10-14 13:59:34 -07:00
statfs-freebsd.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs-linux.internal.h Make some system call fixes 2023-02-12 22:16:34 -08:00
statfs-meta.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
statfs-netbsd.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs-openbsd.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs-xnu.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statvfs.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
sysinfo.h Fix sysinfo() totalram on XNU 2022-12-18 02:22:46 -08:00
sysinfo.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
termios.h Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
timespec.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
timespec.internal.h Get threads working well on MacOS Arm64 2023-06-04 01:57:10 -07:00
timeval.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
timeval.internal.h Get threads working well on MacOS Arm64 2023-06-04 01:57:10 -07:00
tms.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
ucontext-freebsd.internal.h Make improvements 2022-11-07 02:26:06 -08:00
ucontext-netbsd.internal.h Work on magic numbers for aarch64 2023-05-10 04:20:48 -07:00
ucontext-openbsd.internal.h Improve signals and memory protection 2022-04-12 22:11:00 -07:00
ucontext.internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
user_regs_struct.h Remove dollars from system call support symbols 2021-02-03 19:35:29 -08:00
utsname-linux.internal.h Improve quality of uname/gethostname/getdomainname 2022-09-03 20:20:40 -07:00
utsname.h Add pthread attributes and other libc functions 2022-09-07 05:28:32 -07:00
winsize.h Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
winsize.internal.h Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00