mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 03:38:31 +00:00
Support non-blocking i/o across platforms
This change introduces new tests for `O_NONBLOCK` and `SOCK_NONBLOCK` to confirm that non-blocking i/o is now working on all supported platforms, including Windows. For example, you can now say on Windows, MacOS, etc.: socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, IPPROTO_TCP); To create a non-blocking IPv4 TCP socket. Or you can enable non-blocking i/o on an existing socket / pipe / etc. file descriptor by calling fcntl fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); This functionality is polyfilled on older Linux kernels too, e.g. RHEL5. Now that fcntl() support is much better the FIOCLEX / FIONCLEX polyfills for ioctl() have been removed since they're ugly non-POSIX diameond APIs This change fixes a weakness in kprintf() that was causing Windows trace tools to frequently crash.
This commit is contained in:
parent
5c9e03e3e0
commit
1d4eb08fa1
102 changed files with 678 additions and 331 deletions
|
@ -947,7 +947,6 @@ syscon ioctl FIONCLEX 0x5450 0x5450 0x20006602 0x20006602 0x20006602 0
|
|||
#syscon ioctl FIONWRITE 0x0 0x0 0x0 0x0 0x40046677 0x0 0x0 -1 # [FreeBSD Generalization] bytes queued in FD's output buffer (same as TIOCOUTQ for TTY FDs; see also SO_SNDBUF)
|
||||
#syscon ioctl FIONSPACE 0x0 0x0 0x0 0x0 0x40046676 0x0 0x0 -1 # [FreeBSD Generalization] capacity of FD's output buffer, e.g. equivalent to TIOCGSERIAL w/ UART
|
||||
syscon ioctl SIOCGIFCONF 0x8912 0x8912 0xc00c6924 0xc00c6924 0xc0106924 0xc0106924 0xc0106924 0
|
||||
syscon ioctl SIOCATMARK 0x8905 0x8905 0x40047307 0x40047307 0x40047307 0x40047307 0x40047307 0x40047307 # use sockatmark(); determines if oob is available; bsd consensus
|
||||
syscon ioctl SIOCADDMULTI 0x8931 0x8931 0x80206931 0x80206931 0x80206931 0x80206931 0x80206931 0 # bsd consensus
|
||||
syscon ioctl SIOCDELMULTI 0x8932 0x8932 0x80206932 0x80206932 0x80206932 0x80206932 0x80206932 0 # bsd consensus
|
||||
syscon ioctl SIOCDIFADDR 0x8936 0x8936 0x80206919 0x80206919 0x80206919 0x80206919 0x80206919 0 # bsd consensus
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCADDDLCI,0x8980,0x8980,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCADDDLCI,0x8980,0x8980,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCADDMULTI,0x8931,0x8931,0x80206931,0x80206931,0x80206931,0x80206931,0x80206931,0
|
||||
.syscon ioctl,SIOCADDMULTI,0x8931,0x8931,0x80206931,0x80206931,0x80206931,0x80206931,0x80206931,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCADDRT,0x890b,0x890b,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCADDRT,0x890b,0x890b,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCATMARK,0x8905,0x8905,0x40047307,0x40047307,0x40047307,0x40047307,0x40047307,0x40047307
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCDARP,0x8953,0x8953,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCDARP,0x8953,0x8953,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCDELDLCI,0x8981,0x8981,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCDELDLCI,0x8981,0x8981,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCDELMULTI,0x8932,0x8932,0x80206932,0x80206932,0x80206932,0x80206932,0x80206932,0
|
||||
.syscon ioctl,SIOCDELMULTI,0x8932,0x8932,0x80206932,0x80206932,0x80206932,0x80206932,0x80206932,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCDELRT,0x890c,0x890c,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCDELRT,0x890c,0x890c,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCDEVPRIVATE,0x89f0,0x89f0,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCDEVPRIVATE,0x89f0,0x89f0,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCDIFADDR,0x8936,0x8936,0x80206919,0x80206919,0x80206919,0x80206919,0x80206919,0
|
||||
.syscon ioctl,SIOCDIFADDR,0x8936,0x8936,0x80206919,0x80206919,0x80206919,0x80206919,0x80206919,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCDRARP,0x8960,0x8960,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCDRARP,0x8960,0x8960,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGARP,0x8954,0x8954,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGARP,0x8954,0x8954,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFADDR,0x8915,0x8915,0xc0206921,0xc0206921,0xc0206921,0xc0206921,0xc0206921,0
|
||||
.syscon ioctl,SIOCGIFADDR,0x8915,0x8915,0xc0206921,0xc0206921,0xc0206921,0xc0206921,0xc0206921,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFBR,0x8940,0x8940,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFBR,0x8940,0x8940,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFBRDADDR,0x8919,0x8919,0xc0206923,0xc0206923,0xc0206923,0xc0206923,0xc0206923,0
|
||||
.syscon ioctl,SIOCGIFBRDADDR,0x8919,0x8919,0xc0206923,0xc0206923,0xc0206923,0xc0206923,0xc0206923,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFCONF,0x8912,0x8912,0xc00c6924,0xc00c6924,0xc0106924,0xc0106924,0xc0106924,0
|
||||
.syscon ioctl,SIOCGIFCONF,0x8912,0x8912,0xc00c6924,0xc00c6924,0xc0106924,0xc0106924,0xc0106924,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFCOUNT,0x8938,0x8938,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFCOUNT,0x8938,0x8938,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFDSTADDR,0x8917,0x8917,0xc0206922,0xc0206922,0xc0206922,0xc0206922,0xc0206922,0
|
||||
.syscon ioctl,SIOCGIFDSTADDR,0x8917,0x8917,0xc0206922,0xc0206922,0xc0206922,0xc0206922,0xc0206922,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFENCAP,0x8925,0x8925,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFENCAP,0x8925,0x8925,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFFLAGS,0x8913,0x8913,0xc0206911,0xc0206911,0xc0206911,0xc0206911,0xc0206911,0
|
||||
.syscon ioctl,SIOCGIFFLAGS,0x8913,0x8913,0xc0206911,0xc0206911,0xc0206911,0xc0206911,0xc0206911,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFHWADDR,0x8927,0x8927,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFHWADDR,0x8927,0x8927,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFINDEX,0x8933,0x8933,0,0,0xc0206920,0,0,0
|
||||
.syscon ioctl,SIOCGIFINDEX,0x8933,0x8933,0,0,0xc0206920,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFMAP,0x8970,0x8970,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFMAP,0x8970,0x8970,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFMEM,0x891f,0x891f,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFMEM,0x891f,0x891f,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFMETRIC,0x891d,0x891d,0xc0206917,0xc0206917,0xc0206917,0xc0206917,0xc0206917,0
|
||||
.syscon ioctl,SIOCGIFMETRIC,0x891d,0x891d,0xc0206917,0xc0206917,0xc0206917,0xc0206917,0xc0206917,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFMTU,0x8921,0x8921,0xc0206933,0xc0206933,0xc0206933,0xc020697e,0xc020697e,0
|
||||
.syscon ioctl,SIOCGIFMTU,0x8921,0x8921,0xc0206933,0xc0206933,0xc0206933,0xc020697e,0xc020697e,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFNAME,0x8910,0x8910,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFNAME,0x8910,0x8910,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFNETMASK,0x891b,0x891b,0xc0206925,0xc0206925,0xc0206925,0xc0206925,0xc0206925,0
|
||||
.syscon ioctl,SIOCGIFNETMASK,0x891b,0x891b,0xc0206925,0xc0206925,0xc0206925,0xc0206925,0xc0206925,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFPFLAGS,0x8935,0x8935,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFPFLAGS,0x8935,0x8935,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFSLAVE,0x8929,0x8929,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFSLAVE,0x8929,0x8929,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGIFTXQLEN,0x8942,0x8942,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGIFTXQLEN,0x8942,0x8942,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGPGRP,0x8904,0x8904,0x40047309,0x40047309,0x40047309,0x40047309,0x40047309,0
|
||||
.syscon ioctl,SIOCGPGRP,0x8904,0x8904,0x40047309,0x40047309,0x40047309,0x40047309,0x40047309,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGRARP,0x8961,0x8961,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGRARP,0x8961,0x8961,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGSTAMP,0x8906,0x8906,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGSTAMP,0x8906,0x8906,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCGSTAMPNS,0x8907,0x8907,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCGSTAMPNS,0x8907,0x8907,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCPROTOPRIVATE,0x89e0,0x89e0,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCPROTOPRIVATE,0x89e0,0x89e0,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCRTMSG,0x890d,0x890d,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCRTMSG,0x890d,0x890d,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSARP,0x8955,0x8955,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSARP,0x8955,0x8955,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFADDR,0x8916,0x8916,0x8020690c,0x8020690c,0x8020690c,0x8020690c,0x8020690c,0
|
||||
.syscon ioctl,SIOCSIFADDR,0x8916,0x8916,0x8020690c,0x8020690c,0x8020690c,0x8020690c,0x8020690c,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFBR,0x8941,0x8941,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFBR,0x8941,0x8941,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFBRDADDR,0x891a,0x891a,0x80206913,0x80206913,0x80206913,0x80206913,0x80206913,0
|
||||
.syscon ioctl,SIOCSIFBRDADDR,0x891a,0x891a,0x80206913,0x80206913,0x80206913,0x80206913,0x80206913,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFDSTADDR,0x8918,0x8918,0x8020690e,0x8020690e,0x8020690e,0x8020690e,0x8020690e,0
|
||||
.syscon ioctl,SIOCSIFDSTADDR,0x8918,0x8918,0x8020690e,0x8020690e,0x8020690e,0x8020690e,0x8020690e,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFENCAP,0x8926,0x8926,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFENCAP,0x8926,0x8926,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFFLAGS,0x8914,0x8914,0x80206910,0x80206910,0x80206910,0x80206910,0x80206910,0
|
||||
.syscon ioctl,SIOCSIFFLAGS,0x8914,0x8914,0x80206910,0x80206910,0x80206910,0x80206910,0x80206910,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFHWADDR,0x8924,0x8924,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFHWADDR,0x8924,0x8924,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFHWBROADCAST,0x8937,0x8937,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFHWBROADCAST,0x8937,0x8937,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFLINK,0x8911,0x8911,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFLINK,0x8911,0x8911,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFMAP,0x8971,0x8971,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFMAP,0x8971,0x8971,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFMEM,0x8920,0x8920,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFMEM,0x8920,0x8920,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFMETRIC,0x891e,0x891e,0x80206918,0x80206918,0x80206918,0x80206918,0x80206918,0
|
||||
.syscon ioctl,SIOCSIFMETRIC,0x891e,0x891e,0x80206918,0x80206918,0x80206918,0x80206918,0x80206918,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFMTU,0x8922,0x8922,0x80206934,0x80206934,0x80206934,0x8020697f,0x8020697f,0
|
||||
.syscon ioctl,SIOCSIFMTU,0x8922,0x8922,0x80206934,0x80206934,0x80206934,0x8020697f,0x8020697f,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFNAME,0x8923,0x8923,0,0,0x80206928,0,0,0
|
||||
.syscon ioctl,SIOCSIFNAME,0x8923,0x8923,0,0,0x80206928,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFNETMASK,0x891c,0x891c,0x80206916,0x80206916,0x80206916,0x80206916,0x80206916,0
|
||||
.syscon ioctl,SIOCSIFNETMASK,0x891c,0x891c,0x80206916,0x80206916,0x80206916,0x80206916,0x80206916,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFPFLAGS,0x8934,0x8934,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFPFLAGS,0x8934,0x8934,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFSLAVE,0x8930,0x8930,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFSLAVE,0x8930,0x8930,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSIFTXQLEN,0x8943,0x8943,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSIFTXQLEN,0x8943,0x8943,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSPGRP,0x8902,0x8902,0x80047308,0x80047308,0x80047308,0x80047308,0x80047308,0
|
||||
.syscon ioctl,SIOCSPGRP,0x8902,0x8902,0x80047308,0x80047308,0x80047308,0x80047308,0x80047308,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOCSRARP,0x8962,0x8962,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOCSRARP,0x8962,0x8962,0,0,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sio,SIOGIFINDEX,0x8933,0x8933,0,0,0,0,0,0
|
||||
.syscon ioctl,SIOGIFINDEX,0x8933,0x8933,0,0,0,0,0,0
|
||||
|
|
|
@ -3,16 +3,12 @@
|
|||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const uint32_t FIOASYNC;
|
||||
extern const uint32_t FIOCLEX;
|
||||
extern const uint32_t FIONBIO;
|
||||
extern const uint32_t FIONCLEX;
|
||||
extern const uint32_t FIONREAD;
|
||||
extern const uint32_t FIONREAD; /* one of the few encouraged ioctls */
|
||||
extern const uint32_t FIONBIO; /* use fcntl(fd, F_SETFL, O_NONBLOCK) */
|
||||
extern const uint32_t FIOCLEX; /* use fcntl(fd, F_SETFD, FD_CLOEXEC) */
|
||||
extern const uint32_t FIONCLEX; /* use fcntl(fd, F_SETFD, 0) */
|
||||
extern const uint32_t FIOASYNC; /* todo: fcntl(fd, F_SETOWN, pid) */
|
||||
|
||||
#define FIOASYNC FIOASYNC
|
||||
#define FIOCLEX FIOCLEX
|
||||
#define FIONBIO FIONBIO
|
||||
#define FIONCLEX FIONCLEX
|
||||
#define FIONREAD FIONREAD
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
|
|
|
@ -6,7 +6,6 @@ COSMOPOLITAN_C_START_
|
|||
extern const unsigned long SIOCADDDLCI;
|
||||
extern const unsigned long SIOCADDMULTI;
|
||||
extern const unsigned long SIOCADDRT;
|
||||
extern const unsigned long SIOCATMARK; /* use sockatmark() */
|
||||
extern const unsigned long SIOCDARP;
|
||||
extern const unsigned long SIOCDELDLCI;
|
||||
extern const unsigned long SIOCDELMULTI;
|
||||
|
|
|
@ -55,7 +55,7 @@ dos kNtErrorInvalidFunction EINVAL
|
|||
dos kNtErrorNegativeSeek EINVAL
|
||||
dos kNtErrorInvalidNetname EADDRNOTAVAIL
|
||||
dos kNtErrorInvalidUserBuffer EMSGSIZE
|
||||
dos kNtErrorIoPending EINPROGRESS
|
||||
dos kNtErrorIoPending EINPROGRESS
|
||||
dos kNtErrorLockViolation EAGAIN
|
||||
dos kNtErrorMoreData EMSGSIZE
|
||||
dos kNtErrorNetnameDeleted ECONNABORTED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue