williamr@2: /*- williamr@2: * © Portions copyright (c) 2005 Nokia Corporation. All rights reserved. williamr@2: * Copyright (c) 1982, 1986, 1989, 1993 williamr@2: * The Regents of the University of California. All rights reserved. williamr@2: * (c) UNIX System Laboratories, Inc. williamr@2: * All or some portions of this file are derived from material licensed williamr@2: * to the University of California by American Telephone and Telegraph williamr@2: * Co. or Unix System Laboratories, Inc. and are reproduced herein with williamr@2: * the permission of UNIX System Laboratories, Inc. williamr@2: * williamr@2: * Redistribution and use in source and binary forms, with or without williamr@2: * modification, are permitted provided that the following conditions williamr@2: * are met: williamr@2: * 1. Redistributions of source code must retain the above copyright williamr@2: * notice, this list of conditions and the following disclaimer. williamr@2: * 2. Redistributions in binary form must reproduce the above copyright williamr@2: * notice, this list of conditions and the following disclaimer in the williamr@2: * documentation and/or other materials provided with the distribution. williamr@2: * 4. Neither the name of the University nor the names of its contributors williamr@2: * may be used to endorse or promote products derived from this software williamr@2: * without specific prior written permission. williamr@2: * williamr@2: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND williamr@2: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE williamr@2: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE williamr@2: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE williamr@2: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL williamr@2: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS williamr@2: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) williamr@2: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT williamr@2: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY williamr@2: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF williamr@2: * SUCH DAMAGE. williamr@2: * williamr@2: * @(#)errno.h 8.5 (Berkeley) 1/21/94 williamr@2: * $FreeBSD: src/sys/sys/errno.h,v 1.28 2005/04/02 12:33:28 das Exp $ williamr@2: */ williamr@2: williamr@2: #ifndef _ERRNO_H_ williamr@2: #define _ERRNO_H_ williamr@2: williamr@2: #ifndef _KERNEL williamr@2: #include williamr@2: #ifndef __SYMBIAN32__ williamr@2: #include "reent.h" williamr@2: #endif //__SYMBIAN32__ williamr@2: __BEGIN_DECLS williamr@2: #ifdef __SYMBIAN32__ williamr@2: IMPORT_C int *__errno(void); williamr@2: #endif //__SYMBIAN32__ williamr@2: williamr@2: __END_DECLS williamr@2: #ifndef __SYMBIAN32__ williamr@2: #define errno (* __error()) williamr@2: #else //__SYMBIAN32__ williamr@2: #define errno (*__errno()) williamr@2: #endif //__SYMBIAN32__ williamr@2: williamr@2: #endif williamr@2: williamr@2: #define EPERM 1 /* Operation not permitted */ williamr@2: #define ENOENT 2 /* No such file or directory */ williamr@2: #define ESRCH 3 /* No such process */ williamr@2: #define EINTR 4 /* Interrupted system call */ williamr@2: #define EIO 5 /* Input/output error */ williamr@2: #define ENXIO 6 /* Device not configured */ williamr@2: #define E2BIG 7 /* Argument list too long */ williamr@2: #define ENOEXEC 8 /* Exec format error */ williamr@2: #define EBADF 9 /* Bad file descriptor */ williamr@2: #define ECHILD 10 /* No child processes */ williamr@2: #define EDEADLK 11 /* Resource deadlock avoided */ williamr@2: /* 11 was EAGAIN */ williamr@2: #define ENOMEM 12 /* Cannot allocate memory */ williamr@2: #define EACCES 13 /* Permission denied */ williamr@2: #define EFAULT 14 /* Bad address */ williamr@2: #ifndef _POSIX_SOURCE williamr@2: #define ENOTBLK 15 /* Block device required */ williamr@2: #endif //_POSIX_SOURCE williamr@2: #define EBUSY 16 /* Device busy */ williamr@2: #define EEXIST 17 /* File exists */ williamr@2: #define EXDEV 18 /* Cross-device link */ williamr@2: #define ENODEV 19 /* Operation not supported by device */ williamr@2: #define ENOTDIR 20 /* Not a directory */ williamr@2: #define EISDIR 21 /* Is a directory */ williamr@2: #define EINVAL 22 /* Invalid argument */ williamr@2: #define ENFILE 23 /* Too many open files in system */ williamr@2: #define EMFILE 24 /* Too many open files */ williamr@2: #define ENOTTY 25 /* Inappropriate ioctl for device */ williamr@2: #ifndef _POSIX_SOURCE williamr@2: #define ETXTBSY 26 /* Text file busy */ williamr@2: #endif //_POSIX_SOURCE williamr@2: #define EFBIG 27 /* File too large */ williamr@2: #define ENOSPC 28 /* No space left on device */ williamr@2: #define ESPIPE 29 /* Illegal seek */ williamr@2: #define EROFS 30 /* Read-only filesystem */ williamr@2: #define EMLINK 31 /* Too many links */ williamr@2: #define EPIPE 32 /* Broken pipe */ williamr@2: williamr@2: /* math software */ williamr@2: #define EDOM 33 /* Numerical argument out of domain */ williamr@2: #define ERANGE 34 /* Result too large */ williamr@2: williamr@2: /* non-blocking and interrupt i/o */ williamr@2: #define EAGAIN 35 /* Resource temporarily unavailable */ williamr@2: #ifndef _POSIX_SOURCE williamr@2: #define EWOULDBLOCK EAGAIN /* Operation would block */ williamr@2: #define EINPROGRESS 36 /* Operation now in progress */ williamr@2: #define EALREADY 37 /* Operation already in progress */ williamr@2: williamr@2: /* ipc/network software -- argument errors */ williamr@2: #define ENOTSOCK 38 /* Socket operation on non-socket */ williamr@2: #define EDESTADDRREQ 39 /* Destination address required */ williamr@2: #define EMSGSIZE 40 /* Message too long */ williamr@2: #define EPROTOTYPE 41 /* Protocol wrong type for socket */ williamr@2: #define ENOPROTOOPT 42 /* Protocol not available */ williamr@2: #define EPROTONOSUPPORT 43 /* Protocol not supported */ williamr@2: #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ williamr@2: #define EOPNOTSUPP 45 /* Operation not supported */ williamr@2: #define ENOTSUP EOPNOTSUPP /* Operation not supported */ williamr@2: #define EPFNOSUPPORT 46 /* Protocol family not supported */ williamr@2: #define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ williamr@2: #define EADDRINUSE 48 /* Address already in use */ williamr@2: #define EADDRNOTAVAIL 49 /* Can't assign requested address */ williamr@2: williamr@2: /* ipc/network software -- operational errors */ williamr@2: #define ENETDOWN 50 /* Network is down */ williamr@2: #define ENETUNREACH 51 /* Network is unreachable */ williamr@2: #define ENETRESET 52 /* Network dropped connection on reset */ williamr@2: #define ECONNABORTED 53 /* Software caused connection abort */ williamr@2: #define ECONNRESET 54 /* Connection reset by peer */ williamr@2: #define ENOBUFS 55 /* No buffer space available */ williamr@2: #define EISCONN 56 /* Socket is already connected */ williamr@2: #define ENOTCONN 57 /* Socket is not connected */ williamr@2: #define ESHUTDOWN 58 /* Can't send after socket shutdown */ williamr@2: #define ETOOMANYREFS 59 /* Too many references: can't splice */ williamr@2: #define ETIMEDOUT 60 /* Operation timed out */ williamr@2: #define ECONNREFUSED 61 /* Connection refused */ williamr@2: williamr@2: #define ELOOP 62 /* Too many levels of symbolic links */ williamr@2: #endif /* _POSIX_SOURCE */ williamr@2: #define ENAMETOOLONG 63 /* File name too long */ williamr@2: williamr@2: /* should be rearranged */ williamr@2: #ifndef _POSIX_SOURCE williamr@2: #define EHOSTDOWN 64 /* Host is down */ williamr@2: #define EHOSTUNREACH 65 /* No route to host */ williamr@2: #endif /* _POSIX_SOURCE */ williamr@2: #define ENOTEMPTY 66 /* Directory not empty */ williamr@2: williamr@2: /* quotas & mush */ williamr@2: #ifndef _POSIX_SOURCE williamr@2: #define EPROCLIM 67 /* Too many processes */ williamr@2: #define EUSERS 68 /* Too many users */ williamr@2: #define EDQUOT 69 /* Disc quota exceeded */ williamr@2: williamr@2: /* Network File System */ williamr@2: #define ESTALE 70 /* Stale NFS file handle */ williamr@2: #define EREMOTE 71 /* Too many levels of remote in path */ williamr@2: #define EBADRPC 72 /* RPC struct is bad */ williamr@2: #define ERPCMISMATCH 73 /* RPC version wrong */ williamr@2: #define EPROGUNAVAIL 74 /* RPC prog. not avail */ williamr@2: #define EPROGMISMATCH 75 /* Program version wrong */ williamr@2: #define EPROCUNAVAIL 76 /* Bad procedure for program */ williamr@2: #endif /* _POSIX_SOURCE */ williamr@2: williamr@2: #define ENOLCK 77 /* No locks available */ williamr@2: #define ENOSYS 78 /* Function not implemented */ williamr@2: williamr@2: #ifndef _POSIX_SOURCE williamr@2: #define EFTYPE 79 /* Inappropriate file type or format */ williamr@2: #define EAUTH 80 /* Authentication error */ williamr@2: #define ENEEDAUTH 81 /* Need authenticator */ williamr@2: #define EIDRM 82 /* Identifier removed */ williamr@2: #define ENOMSG 83 /* No message of desired type */ williamr@2: #define EOVERFLOW 84 /* Value too large to be stored in data type */ williamr@2: #define ECANCELED 85 /* Operation canceled */ williamr@2: #define EILSEQ 86 /* Illegal byte sequence */ williamr@2: #define ENOATTR 87 /* Attribute not found */ williamr@2: williamr@2: #define EDOOFUS 88 /* Programming error */ williamr@2: #endif /* _POSIX_SOURCE */ williamr@2: williamr@2: #define EBADMSG 89 /* Bad message */ williamr@2: #define EMULTIHOP 90 /* Multihop attempted */ williamr@2: #define ENOLINK 91 /* Link has been severed */ williamr@2: #define EPROTO 92 /* Protocol error */ williamr@2: williamr@2: williamr@2: #ifdef _KERNEL williamr@2: /* pseudo-errors returned inside kernel to modify return to process */ williamr@2: #define ERESTART (-1) /* restart syscall */ williamr@2: #define EJUSTRETURN (-2) /* don't modify regs, just return */ williamr@2: #define ENOIOCTL (-3) /* ioctl not handled by this layer */ williamr@2: #define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ williamr@2: #endif williamr@2: williamr@2: #ifdef __SYMBIAN32__ williamr@2: #define ECOMM 123 /* Communication error on send */ williamr@2: #define __EMAXERRNO 124 williamr@2: #endif // __SYMBIAN32__ williamr@2: williamr@2: williamr@2: #ifndef _POSIX_SOURCE williamr@2: #ifndef __SYMBIAN32__ williamr@2: #define ELAST 92 williamr@2: #else williamr@2: #define ELAST __EMAXERRNO /* Must be equal to largest errno */ williamr@2: #endif //__SYMBIAN32__ williamr@2: #endif /* _POSIX_SOURCE */ williamr@2: williamr@2: #endif // _ERRNO_H_