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