]> sourceware.org Git - newlib-cygwin.git/blame - newlib/libc/include/sys/errno.h
2008-12-11 Jeff Johnston <jjohnstn@redhat.com>
[newlib-cygwin.git] / newlib / libc / include / sys / errno.h
CommitLineData
8a0efa53
CF
1/* errno is not a global variable, because that would make using it
2 non-reentrant. Instead, its address is returned by the function
3 __errno. */
4
5#ifndef _SYS_ERRNO_H_
6#ifdef __cplusplus
7extern "C" {
8#endif
9#define _SYS_ERRNO_H_
10
11#include <sys/reent.h>
12
13#ifndef _REENT_ONLY
14#define errno (*__errno())
15extern int *__errno _PARAMS ((void));
16#endif
17
8e26d5b5
CF
18/* Please don't use these variables directly.
19 Use strerror instead. */
749d9bcd
DD
20extern __IMPORT _CONST char * _CONST _sys_errlist[];
21extern __IMPORT int _sys_nerr;
4acf3edf
CF
22#ifdef __CYGWIN__
23extern __IMPORT const char * const sys_errlist[];
24extern __IMPORT int sys_nerr;
25#endif
8a0efa53
CF
26
27#define __errno_r(ptr) ((ptr)->_errno)
28
29#define EPERM 1 /* Not super-user */
30#define ENOENT 2 /* No such file or directory */
31#define ESRCH 3 /* No such process */
32#define EINTR 4 /* Interrupted system call */
33#define EIO 5 /* I/O error */
34#define ENXIO 6 /* No such device or address */
35#define E2BIG 7 /* Arg list too long */
36#define ENOEXEC 8 /* Exec format error */
37#define EBADF 9 /* Bad file number */
38#define ECHILD 10 /* No children */
39#define EAGAIN 11 /* No more processes */
40#define ENOMEM 12 /* Not enough core */
41#define EACCES 13 /* Permission denied */
42#define EFAULT 14 /* Bad address */
43#define ENOTBLK 15 /* Block device required */
44#define EBUSY 16 /* Mount device busy */
45#define EEXIST 17 /* File exists */
46#define EXDEV 18 /* Cross-device link */
47#define ENODEV 19 /* No such device */
48#define ENOTDIR 20 /* Not a directory */
49#define EISDIR 21 /* Is a directory */
50#define EINVAL 22 /* Invalid argument */
51#define ENFILE 23 /* Too many open files in system */
52#define EMFILE 24 /* Too many open files */
53#define ENOTTY 25 /* Not a typewriter */
54#define ETXTBSY 26 /* Text file busy */
55#define EFBIG 27 /* File too large */
56#define ENOSPC 28 /* No space left on device */
57#define ESPIPE 29 /* Illegal seek */
58#define EROFS 30 /* Read only file system */
59#define EMLINK 31 /* Too many links */
60#define EPIPE 32 /* Broken pipe */
61#define EDOM 33 /* Math arg out of domain of func */
62#define ERANGE 34 /* Math result not representable */
63#define ENOMSG 35 /* No message of desired type */
64#define EIDRM 36 /* Identifier removed */
65#define ECHRNG 37 /* Channel number out of range */
66#define EL2NSYNC 38 /* Level 2 not synchronized */
67#define EL3HLT 39 /* Level 3 halted */
68#define EL3RST 40 /* Level 3 reset */
69#define ELNRNG 41 /* Link number out of range */
70#define EUNATCH 42 /* Protocol driver not attached */
71#define ENOCSI 43 /* No CSI structure available */
72#define EL2HLT 44 /* Level 2 halted */
73#define EDEADLK 45 /* Deadlock condition */
74#define ENOLCK 46 /* No record locks available */
75#define EBADE 50 /* Invalid exchange */
76#define EBADR 51 /* Invalid request descriptor */
77#define EXFULL 52 /* Exchange full */
78#define ENOANO 53 /* No anode */
79#define EBADRQC 54 /* Invalid request code */
80#define EBADSLT 55 /* Invalid slot */
81#define EDEADLOCK 56 /* File locking deadlock error */
82#define EBFONT 57 /* Bad font file fmt */
83#define ENOSTR 60 /* Device not a stream */
84#define ENODATA 61 /* No data (for no delay io) */
85#define ETIME 62 /* Timer expired */
86#define ENOSR 63 /* Out of streams resources */
87#define ENONET 64 /* Machine is not on the network */
88#define ENOPKG 65 /* Package not installed */
89#define EREMOTE 66 /* The object is remote */
90#define ENOLINK 67 /* The link has been severed */
91#define EADV 68 /* Advertise error */
92#define ESRMNT 69 /* Srmount error */
93#define ECOMM 70 /* Communication error on send */
94#define EPROTO 71 /* Protocol error */
95#define EMULTIHOP 74 /* Multihop attempted */
96#define ELBIN 75 /* Inode is remote (not really error) */
97#define EDOTDOT 76 /* Cross mount point (not really error) */
98#define EBADMSG 77 /* Trying to read unreadable message */
a7b23a8f 99#define EFTYPE 79 /* Inappropriate file type or format */
8a0efa53
CF
100#define ENOTUNIQ 80 /* Given log. name not unique */
101#define EBADFD 81 /* f.d. invalid for this operation */
102#define EREMCHG 82 /* Remote address changed */
103#define ELIBACC 83 /* Can't access a needed shared lib */
104#define ELIBBAD 84 /* Accessing a corrupted shared lib */
105#define ELIBSCN 85 /* .lib section in a.out corrupted */
106#define ELIBMAX 86 /* Attempting to link in too many libs */
107#define ELIBEXEC 87 /* Attempting to exec a shared library */
108#define ENOSYS 88 /* Function not implemented */
109#define ENMFILE 89 /* No more files */
110#define ENOTEMPTY 90 /* Directory not empty */
111#define ENAMETOOLONG 91 /* File or path name too long */
112#define ELOOP 92 /* Too many symbolic links */
113#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
114#define EPFNOSUPPORT 96 /* Protocol family not supported */
115#define ECONNRESET 104 /* Connection reset by peer */
116#define ENOBUFS 105 /* No buffer space available */
7713fb6f
JJ
117#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
118#define EPROTOTYPE 107 /* Protocol wrong type for socket */
119#define ENOTSOCK 108 /* Socket operation on non-socket */
120#define ENOPROTOOPT 109 /* Protocol not available */
121#define ESHUTDOWN 110 /* Can't send after socket shutdown */
8a0efa53
CF
122#define ECONNREFUSED 111 /* Connection refused */
123#define EADDRINUSE 112 /* Address already in use */
124#define ECONNABORTED 113 /* Connection aborted */
7713fb6f
JJ
125#define ENETUNREACH 114 /* Network is unreachable */
126#define ENETDOWN 115 /* Network interface is not configured */
127#define ETIMEDOUT 116 /* Connection timed out */
128#define EHOSTDOWN 117 /* Host is down */
129#define EHOSTUNREACH 118 /* Host is unreachable */
130#define EINPROGRESS 119 /* Connection already in progress */
131#define EALREADY 120 /* Socket already connected */
132#define EDESTADDRREQ 121 /* Destination address required */
133#define EMSGSIZE 122 /* Message too long */
134#define EPROTONOSUPPORT 123 /* Unknown protocol */
135#define ESOCKTNOSUPPORT 124 /* Socket type not supported */
136#define EADDRNOTAVAIL 125 /* Address not available */
8a0efa53 137#define ENETRESET 126
7713fb6f
JJ
138#define EISCONN 127 /* Socket is already connected */
139#define ENOTCONN 128 /* Socket is not connected */
8a0efa53
CF
140#define ETOOMANYREFS 129
141#define EPROCLIM 130
142#define EUSERS 131
143#define EDQUOT 132
144#define ESTALE 133
7713fb6f 145#define ENOTSUP 134 /* Not supported */
b96fca8c
CV
146#define ENOMEDIUM 135 /* No medium (in tape drive) */
147#define ENOSHARE 136 /* No such host or network path */
b8a8c59d 148#define ECASECLASH 137 /* Filename exists with different case */
8d9112f2 149#define EILSEQ 138
06f1353a 150#define EOVERFLOW 139 /* Value too large for defined data type */
29212ab3
JJ
151#define ECANCELED 140 /* Operation canceled */
152#define ENOTRECOVERABLE 141 /* State not recoverable */
153#define EOWNERDEAD 142 /* Previous owner died */
154
8a0efa53
CF
155
156/* From cygwin32. */
157#define EWOULDBLOCK EAGAIN /* Operation would block */
158
159#define __ELASTERROR 2000 /* Users can add values starting here */
160
161#ifdef __cplusplus
162}
163#endif
164#endif /* _SYS_ERRNO_H */
This page took 0.171898 seconds and 5 git commands to generate.