00001 /* string.h stdc header 00002 Copyright (C) 2000, 2003 Free Software Foundation, Inc. 00003 Written by Stephane Carrez (stcarrez@nerim.fr) 00004 00005 This file is free software; you can redistribute it and/or modify it 00006 under the terms of the GNU General Public License as published by the 00007 Free Software Foundation; either version 2, or (at your option) any 00008 later version. 00009 00010 In addition to the permissions in the GNU General Public License, the 00011 Free Software Foundation gives you unlimited permission to link the 00012 compiled version of this file with other programs, and to distribute 00013 those programs without any restriction coming from the use of this 00014 file. (The General Public License restrictions do apply in other 00015 respects; for example, they cover modification of the file, and 00016 distribution when not linked into another program.) 00017 00018 This file is distributed in the hope that it will be useful, but 00019 WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 General Public License for more details. 00022 00023 You should have received a copy of the GNU General Public License 00024 along with this program; see the file COPYING. If not, write to 00025 the Free Software Foundation, 59 Temple Place - Suite 330, 00026 Boston, MA 02111-1307, USA. */ 00027 00028 #ifndef _ERRNO_H 00029 #define _ERRNO_H 00030 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 #define EPERM 1 /* Operation not permitted */ 00037 #define ENOENT 2 /* No such file or directory */ 00038 #define ESRCH 3 /* No such process */ 00039 #define EINTR 4 /* Interrupted system call */ 00040 #define EIO 5 /* Input/output error */ 00041 #define ENXIO 6 /* Device not configured */ 00042 #define E2BIG 7 /* Argument list too long */ 00043 #define ENOEXEC 8 /* Exec format error */ 00044 #define EBADF 9 /* Bad file descriptor */ 00045 #define ECHILD 10 /* No child processes */ 00046 #define EDEADLK 11 /* Resource deadlock avoided */ 00047 /* 11 was EAGAIN */ 00048 #define ENOMEM 12 /* Cannot allocate memory */ 00049 #define EACCES 13 /* Permission denied */ 00050 #define EFAULT 14 /* Bad address */ 00051 #ifndef _POSIX_SOURCE 00052 #define ENOTBLK 15 /* Block device required */ 00053 #endif 00054 #define EBUSY 16 /* Device busy */ 00055 #define EEXIST 17 /* File exists */ 00056 #define EXDEV 18 /* Cross-device link */ 00057 #define ENODEV 19 /* Operation not supported by device */ 00058 #define ENOTDIR 20 /* Not a directory */ 00059 #define EISDIR 21 /* Is a directory */ 00060 #define EINVAL 22 /* Invalid argument */ 00061 #define ENFILE 23 /* Too many open files in system */ 00062 #define EMFILE 24 /* Too many open files */ 00063 #define ENOTTY 25 /* Inappropriate ioctl for device */ 00064 #ifndef _POSIX_SOURCE 00065 #define ETXTBSY 26 /* Text file busy */ 00066 #endif 00067 #define EFBIG 27 /* File too large */ 00068 #define ENOSPC 28 /* No space left on device */ 00069 #define ESPIPE 29 /* Illegal seek */ 00070 #define EROFS 30 /* Read-only filesystem */ 00071 #define EMLINK 31 /* Too many links */ 00072 #define EPIPE 32 /* Broken pipe */ 00073 00074 /* math software */ 00075 #define EDOM 33 /* Numerical argument out of domain */ 00076 #define ERANGE 34 /* Result too large */ 00077 00078 /* non-blocking and interrupt i/o */ 00079 #define EAGAIN 35 /* Resource temporarily unavailable */ 00080 #ifndef _POSIX_SOURCE 00081 #define EWOULDBLOCK EAGAIN /* Operation would block */ 00082 #define EINPROGRESS 36 /* Operation now in progress */ 00083 #define EALREADY 37 /* Operation already in progress */ 00084 00085 /* ipc/network software -- argument errors */ 00086 #define ENOTSOCK 38 /* Socket operation on non-socket */ 00087 #define EDESTADDRREQ 39 /* Destination address required */ 00088 #define EMSGSIZE 40 /* Message too long */ 00089 #define EPROTOTYPE 41 /* Protocol wrong type for socket */ 00090 #define ENOPROTOOPT 42 /* Protocol not available */ 00091 #define EPROTONOSUPPORT 43 /* Protocol not supported */ 00092 #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ 00093 #define EOPNOTSUPP 45 /* Operation not supported */ 00094 #define ENOTSUP EOPNOTSUPP /* Operation not supported */ 00095 #define EPFNOSUPPORT 46 /* Protocol family not supported */ 00096 #define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ 00097 #define EADDRINUSE 48 /* Address already in use */ 00098 #define EADDRNOTAVAIL 49 /* Can't assign requested address */ 00099 00100 /* ipc/network software -- operational errors */ 00101 #define ENETDOWN 50 /* Network is down */ 00102 #define ENETUNREACH 51 /* Network is unreachable */ 00103 #define ENETRESET 52 /* Network dropped connection on reset */ 00104 #define ECONNABORTED 53 /* Software caused connection abort */ 00105 #define ECONNRESET 54 /* Connection reset by peer */ 00106 #define ENOBUFS 55 /* No buffer space available */ 00107 #define EISCONN 56 /* Socket is already connected */ 00108 #define ENOTCONN 57 /* Socket is not connected */ 00109 #define ESHUTDOWN 58 /* Can't send after socket shutdown */ 00110 #define ETOOMANYREFS 59 /* Too many references: can't splice */ 00111 #define ETIMEDOUT 60 /* Operation timed out */ 00112 #define ECONNREFUSED 61 /* Connection refused */ 00113 00114 #define ELOOP 62 /* Too many levels of symbolic links */ 00115 #endif /* _POSIX_SOURCE */ 00116 #define ENAMETOOLONG 63 /* File name too long */ 00117 00118 /* should be rearranged */ 00119 #ifndef _POSIX_SOURCE 00120 #define EHOSTDOWN 64 /* Host is down */ 00121 #define EHOSTUNREACH 65 /* No route to host */ 00122 #endif /* _POSIX_SOURCE */ 00123 #define ENOTEMPTY 66 /* Directory not empty */ 00124 00125 /* quotas & mush */ 00126 #ifndef _POSIX_SOURCE 00127 #define EPROCLIM 67 /* Too many processes */ 00128 #define EUSERS 68 /* Too many users */ 00129 #define EDQUOT 69 /* Disc quota exceeded */ 00130 00131 /* Network File System */ 00132 #define ESTALE 70 /* Stale NFS file handle */ 00133 #define EREMOTE 71 /* Too many levels of remote in path */ 00134 #define EBADRPC 72 /* RPC struct is bad */ 00135 #define ERPCMISMATCH 73 /* RPC version wrong */ 00136 #define EPROGUNAVAIL 74 /* RPC prog. not avail */ 00137 #define EPROGMISMATCH 75 /* Program version wrong */ 00138 #define EPROCUNAVAIL 76 /* Bad procedure for program */ 00139 #endif /* _POSIX_SOURCE */ 00140 00141 #define ENOLCK 77 /* No locks available */ 00142 #define ENOSYS 78 /* Function not implemented */ 00143 00144 #ifndef _POSIX_SOURCE 00145 #define EFTYPE 79 /* Inappropriate file type or format */ 00146 #define EAUTH 80 /* Authentication error */ 00147 #define ENEEDAUTH 81 /* Need authenticator */ 00148 #define EIDRM 82 /* Identifier removed */ 00149 #define ENOMSG 83 /* No message of desired type */ 00150 #define EOVERFLOW 84 /* Value too large to be stored in data type */ 00151 #define ECANCELED 85 /* Operation canceled */ 00152 #define EILSEQ 86 /* Illegal byte sequence */ 00153 #define ENOATTR 87 /* Attribute not found */ 00154 00155 #define EDOOFUS 88 /* Programming error */ 00156 00157 #define ELAST 88 /* Must be equal largest errno */ 00158 00159 #endif /* _POSIX_SOURCE */ 00160 00161 #ifdef _KERNEL 00162 /* pseudo-errors returned inside kernel to modify return to process */ 00163 #define ERESTART (-1) /* restart syscall */ 00164 #define EJUSTRETURN (-2) /* don't modify regs, just return */ 00165 #define ENOIOCTL (-3) /* ioctl not handled by this layer */ 00166 #define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ 00167 #endif 00168 00169 extern int errno; 00170 00171 #ifdef __cplusplus 00172 } 00173 #endif 00174 00175 #endif