mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
4778cd4d27
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. |
||
---|---|---|
.. | ||
unix | ||
api.c | ||
apihelp.c | ||
consts.h | ||
crc32.c | ||
crc32.h | ||
crypt.c | ||
crypt.h | ||
ebcdic.h | ||
envargs.c | ||
explode.c | ||
extract.c | ||
fileio.c | ||
globals.c | ||
globals.h | ||
inflate.c | ||
inflate.h | ||
LICENSE | ||
list.c | ||
match.c | ||
process.c | ||
README.cosmo | ||
timezone.c | ||
timezone.h | ||
ttyio.c | ||
ttyio.h | ||
ubz2err.c | ||
unix.c | ||
unreduce.c | ||
unshrink.c | ||
unxcfg.h | ||
unzip.c | ||
unzip.h | ||
unzip.mk | ||
unzip.txt | ||
unzpriv.h | ||
unzvers.h | ||
zip.h | ||
zipinfo.c | ||
zipinfo.txt |
DESCRIPTION The UNIX unzip command, courtesy of the Info-ZIP project. PROVENANCE unzip610b.zip (circa 2010) https://sourceforge.net/projects/infozip/files/unreleased%20Betas/UnZip%20betas/ LICENSE BSD-like with Apache-like requirement that changes be documented. LOCAL CHANGES The only way this software differs from the normal InfoZIP sources is that we're linking the Cosmopolitan C Library, which enables it to be built as an Actually Portable Executable. Minor changes include: - Normalization of header / build config for platform / repository sed -i -e '/# *include *<.*/d' *.* sed -i -e 's!# *include *"!#include "third_party/unzip/!' *.* sed -i -e '1 i\// clang-format off' *.c *.h - Fixed a lot of static analysis buffer overflow warnings.