mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
ec480f5aa0
- Every unit test now passes on Apple Silicon. The final piece of this puzzle was porting our POSIX threads cancelation support, since that works differently on ARM64 XNU vs. AMD64. Our semaphore support on Apple Silicon is also superior now compared to AMD64, thanks to the grand central dispatch library which lets *NSYNC locks go faster. - The Cosmopolitan runtime is now more stable, particularly on Windows. To do this, thread local storage is mandatory at all runtime levels, and the innermost packages of the C library is no longer being built using ASAN. TLS is being bootstrapped with a 128-byte TIB during the process startup phase, and then later on the runtime re-allocates it either statically or dynamically to support code using _Thread_local. fork() and execve() now do a better job cooperating with threads. We can now check how much stack memory is left in the process or thread when functions like kprintf() / execve() etc. call alloca(), so that ENOMEM can be raised, reduce a buffer size, or just print a warning. - POSIX signal emulation is now implemented the same way kernels do it with pthread_kill() and raise(). Any thread can interrupt any other thread, regardless of what it's doing. If it's blocked on read/write then the killer thread will cancel its i/o operation so that EINTR can be returned in the mark thread immediately. If it's doing a tight CPU bound operation, then that's also interrupted by the signal delivery. Signal delivery works now by suspending a thread and pushing context data structures onto its stack, and redirecting its execution to a trampoline function, which calls SetThreadContext(GetCurrentThread()) when it's done. - We're now doing a better job managing locks and handles. On NetBSD we now close semaphore file descriptors in forked children. Semaphores on Windows can now be canceled immediately, which means mutexes/condition variables will now go faster. Apple Silicon semaphores can be canceled too. We're now using Apple's pthread_yield() funciton. Apple _nocancel syscalls are now used on XNU when appropriate to ensure pthread_cancel requests aren't lost. The MbedTLS library has been updated to support POSIX thread cancelations. See tool/build/runitd.c for an example of how it can be used for production multi-threaded tls servers. Handles on Windows now leak less often across processes. All i/o operations on Windows are now overlapped, which means file pointers can no longer be inherited across dup() and fork() for the time being. - We now spawn a thread on Windows to deliver SIGCHLD and wakeup wait4() which means, for example, that posix_spawn() now goes 3x faster. POSIX spawn is also now more correct. Like Musl, it's now able to report the failure code of execve() via a pipe although our approach favors using shared memory to do that on systems that have a true vfork() function. - We now spawn a thread to deliver SIGALRM to threads when setitimer() is used. This enables the most precise wakeups the OS makes possible. - The Cosmopolitan runtime now uses less memory. On NetBSD for example, it turned out the kernel would actually commit the PT_GNU_STACK size which caused RSS to be 6mb for every process. Now it's down to ~4kb. On Apple Silicon, we reduce the mandatory upstream thread size to the smallest possible size to reduce the memory overhead of Cosmo threads. The examples directory has a program called greenbean which can spawn a web server on Linux with 10,000 worker threads and have the memory usage of the process be ~77mb. The 1024 byte overhead of POSIX-style thread-local storage is now optional; it won't be allocated until the pthread_setspecific/getspecific functions are called. On Windows, the threads that get spawned which are internal to the libc implementation use reserve rather than commit memory, which shaves a few hundred kb. - sigaltstack() is now supported on Windows, however it's currently not able to be used to handle stack overflows, since crash signals are still generated by WIN32. However the crash handler will still switch to the alt stack, which is helpful in environments with tiny threads. - Test binaries are now smaller. Many of the mandatory dependencies of the test runner have been removed. This ensures many programs can do a better job only linking the the thing they're testing. This caused the test binaries for LIBC_FMT for example, to decrease from 200kb to 50kb - long double is no longer used in the implementation details of libc, except in the APIs that define it. The old code that used long double for time (instead of struct timespec) has now been thoroughly removed. - ShowCrashReports() is now much tinier in MODE=tiny. Instead of doing backtraces itself, it'll just print a command you can run on the shell using our new `cosmoaddr2line` program to view the backtrace. - Crash report signal handling now works in a much better way. Instead of terminating the process, it now relies on SA_RESETHAND so that the default SIG_IGN behavior can terminate the process if necessary. - Our pledge() functionality has now been fully ported to AARCH64 Linux.
671 lines
13 KiB
C
671 lines
13 KiB
C
#ifndef COSMOPOLITAN_LIBC_ERRNO_H_
|
|
#define COSMOPOLITAN_LIBC_ERRNO_H_
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
/**
|
|
* @fileoverview System Five error codes.
|
|
*
|
|
* This file defines the `errno` global variable. When system calls
|
|
* (e.g. read(), write(), etc.) fail they return -1 to indicate the
|
|
* failure, and that is *the only* error return value. System calls
|
|
* also update `errno` too whenever -1 is returned (otherwise errno
|
|
* isn't changed) to be a non-zero value holding one of the numbers
|
|
* below, in order to indicate why the system call failed.
|
|
*
|
|
* There is only one exception to the above rule; some system calls
|
|
* are documented with the `@returnserrno` tag, which means they'll
|
|
* return the error number rather than stuffing it in a global. You
|
|
* can usually spot these system calls easily since most of them'll
|
|
* have names like `posix_foo()` or `pthread_bar()`.
|
|
*
|
|
* @see libc/sysv/consts.sh for assigned numbers
|
|
* @see libc/sysv/dos2errno.sh for multimapped numbers
|
|
*/
|
|
|
|
#if defined(__GNUC__) && defined(__aarch64__) && !defined(__STRICT_ANSI__) && \
|
|
!defined(__cplusplus)
|
|
/* this header is included by 700+ files; therefore we */
|
|
/* hand-roll &__get_tls()->tib_errno to avoid #include */
|
|
/* cosmopolitan uses x28 as the tls register b/c apple */
|
|
#define errno \
|
|
(*({ \
|
|
errno_t *__ep; \
|
|
asm("sub\t%0,x28,#68" : "=r"(__ep)); \
|
|
__ep; \
|
|
}))
|
|
#else
|
|
#define errno (*__errno_location())
|
|
#endif
|
|
|
|
/**
|
|
* System call unavailable.
|
|
* @note kNtErrorInvalidFunction on NT
|
|
*/
|
|
extern const errno_t ENOSYS;
|
|
|
|
/**
|
|
* Operation not permitted.
|
|
* @note kNtErrorInvalidAccess on NT
|
|
*/
|
|
extern const errno_t EPERM;
|
|
|
|
/**
|
|
* No such file or directory.
|
|
*/
|
|
extern const errno_t ENOENT;
|
|
|
|
/**
|
|
* No such process.
|
|
*/
|
|
extern const errno_t ESRCH;
|
|
|
|
/**
|
|
* The greatest of all errnos.
|
|
*/
|
|
extern const errno_t EINTR;
|
|
|
|
/**
|
|
* Unix consensus.
|
|
*/
|
|
extern const errno_t EIO;
|
|
|
|
/**
|
|
* No such device or address.
|
|
*/
|
|
extern const errno_t ENXIO;
|
|
|
|
/**
|
|
* Argument list too errno_t.
|
|
*/
|
|
extern const errno_t E2BIG;
|
|
|
|
/**
|
|
* Exec format error.
|
|
*/
|
|
extern const errno_t ENOEXEC;
|
|
|
|
/**
|
|
* Bad file descriptor.
|
|
*/
|
|
extern const errno_t EBADF;
|
|
|
|
/**
|
|
* No child process.
|
|
*/
|
|
extern const errno_t ECHILD;
|
|
|
|
/**
|
|
* Resource temporarily unavailable (e.g. SO_RCVTIMEO expired, too many
|
|
* processes, too much memory locked, read or write with O_NONBLOCK needs
|
|
* polling, etc.).
|
|
*/
|
|
extern const errno_t EAGAIN;
|
|
|
|
/**
|
|
* We require more vespene gas.
|
|
*/
|
|
extern const errno_t ENOMEM;
|
|
|
|
/**
|
|
* Permission denied.
|
|
*/
|
|
extern const errno_t EACCES;
|
|
|
|
/**
|
|
* Pointer passed to system call that would otherwise segfault.
|
|
*/
|
|
extern const errno_t EFAULT;
|
|
|
|
/**
|
|
* Block device required.
|
|
*/
|
|
extern const errno_t ENOTBLK;
|
|
|
|
/**
|
|
* Device or resource busy.
|
|
*/
|
|
extern const errno_t EBUSY;
|
|
|
|
/**
|
|
* File exists.
|
|
*/
|
|
extern const errno_t EEXIST;
|
|
|
|
/**
|
|
* Improper link.
|
|
*/
|
|
extern const errno_t EXDEV;
|
|
|
|
/**
|
|
* No such device.
|
|
*/
|
|
extern const errno_t ENODEV;
|
|
|
|
/**
|
|
* Not a directory.
|
|
*/
|
|
extern const errno_t ENOTDIR;
|
|
|
|
/**
|
|
* Is a a directory.
|
|
*/
|
|
extern const errno_t EISDIR;
|
|
|
|
/**
|
|
* Invalid argument.
|
|
*/
|
|
extern const errno_t EINVAL;
|
|
|
|
/**
|
|
* Too many open files in system.
|
|
*/
|
|
extern const errno_t ENFILE;
|
|
|
|
/**
|
|
* Too many open files.
|
|
*/
|
|
extern const errno_t EMFILE;
|
|
|
|
/**
|
|
* Inappropriate i/o control operation.
|
|
*/
|
|
extern const errno_t ENOTTY;
|
|
|
|
/**
|
|
* Won't open executable that's executing in write mode.
|
|
*/
|
|
extern const errno_t ETXTBSY;
|
|
|
|
/**
|
|
* File too large.
|
|
*/
|
|
extern const errno_t EFBIG;
|
|
|
|
/**
|
|
* No space left on device.
|
|
*/
|
|
extern const errno_t ENOSPC;
|
|
|
|
/**
|
|
* Disk quota exceeded.
|
|
*/
|
|
extern const errno_t EDQUOT;
|
|
|
|
/**
|
|
* Invalid seek.
|
|
*/
|
|
extern const errno_t ESPIPE;
|
|
|
|
/**
|
|
* Read-only filesystem.
|
|
*/
|
|
extern const errno_t EROFS;
|
|
|
|
/**
|
|
* Too many links.
|
|
*/
|
|
extern const errno_t EMLINK;
|
|
|
|
/**
|
|
* Broken pipe.
|
|
*/
|
|
extern const errno_t EPIPE;
|
|
|
|
/**
|
|
* Mathematics argument out of domain of function.
|
|
*/
|
|
extern const errno_t EDOM;
|
|
|
|
/**
|
|
* Result too large.
|
|
*/
|
|
extern const errno_t ERANGE;
|
|
|
|
/**
|
|
* Resource deadlock avoided.
|
|
*/
|
|
extern const errno_t EDEADLK;
|
|
|
|
/**
|
|
* Filename too errno_t.
|
|
*/
|
|
extern const errno_t ENAMETOOLONG;
|
|
|
|
/**
|
|
* No locks available.
|
|
*/
|
|
extern const errno_t ENOLCK;
|
|
|
|
/**
|
|
* Directory not empty.
|
|
*/
|
|
extern const errno_t ENOTEMPTY;
|
|
|
|
/**
|
|
* Too many levels of symbolic links.
|
|
*/
|
|
extern const errno_t ELOOP;
|
|
|
|
/**
|
|
* No message error.
|
|
*/
|
|
extern const errno_t ENOMSG;
|
|
|
|
/**
|
|
* Identifier removed.
|
|
*/
|
|
extern const errno_t EIDRM;
|
|
|
|
/**
|
|
* Timer expired.
|
|
*/
|
|
extern const errno_t ETIME;
|
|
|
|
/**
|
|
* Protocol error.
|
|
*/
|
|
extern const errno_t EPROTO;
|
|
|
|
/**
|
|
* Overflow error.
|
|
*/
|
|
extern const errno_t EOVERFLOW;
|
|
|
|
/**
|
|
* Unicode decoding error.
|
|
*/
|
|
extern const errno_t EILSEQ;
|
|
|
|
/**
|
|
* Too many users.
|
|
*/
|
|
extern const errno_t EUSERS;
|
|
|
|
/**
|
|
* Not a socket.
|
|
*/
|
|
extern const errno_t ENOTSOCK;
|
|
|
|
/**
|
|
* Destination address required.
|
|
*/
|
|
extern const errno_t EDESTADDRREQ;
|
|
|
|
/**
|
|
* Message too errno_t.
|
|
*/
|
|
extern const errno_t EMSGSIZE;
|
|
|
|
/**
|
|
* Protocol wrong type for socket.
|
|
*/
|
|
extern const errno_t EPROTOTYPE;
|
|
|
|
/**
|
|
* Protocol not available.
|
|
*/
|
|
extern const errno_t ENOPROTOOPT;
|
|
|
|
/**
|
|
* Protocol not supported.
|
|
*/
|
|
extern const errno_t EPROTONOSUPPORT;
|
|
|
|
/**
|
|
* Socket type not supported.
|
|
*/
|
|
extern const errno_t ESOCKTNOSUPPORT;
|
|
|
|
/**
|
|
* Operation not supported.
|
|
*/
|
|
extern const errno_t ENOTSUP;
|
|
|
|
/**
|
|
* Socket operation not supported.
|
|
*/
|
|
extern const errno_t EOPNOTSUPP;
|
|
|
|
/**
|
|
* Protocol family not supported.
|
|
*/
|
|
extern const errno_t EPFNOSUPPORT;
|
|
|
|
/**
|
|
* Address family not supported.
|
|
*/
|
|
extern const errno_t EAFNOSUPPORT;
|
|
|
|
/**
|
|
* Address already in use.
|
|
*/
|
|
extern const errno_t EADDRINUSE;
|
|
|
|
/**
|
|
* Address not available.
|
|
*/
|
|
extern const errno_t EADDRNOTAVAIL;
|
|
|
|
/**
|
|
* Network is down.
|
|
*/
|
|
extern const errno_t ENETDOWN;
|
|
|
|
/**
|
|
* Host is unreachable.
|
|
*/
|
|
extern const errno_t ENETUNREACH;
|
|
|
|
/**
|
|
* Connection reset by network.
|
|
*/
|
|
extern const errno_t ENETRESET;
|
|
|
|
/**
|
|
* Connection reset before accept.
|
|
*/
|
|
extern const errno_t ECONNABORTED;
|
|
|
|
/**
|
|
* Connection reset by client.
|
|
*/
|
|
extern const errno_t ECONNRESET;
|
|
|
|
/**
|
|
* No buffer space available.
|
|
*/
|
|
extern const errno_t ENOBUFS;
|
|
|
|
/**
|
|
* Socket is connected.
|
|
*/
|
|
extern const errno_t EISCONN;
|
|
|
|
/**
|
|
* Socket is not connected.
|
|
*/
|
|
extern const errno_t ENOTCONN;
|
|
|
|
/**
|
|
* Cannot send after transport endpoint shutdown.
|
|
*/
|
|
extern const errno_t ESHUTDOWN;
|
|
|
|
/**
|
|
* Too many references: cannot splice.
|
|
*/
|
|
extern const errno_t ETOOMANYREFS;
|
|
|
|
/**
|
|
* Connection timed out.
|
|
*/
|
|
extern const errno_t ETIMEDOUT;
|
|
|
|
/**
|
|
* Connection refused error.
|
|
*/
|
|
extern const errno_t ECONNREFUSED;
|
|
|
|
/**
|
|
* Host down error.
|
|
*/
|
|
extern const errno_t EHOSTDOWN;
|
|
|
|
/**
|
|
* Host unreachable error.
|
|
*/
|
|
extern const errno_t EHOSTUNREACH;
|
|
|
|
/**
|
|
* Connection already in progress.
|
|
*/
|
|
extern const errno_t EALREADY;
|
|
|
|
/**
|
|
* Operation already in progress.
|
|
*/
|
|
extern const errno_t EINPROGRESS;
|
|
|
|
/**
|
|
* Stale error.
|
|
*/
|
|
extern const errno_t ESTALE;
|
|
|
|
/**
|
|
* Remote error.
|
|
*/
|
|
extern const errno_t EREMOTE;
|
|
|
|
/**
|
|
* Bad message.
|
|
*/
|
|
extern const errno_t EBADMSG;
|
|
|
|
/**
|
|
* Operation canceled.
|
|
*/
|
|
extern const errno_t ECANCELED;
|
|
|
|
/**
|
|
* Owner died.
|
|
*/
|
|
extern const errno_t EOWNERDEAD;
|
|
|
|
/**
|
|
* State not recoverable.
|
|
*/
|
|
extern const errno_t ENOTRECOVERABLE;
|
|
|
|
/**
|
|
* No network.
|
|
*/
|
|
extern const errno_t ENONET;
|
|
|
|
/**
|
|
* Please restart syscall.
|
|
*/
|
|
extern const errno_t ERESTART;
|
|
|
|
/**
|
|
* Out of streams resources.
|
|
*/
|
|
extern const errno_t ENOSR;
|
|
|
|
/**
|
|
* No string.
|
|
*/
|
|
extern const errno_t ENOSTR;
|
|
|
|
/**
|
|
* No data.
|
|
*/
|
|
extern const errno_t ENODATA;
|
|
|
|
/**
|
|
* Multihop attempted.
|
|
*/
|
|
extern const errno_t EMULTIHOP;
|
|
|
|
/**
|
|
* Link severed.
|
|
*/
|
|
extern const errno_t ENOLINK;
|
|
|
|
/**
|
|
* No medium found.
|
|
*/
|
|
extern const errno_t ENOMEDIUM;
|
|
|
|
/**
|
|
* Wrong medium type.
|
|
*/
|
|
extern const errno_t EMEDIUMTYPE;
|
|
|
|
/**
|
|
* Inappropriate file type or format.
|
|
*/
|
|
extern const errno_t EFTYPE;
|
|
|
|
extern const errno_t EAUTH;
|
|
extern const errno_t EBADARCH;
|
|
extern const errno_t EBADEXEC;
|
|
extern const errno_t EBADMACHO;
|
|
extern const errno_t EBADRPC;
|
|
extern const errno_t EDEVERR;
|
|
extern const errno_t ENEEDAUTH;
|
|
extern const errno_t ENOATTR;
|
|
extern const errno_t ENOPOLICY;
|
|
extern const errno_t EPROCLIM;
|
|
extern const errno_t EPROCUNAVAIL;
|
|
extern const errno_t EPROGMISMATCH;
|
|
extern const errno_t EPROGUNAVAIL;
|
|
extern const errno_t EPWROFF;
|
|
extern const errno_t ERPCMISMATCH;
|
|
extern const errno_t ESHLIBVERS;
|
|
extern const errno_t EADV;
|
|
extern const errno_t EBADE;
|
|
extern const errno_t EBADFD;
|
|
extern const errno_t EBADR;
|
|
extern const errno_t EBADRQC;
|
|
extern const errno_t EBADSLT;
|
|
extern const errno_t ECHRNG;
|
|
extern const errno_t ECOMM;
|
|
extern const errno_t EDOTDOT;
|
|
extern const errno_t EHWPOISON;
|
|
extern const errno_t EISNAM;
|
|
extern const errno_t EKEYEXPIRED;
|
|
extern const errno_t EKEYREJECTED;
|
|
extern const errno_t EKEYREVOKED;
|
|
extern const errno_t EL2HLT;
|
|
extern const errno_t EL2NSYNC;
|
|
extern const errno_t EL3HLT;
|
|
extern const errno_t EL3RST;
|
|
extern const errno_t ELIBACC;
|
|
extern const errno_t ELIBBAD;
|
|
extern const errno_t ELIBEXEC;
|
|
extern const errno_t ELIBMAX;
|
|
extern const errno_t ELIBSCN;
|
|
extern const errno_t ELNRNG;
|
|
extern const errno_t ENAVAIL;
|
|
extern const errno_t ENOANO;
|
|
extern const errno_t ENOCSI;
|
|
extern const errno_t ENOKEY;
|
|
extern const errno_t ENOPKG;
|
|
extern const errno_t ENOTNAM;
|
|
extern const errno_t ENOTUNIQ;
|
|
extern const errno_t EREMCHG;
|
|
extern const errno_t EREMOTEIO;
|
|
extern const errno_t ERFKILL;
|
|
extern const errno_t ESRMNT;
|
|
extern const errno_t ESTRPIPE;
|
|
extern const errno_t EUCLEAN;
|
|
extern const errno_t EUNATCH;
|
|
extern const errno_t EXFULL;
|
|
|
|
#define E2BIG E2BIG
|
|
#define EACCES EACCES
|
|
#define EADDRINUSE EADDRINUSE
|
|
#define EADDRNOTAVAIL EADDRNOTAVAIL
|
|
#define EAFNOSUPPORT EAFNOSUPPORT
|
|
#define EAGAIN EAGAIN
|
|
#define EALREADY EALREADY
|
|
#define EBADF EBADF
|
|
#define EBADMSG EBADMSG
|
|
#define EBUSY EBUSY
|
|
#define ECANCELED ECANCELED
|
|
#define ECHILD ECHILD
|
|
#define ECONNABORTED ECONNABORTED
|
|
#define ECONNREFUSED ECONNREFUSED
|
|
#define ECONNRESET ECONNRESET
|
|
#define EDEADLK EDEADLK
|
|
#define EDESTADDRREQ EDESTADDRREQ
|
|
#define EDOM EDOM
|
|
#define EDQUOT EDQUOT
|
|
#define EEXIST EEXIST
|
|
#define EFAULT EFAULT
|
|
#define EFBIG EFBIG
|
|
#define EFTYPE EFTYPE
|
|
#define EHOSTDOWN EHOSTDOWN
|
|
#define EHOSTUNREACH EHOSTUNREACH
|
|
#define EIDRM EIDRM
|
|
#define EILSEQ EILSEQ
|
|
#define EINPROGRESS EINPROGRESS
|
|
#define EINTR EINTR
|
|
#define EINVAL EINVAL
|
|
#define EIO EIO
|
|
#define EISCONN EISCONN
|
|
#define EISDIR EISDIR
|
|
#define ELOOP ELOOP
|
|
#define EMEDIUMTYPE EMEDIUMTYPE
|
|
#define EMFILE EMFILE
|
|
#define EMLINK EMLINK
|
|
#define EMSGSIZE EMSGSIZE
|
|
#define EMULTIHOP EMULTIHOP
|
|
#define ENAMETOOLONG ENAMETOOLONG
|
|
#define ENETDOWN ENETDOWN
|
|
#define ENETRESET ENETRESET
|
|
#define ENETUNREACH ENETUNREACH
|
|
#define ENFILE ENFILE
|
|
#define ENOBUFS ENOBUFS
|
|
#define ENODATA ENODATA
|
|
#define ENODEV ENODEV
|
|
#define ENOENT ENOENT
|
|
#define ENOEXEC ENOEXEC
|
|
#define ENOLCK ENOLCK
|
|
#define ENOLINK ENOLINK
|
|
#define ENOMEDIUM ENOMEDIUM
|
|
#define ENOMEM ENOMEM
|
|
#define ENOMSG ENOMSG
|
|
#define ENONET ENONET
|
|
#define ENOPROTOOPT ENOPROTOOPT
|
|
#define ENOSPC ENOSPC
|
|
#define ENOSR ENOSR
|
|
#define ENOSTR ENOSTR
|
|
#define ENOSYS ENOSYS
|
|
#define ENOTBLK ENOTBLK
|
|
#define ENOTCONN ENOTCONN
|
|
#define ENOTDIR ENOTDIR
|
|
#define ENOTEMPTY ENOTEMPTY
|
|
#define ENOTRECOVERABLE ENOTRECOVERABLE
|
|
#define ENOTSOCK ENOTSOCK
|
|
#define ENOTSUP ENOTSUP
|
|
#define ENOTTY ENOTTY
|
|
#define ENXIO ENXIO
|
|
#define EOPNOTSUPP EOPNOTSUPP
|
|
#define EOVERFLOW EOVERFLOW
|
|
#define EOWNERDEAD EOWNERDEAD
|
|
#define EPERM EPERM
|
|
#define EPFNOSUPPORT EPFNOSUPPORT
|
|
#define EPIPE EPIPE
|
|
#define EPROTO EPROTO
|
|
#define EPROTONOSUPPORT EPROTONOSUPPORT
|
|
#define EPROTOTYPE EPROTOTYPE
|
|
#define ERANGE ERANGE
|
|
#define EREMOTE EREMOTE
|
|
#define ERESTART ERESTART
|
|
#define EROFS EROFS
|
|
#define ESHUTDOWN ESHUTDOWN
|
|
#define ESOCKTNOSUPPORT ESOCKTNOSUPPORT
|
|
#define ESPIPE ESPIPE
|
|
#define ESRCH ESRCH
|
|
#define ESTALE ESTALE
|
|
#define ETIME ETIME
|
|
#define ETIMEDOUT ETIMEDOUT
|
|
#define ETOOMANYREFS ETOOMANYREFS
|
|
#define ETXTBSY ETXTBSY
|
|
#define EUSERS EUSERS
|
|
#define EWOULDBLOCK EAGAIN
|
|
#define EXDEV EXDEV
|
|
|
|
extern errno_t __errno;
|
|
errno_t *__errno_location(void) dontthrow pureconst;
|
|
|
|
#if defined(_COSMO_SOURCE) || defined(_GNU_SOURCE)
|
|
extern char *program_invocation_short_name;
|
|
extern char *program_invocation_name;
|
|
#endif
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_ERRNO_H_ */
|