Back to index

glibc  2.9
errno.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1982, 1986, 1989, 1993
00003  *     The Regents of the University of California.  All rights reserved.
00004  * (c) UNIX System Laboratories, Inc.
00005  * All or some portions of this file are derived from material licensed
00006  * to the University of California by American Telephone and Telegraph
00007  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
00008  * the permission of UNIX System Laboratories, Inc.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  * 4. Neither the name of the University nor the names of its contributors
00019  *    may be used to endorse or promote products derived from this software
00020  *    without specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00023  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00026  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00028  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00029  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00030  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00031  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00032  * SUCH DAMAGE.
00033  *
00034  *     @(#)errno.h   8.5 (Berkeley) 1/21/94
00035  */
00036 
00037 #ifdef _ERRNO_H
00038 
00039 #define       EPERM         1             /* Operation not permitted */
00040 #define       ENOENT        2             /* No such file or directory */
00041 #define       ESRCH         3             /* No such process */
00042 #define       EINTR         4             /* Interrupted system call */
00043 #define       EIO           5             /* Input/output error */
00044 #define       ENXIO         6             /* Device not configured */
00045 #define       E2BIG         7             /* Argument list too long */
00046 #define       ENOEXEC              8             /* Exec format error */
00047 #define       EBADF         9             /* Bad file descriptor */
00048 #define       ECHILD        10            /* No child processes */
00049 #define       EDEADLK              11            /* Resource deadlock avoided */
00050                                    /* 11 was EAGAIN */
00051 #define       ENOMEM        12            /* Cannot allocate memory */
00052 #define       EACCES        13            /* Permission denied */
00053 #define       EFAULT        14            /* Bad address */
00054 #ifdef __USE_BSD
00055 #define       ENOTBLK              15            /* Block device required */
00056 #endif
00057 #define       EBUSY         16            /* Device busy */
00058 #define       EEXIST        17            /* File exists */
00059 #define       EXDEV         18            /* Cross-device link */
00060 #define       ENODEV        19            /* Operation not supported by device */
00061 #define       ENOTDIR              20            /* Not a directory */
00062 #define       EISDIR        21            /* Is a directory */
00063 #define       EINVAL        22            /* Invalid argument */
00064 #define       ENFILE        23            /* Too many open files in system */
00065 #define       EMFILE        24            /* Too many open files */
00066 #define       ENOTTY        25            /* Inappropriate ioctl for device */
00067 #ifdef __USE_BSD
00068 #define       ETXTBSY              26            /* Text file busy */
00069 #endif
00070 #define       EFBIG         27            /* File too large */
00071 #define       ENOSPC        28            /* No space left on device */
00072 #define       ESPIPE        29            /* Illegal seek */
00073 #define       EROFS         30            /* Read-only file system */
00074 #define       EMLINK        31            /* Too many links */
00075 #define       EPIPE         32            /* Broken pipe */
00076 
00077 #endif /* <errno.h> included.  */
00078 
00079 /* math software */
00080 
00081 #if !defined(__Emath_defined) &&  (defined(_ERRNO_H) || defined(__need_Emath))
00082 #define       EDOM          33            /* Numerical argument out of domain */
00083 #endif /* Emath not defined and <errno.h> included or need Emath.  */
00084 #if !defined(__Emath_defined) &&  (defined(_ERRNO_H) || defined(__need_Emath))
00085 #define       ERANGE        34            /* Result too large */
00086 #endif /* Emath not defined and <errno.h> included or need Emath.  */
00087 
00088 #ifdef _ERRNO_H
00089 
00090 /* non-blocking and interrupt i/o */
00091 #define       EAGAIN        35            /* Resource temporarily unavailable */
00092 #ifdef __USE_BSD
00093 #define       EWOULDBLOCK   EAGAIN        /* Operation would block */
00094 #define       EINPROGRESS   36            /* Operation now in progress */
00095 #define       EALREADY      37            /* Operation already in progress */
00096 
00097 /* ipc/network software -- argument errors */
00098 #define       ENOTSOCK      38            /* Socket operation on non-socket */
00099 #define       EDESTADDRREQ  39            /* Destination address required */
00100 #define       EMSGSIZE      40            /* Message too long */
00101 #define       EPROTOTYPE    41            /* Protocol wrong type for socket */
00102 #define       ENOPROTOOPT   42            /* Protocol not available */
00103 #define       EPROTONOSUPPORT      43            /* Protocol not supported */
00104 #define       ESOCKTNOSUPPORT      44            /* Socket type not supported */
00105 #define       EOPNOTSUPP    45            /* Operation not supported */
00106 #define       EPFNOSUPPORT  46            /* Protocol family not supported */
00107 #define       EAFNOSUPPORT  47            /* Address family not supported by protocol family */
00108 #define       EADDRINUSE    48            /* Address already in use */
00109 #define       EADDRNOTAVAIL 49            /* Can't assign requested address */
00110 
00111 /* ipc/network software -- operational errors */
00112 #define       ENETDOWN      50            /* Network is down */
00113 #define       ENETUNREACH   51            /* Network is unreachable */
00114 #define       ENETRESET     52            /* Network dropped connection on reset */
00115 #define       ECONNABORTED  53            /* Software caused connection abort */
00116 #define       ECONNRESET    54            /* Connection reset by peer */
00117 #define       ENOBUFS              55            /* No buffer space available */
00118 #define       EISCONN              56            /* Socket is already connected */
00119 #define       ENOTCONN      57            /* Socket is not connected */
00120 #define       ESHUTDOWN     58            /* Can't send after socket shutdown */
00121 #define       ETOOMANYREFS  59            /* Too many references: can't splice */
00122 #define       ETIMEDOUT     60            /* Operation timed out */
00123 #define       ECONNREFUSED  61            /* Connection refused */
00124 
00125 #define       ELOOP         62            /* Too many levels of symbolic links */
00126 #endif /* __USE_BSD */
00127 #define       ENAMETOOLONG  63            /* File name too long */
00128 
00129 /* should be rearranged */
00130 #ifdef __USE_BSD
00131 #define       EHOSTDOWN     64            /* Host is down */
00132 #define       EHOSTUNREACH  65            /* No route to host */
00133 #endif /* __USE_BSD */
00134 #define       ENOTEMPTY     66            /* Directory not empty */
00135 
00136 /* quotas & mush */
00137 #ifdef __USE_BSD
00138 #define       EPROCLIM      67            /* Too many processes */
00139 #define       EUSERS        68            /* Too many users */
00140 #define       EDQUOT        69            /* Disc quota exceeded */
00141 
00142 /* Network File System */
00143 #define       ESTALE        70            /* Stale NFS file handle */
00144 #define       EREMOTE              71            /* Too many levels of remote in path */
00145 #define       EBADRPC              72            /* RPC struct is bad */
00146 #define       ERPCMISMATCH  73            /* RPC version wrong */
00147 #define       EPROGUNAVAIL  74            /* RPC prog. not avail */
00148 #define       EPROGMISMATCH 75            /* Program version wrong */
00149 #define       EPROCUNAVAIL  76            /* Bad procedure for program */
00150 #endif /* __USE_BSD */
00151 
00152 #define       ENOLCK        77            /* No locks available */
00153 #define       ENOSYS        78            /* Function not implemented */
00154 
00155 #define       EFTYPE        79            /* Inappropriate file type or format */
00156 
00157 #ifdef __USE_BSD
00158 #define       EAUTH         80            /* Authentication error */
00159 #define       ENEEDAUTH     81            /* Need authenticator */
00160 #define       ELAST         81            /* Must be equal largest errno */
00161 #endif /* __USE_BSD */
00162 
00163 
00164 #endif /* <errno.h> included.  */