Back to index

glibc  2.9
errno.h
Go to the documentation of this file.
00001 /* This file generated by errnos.awk.  */
00002 
00003 /* The Hurd uses Mach error system 0x10, currently only subsystem 0. */
00004 #ifndef _HURD_ERRNO
00005 #define _HURD_ERRNO(n)      ((0x10 << 26) | ((n) & 0x3fff))
00006 #endif
00007 
00008 #ifdef _ERRNO_H
00009 
00010 enum __error_t_codes
00011 {
00012 #undef EDOM
00013 #undef ERANGE
00014        EPERM           = _HURD_ERRNO (1),
00015 #define       EPERM           _HURD_ERRNO (1) /* Operation not permitted */
00016        ENOENT          = _HURD_ERRNO (2),
00017 #define       ENOENT          _HURD_ERRNO (2) /* No such file or directory */
00018        ESRCH           = _HURD_ERRNO (3),
00019 #define       ESRCH           _HURD_ERRNO (3) /* No such process */
00020        EINTR           = _HURD_ERRNO (4),
00021 #define       EINTR           _HURD_ERRNO (4) /* Interrupted system call */
00022        EIO             = _HURD_ERRNO (5),
00023 #define       EIO             _HURD_ERRNO (5) /* Input/output error */
00024        ENXIO           = _HURD_ERRNO (6),
00025 #define       ENXIO           _HURD_ERRNO (6) /* No such device or address */
00026        E2BIG           = _HURD_ERRNO (7),
00027 #define       E2BIG           _HURD_ERRNO (7) /* Argument list too long */
00028        ENOEXEC         = _HURD_ERRNO (8),
00029 #define       ENOEXEC         _HURD_ERRNO (8) /* Exec format error */
00030        EBADF           = _HURD_ERRNO (9),
00031 #define       EBADF           _HURD_ERRNO (9) /* Bad file descriptor */
00032        ECHILD          = _HURD_ERRNO (10),
00033 #define       ECHILD          _HURD_ERRNO (10)/* No child processes */
00034        EDEADLK         = _HURD_ERRNO (11),
00035 #define       EDEADLK         _HURD_ERRNO (11)/* Resource deadlock avoided */
00036        ENOMEM          = _HURD_ERRNO (12),
00037 #define       ENOMEM          _HURD_ERRNO (12)/* Cannot allocate memory */
00038        EACCES          = _HURD_ERRNO (13),
00039 #define       EACCES          _HURD_ERRNO (13)/* Permission denied */
00040        EFAULT          = _HURD_ERRNO (14),
00041 #define       EFAULT          _HURD_ERRNO (14)/* Bad address */
00042        ENOTBLK         = _HURD_ERRNO (15),
00043 #define       ENOTBLK         _HURD_ERRNO (15)/* Block device required */
00044        EBUSY           = _HURD_ERRNO (16),
00045 #define       EBUSY           _HURD_ERRNO (16)/* Device or resource busy */
00046        EEXIST          = _HURD_ERRNO (17),
00047 #define       EEXIST          _HURD_ERRNO (17)/* File exists */
00048        EXDEV           = _HURD_ERRNO (18),
00049 #define       EXDEV           _HURD_ERRNO (18)/* Invalid cross-device link */
00050        ENODEV          = _HURD_ERRNO (19),
00051 #define       ENODEV          _HURD_ERRNO (19)/* No such device */
00052        ENOTDIR         = _HURD_ERRNO (20),
00053 #define       ENOTDIR         _HURD_ERRNO (20)/* Not a directory */
00054        EISDIR          = _HURD_ERRNO (21),
00055 #define       EISDIR          _HURD_ERRNO (21)/* Is a directory */
00056        EINVAL          = _HURD_ERRNO (22),
00057 #define       EINVAL          _HURD_ERRNO (22)/* Invalid argument */
00058        EMFILE          = _HURD_ERRNO (24),
00059 #define       EMFILE          _HURD_ERRNO (24)/* Too many open files */
00060        ENFILE          = _HURD_ERRNO (23),
00061 #define       ENFILE          _HURD_ERRNO (23)/* Too many open files in system */
00062        ENOTTY          = _HURD_ERRNO (25),
00063 #define       ENOTTY          _HURD_ERRNO (25)/* Inappropriate ioctl for device */
00064        ETXTBSY         = _HURD_ERRNO (26),
00065 #define       ETXTBSY         _HURD_ERRNO (26)/* Text file busy */
00066        EFBIG           = _HURD_ERRNO (27),
00067 #define       EFBIG           _HURD_ERRNO (27)/* File too large */
00068        ENOSPC          = _HURD_ERRNO (28),
00069 #define       ENOSPC          _HURD_ERRNO (28)/* No space left on device */
00070        ESPIPE          = _HURD_ERRNO (29),
00071 #define       ESPIPE          _HURD_ERRNO (29)/* Illegal seek */
00072        EROFS           = _HURD_ERRNO (30),
00073 #define       EROFS           _HURD_ERRNO (30)/* Read-only file system */
00074        EMLINK          = _HURD_ERRNO (31),
00075 #define       EMLINK          _HURD_ERRNO (31)/* Too many links */
00076        EPIPE           = _HURD_ERRNO (32),
00077 #define       EPIPE           _HURD_ERRNO (32)/* Broken pipe */
00078        EDOM            = _HURD_ERRNO (33),
00079 #define       EDOM            _HURD_ERRNO (33)/* Numerical argument out of domain */
00080        ERANGE          = _HURD_ERRNO (34),
00081 #define       ERANGE          _HURD_ERRNO (34)/* Numerical result out of range */
00082        EAGAIN          = _HURD_ERRNO (35),
00083 #define       EAGAIN          _HURD_ERRNO (35)/* Resource temporarily unavailable */
00084 #define EWOULDBLOCK EAGAIN /* Operation would block */
00085        EINPROGRESS     = _HURD_ERRNO (36),
00086 #define       EINPROGRESS     _HURD_ERRNO (36)/* Operation now in progress */
00087        EALREADY        = _HURD_ERRNO (37),
00088 #define       EALREADY        _HURD_ERRNO (37)/* Operation already in progress */
00089        ENOTSOCK        = _HURD_ERRNO (38),
00090 #define       ENOTSOCK        _HURD_ERRNO (38)/* Socket operation on non-socket */
00091        EMSGSIZE        = _HURD_ERRNO (40),
00092 #define       EMSGSIZE        _HURD_ERRNO (40)/* Message too long */
00093        EPROTOTYPE      = _HURD_ERRNO (41),
00094 #define       EPROTOTYPE      _HURD_ERRNO (41)/* Protocol wrong type for socket */
00095        ENOPROTOOPT     = _HURD_ERRNO (42),
00096 #define       ENOPROTOOPT     _HURD_ERRNO (42)/* Protocol not available */
00097        EPROTONOSUPPORT = _HURD_ERRNO (43),
00098 #define       EPROTONOSUPPORT _HURD_ERRNO (43)/* Protocol not supported */
00099        ESOCKTNOSUPPORT = _HURD_ERRNO (44),
00100 #define       ESOCKTNOSUPPORT _HURD_ERRNO (44)/* Socket type not supported */
00101        EOPNOTSUPP      = _HURD_ERRNO (45),
00102 #define       EOPNOTSUPP      _HURD_ERRNO (45)/* Operation not supported */
00103        EPFNOSUPPORT    = _HURD_ERRNO (46),
00104 #define       EPFNOSUPPORT    _HURD_ERRNO (46)/* Protocol family not supported */
00105        EAFNOSUPPORT    = _HURD_ERRNO (47),
00106 #define       EAFNOSUPPORT    _HURD_ERRNO (47)/* Address family not supported by protocol */
00107        EADDRINUSE      = _HURD_ERRNO (48),
00108 #define       EADDRINUSE      _HURD_ERRNO (48)/* Address already in use */
00109        EADDRNOTAVAIL   = _HURD_ERRNO (49),
00110 #define       EADDRNOTAVAIL   _HURD_ERRNO (49)/* Cannot assign requested address */
00111        ENETDOWN        = _HURD_ERRNO (50),
00112 #define       ENETDOWN        _HURD_ERRNO (50)/* Network is down */
00113        ENETUNREACH     = _HURD_ERRNO (51),
00114 #define       ENETUNREACH     _HURD_ERRNO (51)/* Network is unreachable */
00115        ENETRESET       = _HURD_ERRNO (52),
00116 #define       ENETRESET       _HURD_ERRNO (52)/* Network dropped connection on reset */
00117        ECONNABORTED    = _HURD_ERRNO (53),
00118 #define       ECONNABORTED    _HURD_ERRNO (53)/* Software caused connection abort */
00119        ECONNRESET      = _HURD_ERRNO (54),
00120 #define       ECONNRESET      _HURD_ERRNO (54)/* Connection reset by peer */
00121        ENOBUFS         = _HURD_ERRNO (55),
00122 #define       ENOBUFS         _HURD_ERRNO (55)/* No buffer space available */
00123        EISCONN         = _HURD_ERRNO (56),
00124 #define       EISCONN         _HURD_ERRNO (56)/* Transport endpoint is already connected */
00125        ENOTCONN        = _HURD_ERRNO (57),
00126 #define       ENOTCONN        _HURD_ERRNO (57)/* Transport endpoint is not connected */
00127        EDESTADDRREQ    = _HURD_ERRNO (39),
00128 #define       EDESTADDRREQ    _HURD_ERRNO (39)/* Destination address required */
00129        ESHUTDOWN       = _HURD_ERRNO (58),
00130 #define       ESHUTDOWN       _HURD_ERRNO (58)/* Cannot send after transport endpoint shutdown */
00131        ETOOMANYREFS    = _HURD_ERRNO (59),
00132 #define       ETOOMANYREFS    _HURD_ERRNO (59)/* Too many references: cannot splice */
00133        ETIMEDOUT       = _HURD_ERRNO (60),
00134 #define       ETIMEDOUT       _HURD_ERRNO (60)/* Connection timed out */
00135        ECONNREFUSED    = _HURD_ERRNO (61),
00136 #define       ECONNREFUSED    _HURD_ERRNO (61)/* Connection refused */
00137        ELOOP           = _HURD_ERRNO (62),
00138 #define       ELOOP           _HURD_ERRNO (62)/* Too many levels of symbolic links */
00139        ENAMETOOLONG    = _HURD_ERRNO (63),
00140 #define       ENAMETOOLONG    _HURD_ERRNO (63)/* File name too long */
00141        EHOSTDOWN       = _HURD_ERRNO (64),
00142 #define       EHOSTDOWN       _HURD_ERRNO (64)/* Host is down */
00143        EHOSTUNREACH    = _HURD_ERRNO (65),
00144 #define       EHOSTUNREACH    _HURD_ERRNO (65)/* No route to host */
00145        ENOTEMPTY       = _HURD_ERRNO (66),
00146 #define       ENOTEMPTY       _HURD_ERRNO (66)/* Directory not empty */
00147        EPROCLIM        = _HURD_ERRNO (67),
00148 #define       EPROCLIM        _HURD_ERRNO (67)/* Too many processes */
00149        EUSERS          = _HURD_ERRNO (68),
00150 #define       EUSERS          _HURD_ERRNO (68)/* Too many users */
00151        EDQUOT          = _HURD_ERRNO (69),
00152 #define       EDQUOT          _HURD_ERRNO (69)/* Disk quota exceeded */
00153        ESTALE          = _HURD_ERRNO (70),
00154 #define       ESTALE          _HURD_ERRNO (70)/* Stale NFS file handle */
00155        EREMOTE         = _HURD_ERRNO (71),
00156 #define       EREMOTE         _HURD_ERRNO (71)/* Object is remote */
00157        EBADRPC         = _HURD_ERRNO (72),
00158 #define       EBADRPC         _HURD_ERRNO (72)/* RPC struct is bad */
00159        ERPCMISMATCH    = _HURD_ERRNO (73),
00160 #define       ERPCMISMATCH    _HURD_ERRNO (73)/* RPC version wrong */
00161        EPROGUNAVAIL    = _HURD_ERRNO (74),
00162 #define       EPROGUNAVAIL    _HURD_ERRNO (74)/* RPC program not available */
00163        EPROGMISMATCH   = _HURD_ERRNO (75),
00164 #define       EPROGMISMATCH   _HURD_ERRNO (75)/* RPC program version wrong */
00165        EPROCUNAVAIL    = _HURD_ERRNO (76),
00166 #define       EPROCUNAVAIL    _HURD_ERRNO (76)/* RPC bad procedure for program */
00167        ENOLCK          = _HURD_ERRNO (77),
00168 #define       ENOLCK          _HURD_ERRNO (77)/* No locks available */
00169        EFTYPE          = _HURD_ERRNO (79),
00170 #define       EFTYPE          _HURD_ERRNO (79)/* Inappropriate file type or format */
00171        EAUTH           = _HURD_ERRNO (80),
00172 #define       EAUTH           _HURD_ERRNO (80)/* Authentication error */
00173        ENEEDAUTH       = _HURD_ERRNO (81),
00174 #define       ENEEDAUTH       _HURD_ERRNO (81)/* Need authenticator */
00175        ENOSYS          = _HURD_ERRNO (78),
00176 #define       ENOSYS          _HURD_ERRNO (78)/* Function not implemented */
00177        ENOTSUP         = _HURD_ERRNO (118),
00178 #define       ENOTSUP         _HURD_ERRNO (118)/* Not supported */
00179        EILSEQ          = _HURD_ERRNO (106),
00180 #define       EILSEQ          _HURD_ERRNO (106)/* Invalid or incomplete multibyte or wide character */
00181        EBACKGROUND     = _HURD_ERRNO (100),
00182 #define       EBACKGROUND     _HURD_ERRNO (100)/* Inappropriate operation for background process */
00183        EDIED           = _HURD_ERRNO (101),
00184 #define       EDIED           _HURD_ERRNO (101)/* Translator died */
00185        ED              = _HURD_ERRNO (102),
00186 #define       ED              _HURD_ERRNO (102)/* ? */
00187        EGREGIOUS       = _HURD_ERRNO (103),
00188 #define       EGREGIOUS       _HURD_ERRNO (103)/* You really blew it this time */
00189        EIEIO           = _HURD_ERRNO (104),
00190 #define       EIEIO           _HURD_ERRNO (104)/* Computer bought the farm */
00191        EGRATUITOUS     = _HURD_ERRNO (105),
00192 #define       EGRATUITOUS     _HURD_ERRNO (105)/* Gratuitous error */
00193        EBADMSG         = _HURD_ERRNO (107),
00194 #define       EBADMSG         _HURD_ERRNO (107)/* Bad message */
00195        EIDRM           = _HURD_ERRNO (108),
00196 #define       EIDRM           _HURD_ERRNO (108)/* Identifier removed */
00197        EMULTIHOP       = _HURD_ERRNO (109),
00198 #define       EMULTIHOP       _HURD_ERRNO (109)/* Multihop attempted */
00199        ENODATA         = _HURD_ERRNO (110),
00200 #define       ENODATA         _HURD_ERRNO (110)/* No data available */
00201        ENOLINK         = _HURD_ERRNO (111),
00202 #define       ENOLINK         _HURD_ERRNO (111)/* Link has been severed */
00203        ENOMSG          = _HURD_ERRNO (112),
00204 #define       ENOMSG          _HURD_ERRNO (112)/* No message of desired type */
00205        ENOSR           = _HURD_ERRNO (113),
00206 #define       ENOSR           _HURD_ERRNO (113)/* Out of streams resources */
00207        ENOSTR          = _HURD_ERRNO (114),
00208 #define       ENOSTR          _HURD_ERRNO (114)/* Device not a stream */
00209        EOVERFLOW       = _HURD_ERRNO (115),
00210 #define       EOVERFLOW       _HURD_ERRNO (115)/* Value too large for defined data type */
00211        EPROTO          = _HURD_ERRNO (116),
00212 #define       EPROTO          _HURD_ERRNO (116)/* Protocol error */
00213        ETIME           = _HURD_ERRNO (117),
00214 #define       ETIME           _HURD_ERRNO (117)/* Timer expired */
00215        ECANCELED       = _HURD_ERRNO (118),
00216 #define       ECANCELED       _HURD_ERRNO (118)/* Operation canceled */
00217 
00218        /* Errors from <mach/message.h>.  */
00219        EMACH_SEND_IN_PROGRESS          = 0x10000001,
00220        EMACH_SEND_INVALID_DATA         = 0x10000002,
00221        EMACH_SEND_INVALID_DEST         = 0x10000003,
00222        EMACH_SEND_TIMED_OUT            = 0x10000004,
00223        EMACH_SEND_WILL_NOTIFY          = 0x10000005,
00224        EMACH_SEND_NOTIFY_IN_PROGRESS   = 0x10000006,
00225        EMACH_SEND_INTERRUPTED          = 0x10000007,
00226        EMACH_SEND_MSG_TOO_SMALL        = 0x10000008,
00227        EMACH_SEND_INVALID_REPLY        = 0x10000009,
00228        EMACH_SEND_INVALID_RIGHT        = 0x1000000a,
00229        EMACH_SEND_INVALID_NOTIFY       = 0x1000000b,
00230        EMACH_SEND_INVALID_MEMORY       = 0x1000000c,
00231        EMACH_SEND_NO_BUFFER            = 0x1000000d,
00232        EMACH_SEND_NO_NOTIFY            = 0x1000000e,
00233        EMACH_SEND_INVALID_TYPE         = 0x1000000f,
00234        EMACH_SEND_INVALID_HEADER       = 0x10000010,
00235        EMACH_RCV_IN_PROGRESS           = 0x10004001,
00236        EMACH_RCV_INVALID_NAME          = 0x10004002,
00237        EMACH_RCV_TIMED_OUT             = 0x10004003,
00238        EMACH_RCV_TOO_LARGE             = 0x10004004,
00239        EMACH_RCV_INTERRUPTED           = 0x10004005,
00240        EMACH_RCV_PORT_CHANGED          = 0x10004006,
00241        EMACH_RCV_INVALID_NOTIFY        = 0x10004007,
00242        EMACH_RCV_INVALID_DATA          = 0x10004008,
00243        EMACH_RCV_PORT_DIED             = 0x10004009,
00244        EMACH_RCV_IN_SET                = 0x1000400a,
00245        EMACH_RCV_HEADER_ERROR          = 0x1000400b,
00246        EMACH_RCV_BODY_ERROR            = 0x1000400c,
00247 
00248        /* Errors from <mach/kern_return.h>.  */
00249        EKERN_INVALID_ADDRESS           = 1,
00250        EKERN_PROTECTION_FAILURE        = 2,
00251        EKERN_NO_SPACE                  = 3,
00252        EKERN_INVALID_ARGUMENT          = 4,
00253        EKERN_FAILURE                   = 5,
00254        EKERN_RESOURCE_SHORTAGE         = 6,
00255        EKERN_NOT_RECEIVER              = 7,
00256        EKERN_NO_ACCESS                 = 8,
00257        EKERN_MEMORY_FAILURE            = 9,
00258        EKERN_MEMORY_ERROR              = 10,
00259        EKERN_NOT_IN_SET                = 12,
00260        EKERN_NAME_EXISTS               = 13,
00261        EKERN_ABORTED                   = 14,
00262        EKERN_INVALID_NAME              = 15,
00263        EKERN_INVALID_TASK              = 16,
00264        EKERN_INVALID_RIGHT             = 17,
00265        EKERN_INVALID_VALUE             = 18,
00266        EKERN_UREFS_OVERFLOW            = 19,
00267        EKERN_INVALID_CAPABILITY        = 20,
00268        EKERN_RIGHT_EXISTS              = 21,
00269        EKERN_INVALID_HOST              = 22,
00270        EKERN_MEMORY_PRESENT            = 23,
00271        EKERN_WRITE_PROTECTION_FAILURE  = 24,
00272        EKERN_TERMINATED                = 26,
00273 
00274        /* Errors from <mach/mig_errors.h>.  */
00275        EMIG_TYPE_ERROR         = -300  /* client type check failure */,
00276        EMIG_REPLY_MISMATCH     = -301  /* wrong reply message ID */,
00277        EMIG_REMOTE_ERROR       = -302  /* server detected error */,
00278        EMIG_BAD_ID             = -303  /* bad request message ID */,
00279        EMIG_BAD_ARGUMENTS      = -304  /* server type check failure */,
00280        EMIG_NO_REPLY           = -305  /* no reply should be sent */,
00281        EMIG_EXCEPTION          = -306  /* server raised exception */,
00282        EMIG_ARRAY_TOO_LARGE    = -307  /* array not large enough */,
00283        EMIG_SERVER_DIED        = -308  /* server died */,
00284        EMIG_DESTROY_REQUEST    = -309  /* destroy request with no reply */,
00285 
00286        /* Errors from <device/device_types.h>.  */
00287        ED_IO_ERROR             = 2500  /* hardware IO error */,
00288        ED_WOULD_BLOCK          = 2501  /* would block, but D_NOWAIT set */,
00289        ED_NO_SUCH_DEVICE       = 2502  /* no such device */,
00290        ED_ALREADY_OPEN         = 2503  /* exclusive-use device already open */,
00291        ED_DEVICE_DOWN          = 2504  /* device has been shut down */,
00292        ED_INVALID_OPERATION    = 2505  /* bad operation for device */,
00293        ED_INVALID_RECNUM       = 2506  /* invalid record (block) number */,
00294        ED_INVALID_SIZE         = 2507  /* invalid IO size */,
00295        ED_NO_MEMORY            = 2508  /* memory allocation failure */,
00296        ED_READ_ONLY            = 2509  /* device cannot be written to */
00297 
00298 };
00299 
00300 #define       _HURD_ERRNOS  119
00301 
00302 /* User-visible type of error codes.  It is ok to use `int' or
00303    `kern_return_t' for these, but with `error_t' the debugger prints
00304    symbolic values.  */
00305 #ifdef __USE_GNU
00306 typedef enum __error_t_codes error_t;
00307 #define __error_t_defined   1
00308 #endif
00309 
00310 /* Return the current thread's location for `errno'.
00311    The syntax of this function allows redeclarations like `int errno'.  */
00312 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
00313 
00314 #define errno               (*__errno_location ())
00315 
00316 #endif /* <errno.h> included.  */
00317 
00318 #if !defined (_ERRNO_H) && defined (__need_Emath)
00319 #define       EDOM            _HURD_ERRNO (33)/* Numerical argument out of domain */
00320 #define       ERANGE          _HURD_ERRNO (34)/* Numerical result out of range */
00321 #endif /* <errno.h> not included and need math error codes.  */