cosmopolitan/test
Jōshin d1a745c17c
Implement __zipos_dup (#972)
* Implement __zipos_dup

Makes ZiposHandle reference-counted by an `rc` field in a union with its
freelist `next` pointer. The functions `__zipos_free` and `__zipos_keep`
function as incref/decref for it. Adds `__zipos_postdup` to fix metadata
on file descriptors after dup-like operations, and adds zipos support to
`sys_dup_nt` + `sys_close_nt`.

* Remove noop __zipos_postdup

rc is never a zipos file because it is always a previously unused file
descriptor. fd is never a zipos file because that case has been handled
above by __zipos_fcntl.
2023-12-01 00:08:30 -08:00
..
dsp Reduce header complexity 2023-11-28 14:39:42 -08:00
libc Implement __zipos_dup (#972) 2023-12-01 00:08:30 -08:00
net Reduce header complexity 2023-11-28 14:39:42 -08:00
posix Rename makefiles BUILD.mk 2023-11-28 11:21:08 -08:00
tool Reduce header complexity 2023-11-28 14:39:42 -08:00
BUILD.mk Rename makefiles BUILD.mk 2023-11-28 11:21:08 -08:00