mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-12 17:27:56 +00:00
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.
90 lines
3.2 KiB
C
90 lines
3.2 KiB
C
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_SIO_H_
|
|
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SIO_H_
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
extern const unsigned long SIOCADDDLCI;
|
|
extern const unsigned long SIOCADDMULTI;
|
|
extern const unsigned long SIOCADDRT;
|
|
extern const unsigned long SIOCDARP;
|
|
extern const unsigned long SIOCDELDLCI;
|
|
extern const unsigned long SIOCDELMULTI;
|
|
extern const unsigned long SIOCDELRT;
|
|
extern const unsigned long SIOCDEVPRIVATE;
|
|
extern const unsigned long SIOCDIFADDR;
|
|
extern const unsigned long SIOCDRARP;
|
|
extern const unsigned long SIOCGARP;
|
|
extern const unsigned long SIOCGIFADDR;
|
|
extern const unsigned long SIOCGIFBR;
|
|
extern const unsigned long SIOCGIFBRDADDR;
|
|
extern const unsigned long SIOCGIFCONF;
|
|
extern const unsigned long SIOCGIFCOUNT;
|
|
extern const unsigned long SIOCGIFDSTADDR;
|
|
extern const unsigned long SIOCGIFENCAP;
|
|
extern const unsigned long SIOCGIFFLAGS;
|
|
extern const unsigned long SIOCGIFHWADDR;
|
|
extern const unsigned long SIOCGIFINDEX;
|
|
extern const unsigned long SIOCGIFMAP;
|
|
extern const unsigned long SIOCGIFMEM;
|
|
extern const unsigned long SIOCGIFMETRIC;
|
|
extern const unsigned long SIOCGIFMTU;
|
|
extern const unsigned long SIOCGIFNAME;
|
|
extern const unsigned long SIOCGIFNETMASK;
|
|
extern const unsigned long SIOCGIFPFLAGS;
|
|
extern const unsigned long SIOCGIFSLAVE;
|
|
extern const unsigned long SIOCGIFTXQLEN;
|
|
extern const unsigned long SIOCGPGRP;
|
|
extern const unsigned long SIOCGRARP;
|
|
extern const unsigned long SIOCGSTAMP;
|
|
extern const unsigned long SIOCGSTAMPNS;
|
|
extern const unsigned long SIOCPROTOPRIVATE;
|
|
extern const unsigned long SIOCRTMSG;
|
|
extern const unsigned long SIOCSARP;
|
|
extern const unsigned long SIOCSIFADDR;
|
|
extern const unsigned long SIOCSIFBR;
|
|
extern const unsigned long SIOCSIFBRDADDR;
|
|
extern const unsigned long SIOCSIFDSTADDR;
|
|
extern const unsigned long SIOCSIFENCAP;
|
|
extern const unsigned long SIOCSIFFLAGS;
|
|
extern const unsigned long SIOCSIFHWADDR;
|
|
extern const unsigned long SIOCSIFHWBROADCAST;
|
|
extern const unsigned long SIOCSIFLINK;
|
|
extern const unsigned long SIOCSIFMAP;
|
|
extern const unsigned long SIOCSIFMEM;
|
|
extern const unsigned long SIOCSIFMETRIC;
|
|
extern const unsigned long SIOCSIFMTU;
|
|
extern const unsigned long SIOCSIFNAME;
|
|
extern const unsigned long SIOCSIFNETMASK;
|
|
extern const unsigned long SIOCSIFPFLAGS;
|
|
extern const unsigned long SIOCSIFSLAVE;
|
|
extern const unsigned long SIOCSIFTXQLEN;
|
|
extern const unsigned long SIOCSPGRP;
|
|
extern const unsigned long SIOCSRARP;
|
|
extern const unsigned long SIOGIFINDEX;
|
|
|
|
#define SIOCGIFCONF SIOCGIFCONF
|
|
#define SIOCGIFADDR SIOCGIFADDR
|
|
#define SIOCSIFADDR SIOCSIFADDR
|
|
#define SIOCDIFADDR SIOCDIFADDR
|
|
#define SIOCGIFBRDADDR SIOCGIFBRDADDR
|
|
#define SIOCGIFNETMASK SIOCGIFNETMASK
|
|
#define SIOCGIFFLAGS SIOCGIFFLAGS
|
|
#define SIOCSIFFLAGS SIOCSIFFLAGS
|
|
#define SIOCGIFMETRIC SIOCGIFMETRIC
|
|
#define SIOCSIFMETRIC SIOCSIFMETRIC
|
|
#define SIOCSIFBRDADDR SIOCSIFBRDADDR
|
|
#define SIOCSIFNETMASK SIOCSIFNETMASK
|
|
#define SIOCGIFDSTADDR SIOCGIFDSTADDR
|
|
#define SIOCSIFDSTADDR SIOCSIFDSTADDR
|
|
#define SIOCGIFMTU SIOCGIFMTU
|
|
#define SIOCSIFMTU SIOCSIFMTU
|
|
|
|
#define SIOCGPGRP SIOCGPGRP
|
|
#define SIOCSPGRP SIOCSPGRP
|
|
|
|
#define SIOCADDMULTI SIOCADDMULTI
|
|
#define SIOCDELMULTI SIOCDELMULTI
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SIO_H_ */
|