版本发布 8
[Cosmopolitan Libc](https://justine.lol/cosmopolitan/index.html) makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD 7.3 + NetBSD + BIOS with the best performance and reliability. ### Cosmo v4.0.2 Release Notes After testing 4.0.x with various programs and hammering out the remaining issues, this release includes the latest build of Cosmos. We've confirmed bash, emacs, vim, git, links, wget, etc. work well across platforms. - 29eb7e67b Fix fork() regression on Windows - 42a3bb729 Make execve() linger when it can't spoof parent - f0b0f926b Enable sqlite3 serialization in redbean (#1349) - 035b0e2a6 Attempt to fix MODE=dbg Windows execve() flake - 7b67b20da Fix Windows MODE=tiny breakage - c97a85847 Remove missing definitions Read the documentation: - [cosmocc toolchain readme](https://github.com/jart/cosmopolitan/blob/master/tool/cosmocc/README.md) - [cosmos v4.0.2 install guide](https://cosmo.zip/pub/cosmos/v/4.0.2/README.txt) Redundant download URLs are provided: - https://cosmo.zip/pub/cosmos/v/4.0.2/ - https://cosmo.zip/pub/cosmos/zip/cosmos-4.0.2.zip - https://cosmo.zip/pub/cosmocc/cosmocc-4.0.2.zip - https://cosmo.zip/pub/cosmo/cosmopolitan-4.0.2.tar.gz - https://justine.lol/cosmopolitan/cosmocc-4.0.2.zip - https://justine.lol/cosmopolitan/cosmos-4.0.2.zip - https://justine.lol/cosmopolitan/cosmopolitan-4.0.2.tar.gz Known issues: - You might need [our `binfmt_misc` interpreter](https://github.com/jart/cosmopolitan/blob/master/tool/cosmocc/README.md#gotchas) with some Linux distros - Run Windows Terminal Preview with admin privileges to use symlinks - Use `TERM=vt100 nano` to fix frozen display state with nano editor - Self-modifying code isn't preserved across fork() on Windows - Function tracing is disabled in child after fork() on Windows - Z shell users need zsh 5.9+ which fixes an execve() bug
- fe01642a2 Add missing lock to fork() on Windows - e939659b7 Fix ordering of pthread_create(pthread_t *thread) - ed6d133a2 Use tgkill() on Linux and FreeBSD - b734eec83 Test restricting tests to single cpu
- 4e9566cd3 Invent new cosmo_args() api - 9ddbfd921 Introduce cosmo_futex_wait and cosmo_futex_wake - 5c3f854ac Fix strcasestr() - abdf6c9c2 Sync with jtckdint - e228aa3e1 Save rax register in getcontext - fd15b2d7a Ensure ^C gets printed to Windows console - ad0a7c67c [redbean] Add details to OnError Hook (#1324) - 1312f6024 Strongly link tr and sed into system() and popen() - cafdb456e Strongly link glob() into system() and popen() - e47d67ba9 Add asteroids game
- d3279d3c0 Fix typo in mmap() Windows implementation
- 913b57366 Fix mmap MT bug on Windows - 9add248c9 Update projects claims re: OpenBSD - beb090b83 Add ctl string find_first_of and find_last_of - 107d335c0 Share that APE files are also zip archives and how to use them! (#1319) - bd6630d62 Add missing ctl::string append method - a120bc714 Fix ctl::string_view const iteration issue - baad1df71 Add several NT functions (#1318) - 4e44517c9 Move cosmo-clang to libexec - 26663dea9 Support setting pty size in script command - 23da0d75a Improve art program - 4b2a00fd4 Introduce example program for viewing BBS art
- dd249ff5d Fix package ordering in cosmopolitan.a - 4abcba8d8 Make redbean Fetch() support longer responses - dc1afc968 Fix fork() crash on Windows - 5edc0819c Define glob64 - 706cb6631 Tune posix_spawn() successful fix - a8bc7ac11 Import some Chromium Zlib changes - d8fac40f5 Attempt to fix Emacs spawning issue - 000d6dbb0 Make getentropy() faster
- dcf959662 Make more fixups and quality assurance - e4d6eb382 Make memchr() and memccpy() faster - 12cc2de22 Make contended mutexes 30% faster on aarch64 - 85c58be94 Fix an async signal delivery flake on Windows - 333c3d1f0 Add the uppercase B conversion specifier to printf (#1300) - fef24d622 Work around copy_file_range() bug in eCryptFs - ad11fc32a Avoid an --ftrace crash on Windows - 70603fa6e Fix makedev() prototype - 925511301 Delete some magic numbers - 518eabadf Further optimize poll() on Windows - 556a29436 Improve Windows mode bits
Cosmopolitan's Windows support may finally be feature complete. It's now possible to send signals between processes using kill() on Windows. Ten new torture test programs have been written to tease out more fixes and offer a high level of assurance that signal handling is correct. Some of these tests are good enough to deadlock the signal handling of UNIX OSes but not our signaling module for Windows. They also demonstrate that our Windows signal handling actually outperforms many UNIX OSes at latency. - 0d7467321 Introduce interprocess signaling on Windows - f68fc1f81 Put more thought into new signaling code - dd8c4dbd7 Write more tests for signal handling - 126a44dc4 Write more tests attempting to break windows - 8527462b9 d50f4c02f Fix ECHILD with WNOHANG on Windows Other improvements include: - e97524510 Upgrade to superconfigure z0.0.56 - 1bfb34840 Add weak self make_shared variant (#1299) - 87a666990 Clean up and test the MSG_FOO constants - 0e59afb40 Fix conflicting RTTI related symbol - 8313dca98 Show file descriptors on crash on Windows - d730fc668 Make NESEMU1 demo more reliable This release includes a new build of cosmos, which is our collection of prebuilt open source software. Special care has been placed into making sure programs like Emacs, vim, wget, curl, etc. all work well on Windows. [Instructions](https://cosmo.zip/pub/cosmos/v/3.9.2/README.txt) are provided for its installation on UNIX and Windows systems. It's available for download below, and mirrored to the following URLs: - https://cosmo.zip/pub/cosmos/v/3.9.2/README.txt - https://cosmo.zip/pub/cosmos/v/3.9.2/bin/ (download individually) - https://cosmo.zip/pub/cosmos/zip/cosmos-3.9.2.zip (download everything) - https://justine.lol/cosmopolitan/cosmos-3.9.2.zip (download everything) Your cosmocc toolchain has [instructions here](https://github.com/jart/cosmopolitan/blob/master/tool/cosmocc/README.md), and is mirrored to the following URLs: - https://cosmo.zip/pub/cosmocc/cosmocc-3.9.2.zip - https://justine.lol/cosmopolitan/cosmocc-3.9.2.zip