github jart/cosmopolitan 2.1.1
Cosmopolitan v2.1.1

latest releases: 3.9.4, 3.9.3, 3.9.2...
2 years ago

Cosmopolitan Libc makes C/C++ a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS or UEFI with the best possible performance and the tiniest footprint imaginable.

This release fixes bugs and makes system call wrapper improvements:

  • Fix corner case in Linux stack mappings 3b4fcd8
  • Implement clock_nanosleep() across platforms and refactor sleeping code to use it.
  • Polyfill futexes on unsupported platforms by polling memory with exponential backoff
  • Imported *NSYNC unit tests and confirmed we're passing them (except for cancellations on Windows)
  • system() now uses our builtin cocmd interpreter which offers a subset of bourne that works on windows and is fast
  • sched_setaffinty() is now explicitly for processes since we now have pthread_setaffinity_np() for threads
  • Numerous improvements to system call documentation, especially when it comes to possible errno results
  • Change accept type to struct sockaddr * (#630)
  • Rewrite brk() and sbrk() 5005f2e which can be used by tiny apps that don't want to link mmap() and would rather have 4096-byte memory granularity, with the tradeoff of not working on Windows

We're working to make every Cosmopolitan binary a true operating system by introducing features like VGA support:

  • Fix sys_mmap_metal() for non-MAP_FIXED case (#651)
  • Show "screen of death" on VGA console upon program crash (#650)
  • Add basic character output for VGA graphics mode console (#649

Other changes:

  • Add imaxdiv, wcscoll, getdtablesize (#639)
  • Fix wcsdup malloc size (#641)
  • Add utime to utime.h (#648)

Don't miss a new cosmopolitan release

NewReleases is sending notifications on new releases.