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