cosmopolitan/libc/isystem
Justine Tunney 2ec413b5a9
Fix bugs in poll(), select(), ppoll(), and pselect()
poll() and select() now delegate to ppoll() and pselect() for assurances
that both polyfill implementations are correct and well-tested. Poll now
polyfills XNU and BSD quirks re: the hanndling of POLLNVAL and the other
similar status flags. This change resolves a misunderstanding concerning
how select(exceptfds) is intended to map to POLPRI. We now use E2BIG for
bouncing requests that exceed the 64 handle limit on Windows. With pipes
and consoles on Windows our poll impl will now report POLLHUP correctly.

Issues with Windows path generation have been fixed. For example, it was
problematic on Windows to say: posix_spawn_file_actions_addchdir_np("/")
due to the need to un-UNC paths in some additional places. Calling fstat
on UNC style volume path handles will now work. posix_spawn now supports
simulating the opening of /dev/null and other special paths on Windows.

Cosmopolitan no longer defines epoll(). I think wepoll is a nice project
for using epoll() on Windows socket handles. However we need generalized
file descriptor support to make epoll() for Windows work well enough for
inclusion in a C library. It's also not worth having epoll() if we can't
get it to work on XNU and BSD OSes which provide different abstractions.
Even epoll() on Linux isn't that great of an abstraction since it's full
of footguns. Last time I tried to get it to be useful I had little luck.
Considering how long it took to get poll() and select() to be consistent
across platforms, we really have no business claiming to have epoll too.
While it'd be nice to have fully implemented, the only software that use
epoll() are event i/o libraries used by things like nodejs. Event i/o is
not the best paradigm for handling i/o; threads make so much more sense.
2024-09-02 00:29:52 -07:00
..
arpa Add libresolv from Musl Libc 2023-12-08 20:04:10 -08:00
experimental Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00
ext Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00
linux Reduce header complexity 2023-11-28 14:39:42 -08:00
net Get us closer to building busybox 2023-06-18 04:13:45 -07:00
netinet libc headers: make <complex.h> work, add struct ipv6_mreq (#1100) 2024-02-05 17:22:56 -05:00
sys Fix bugs in poll(), select(), ppoll(), and pselect() 2024-09-02 00:29:52 -07:00
alloca.h Remove some dead code 2023-07-03 02:48:29 -07:00
ammintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
amxcomplexintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
amxfp16intrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
ar.h Remove some dead code 2023-07-03 02:48:29 -07:00
arm_acle.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
arm_bf16.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
arm_fp16.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
arm_neon.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
arm_sve.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
arm_vector_types.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
assert.h Further improve fatcosmocc 2023-08-13 01:51:39 -07:00
avxifmaintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
avxneconvertintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
avxvnniint8intrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
avxvnniint16intrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
bmmintrin.h Release Cosmopolitan v3.6.0 2024-07-23 03:28:19 -07:00
byteswap.h Clean up more code 2023-06-18 01:00:05 -07:00
clzerointrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
cmpccxaddintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
complex.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
cosmo.h Move LoadZipArgs() to cosmo.h 2024-08-17 12:06:27 -07:00
cpio.h Clean up more code 2023-06-18 01:00:05 -07:00
cpuid.h Clean up more code 2023-06-18 01:00:05 -07:00
crypt.h Clean up more code 2023-06-18 01:00:05 -07:00
ctype.h Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
cxxabi.h Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
dirent.h Clean up more code 2023-06-18 01:00:05 -07:00
dlfcn.h Introduce dlopen() support 2023-11-03 06:37:18 -07:00
elf.h Clean up more code 2023-06-18 01:00:05 -07:00
emmintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
endian.h Clean up more code 2023-06-18 01:00:05 -07:00
err.h Clean up more code 2023-06-18 01:00:05 -07:00
errno.h Clean up more code 2023-06-18 01:00:05 -07:00
fcntl.h Clean up more code 2023-06-18 01:00:05 -07:00
features.h Walk back most uses of __STRICT_ANSI__ 2024-02-27 04:09:49 -08:00
fenv.h Clean up more code 2023-06-18 01:00:05 -07:00
float.h Clean up more code 2023-06-18 01:00:05 -07:00
fnmatch.h Clean up more code 2023-06-18 01:00:05 -07:00
ftw.h Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
getopt.h Fix getopt again 2023-08-15 20:06:19 -07:00
glob.h Clean up more code 2023-06-18 01:00:05 -07:00
grp.h Clean up more code 2023-06-18 01:00:05 -07:00
iconv.h Clean up more code 2023-06-18 01:00:05 -07:00
ifaddrs.h Introduce getifaddrs() 2023-11-02 08:33:03 -07:00
immintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
inttypes.h Clean up more code 2023-06-18 01:00:05 -07:00
iso646.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
langinfo.h Update Musl Libc code 2024-07-30 22:51:29 -07:00
libcxx.imp Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00
libgen.h Implement more toolchain fixes 2023-06-18 05:39:31 -07:00
limits.h Clean up more code 2023-06-18 01:00:05 -07:00
link.h Add <link.h> for absl 2023-12-08 20:04:10 -08:00
locale.h Clean up more code 2023-06-18 01:00:05 -07:00
malloc.h Clean up more code 2023-06-18 01:00:05 -07:00
math.h Clean up more code 2023-06-18 01:00:05 -07:00
memory.h Clean up more code 2023-06-18 01:00:05 -07:00
mm3dnow.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
mm_malloc.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
mmintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
mntent.h Make some foss compatibility improvements 2022-10-14 13:59:34 -07:00
module.modulemap Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00
monetary.h Greatly expand system() shell code features 2022-10-11 21:30:31 -07:00
mwaitxintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
netdb.h libc headers: make <complex.h> work, add struct ipv6_mreq (#1100) 2024-02-05 17:22:56 -05:00
nl_types.h Fold LIBC_UNICODE into LIBC_STR 2022-08-13 08:42:32 -07:00
nmmintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
nsync.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_atomic.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_counter.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_cv.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_debug.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_mu.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_mu_wait.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_note.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_once.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_time.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_waiter.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
omp-tools.h Fine tune OpenMP some more 2024-01-30 06:30:24 -08:00
omp.h Fine tune OpenMP some more 2024-01-30 06:30:24 -08:00
ompx.h Fine tune OpenMP some more 2024-01-30 06:30:24 -08:00
paths.h Initial import 2020-06-15 07:18:57 -07:00
pmmintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
poll.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
popcntintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
prfchiintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
pthread.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
pty.h Introduce forkpty() 2023-11-28 19:59:57 -08:00
pwd.h Fix isystem headers including wrong files (#108) 2021-03-06 21:06:29 -08:00
raointintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
regex.h Initial import 2020-06-15 07:18:57 -07:00
resolv.h Add libresolv from Musl Libc 2023-12-08 20:04:10 -08:00
sched.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
search.h Add tsearch from Musl Libc (#912) 2023-10-15 16:50:54 -07:00
semaphore.h Add posix semaphores support 2022-10-14 09:21:02 -07:00
setjmp.h Clean up more code 2023-06-18 01:00:05 -07:00
sgxintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
sha512intrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
shadow.h Import /etc/shadow support from Musl for Linux 2023-12-07 16:26:04 -08:00
signal.h Simplify cosmocc builds (#863) 2023-07-23 11:11:08 -07:00
sm3intrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
sm4intrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
smmintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
spawn.h Make improvements 2023-09-18 21:04:47 -07:00
stdalign.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
stdarg.h Make the Windows Console work better 2023-09-07 18:27:22 -07:00
stdatomic.h Clean up more code 2023-06-18 01:00:05 -07:00
stdbool.h Make fatcosmocc good enough to build ncurses 6.4 2023-08-12 22:30:05 -07:00
stdc-predef.h Initial import 2020-06-15 07:18:57 -07:00
stdckdint.h Clean up more code 2023-06-18 01:00:05 -07:00
stddef.h Clean up more code 2023-06-18 01:00:05 -07:00
stdint.h Clean up more code 2023-06-18 01:00:05 -07:00
stdio.h Clean up some code 2023-11-16 17:31:07 -08:00
stdio_ext.h Clean up more code 2023-06-18 01:00:05 -07:00
stdlib.h Don't include <crypt.h> from <stdlib.h> (#1112) 2024-02-23 07:18:35 -08:00
stdnoreturn.h Clean up more code 2023-06-18 01:00:05 -07:00
string.h Clean up more code 2023-06-18 01:00:05 -07:00
strings.h Clean up more code 2023-06-18 01:00:05 -07:00
syscall.h Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
sysexits.h Clean up more code 2023-06-18 01:00:05 -07:00
syslog.h Clean up more code 2023-06-18 01:00:05 -07:00
termios.h Clean up more code 2023-06-18 01:00:05 -07:00
tgmath.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
threads.h Add much of C11 threads.h API 2024-04-28 07:04:08 -07:00
time.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
tinygetopt.h Introduce #include <tinygetopt.h> 2024-05-29 10:11:17 -07:00
tmmintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
uchar.h Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ucontext.h Changes made for cosmocc builds (#908) 2023-10-09 14:39:02 -07:00
uio.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
unistd.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
unwind.h Make improvements 2024-01-29 16:31:58 -08:00
usermsrintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
utime.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
utmp.h Clean up more code 2023-06-18 01:00:05 -07:00
utmpx.h Clean up more code 2023-06-18 01:00:05 -07:00
wait.h Clean up more code 2023-06-18 01:00:05 -07:00
wchar.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
wctype.h Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
windowsesque.h Resurrect <windows.h> as <windowsesque.h> 2024-02-21 16:41:11 -08:00
winternl.h Drop support for Windows 8 2024-05-29 19:37:47 -07:00
wmmintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
x86intrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
xmmintrin.h Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00