1.1 --- a/epoc32/include/stdapis/errno.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/errno.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,211 @@
1.4 -errno.h
1.5 +/*-
1.6 + * © Portions copyright (c) 2005 Nokia Corporation. All rights reserved.
1.7 + * Copyright (c) 1982, 1986, 1989, 1993
1.8 + * The Regents of the University of California. All rights reserved.
1.9 + * (c) UNIX System Laboratories, Inc.
1.10 + * All or some portions of this file are derived from material licensed
1.11 + * to the University of California by American Telephone and Telegraph
1.12 + * Co. or Unix System Laboratories, Inc. and are reproduced herein with
1.13 + * the permission of UNIX System Laboratories, Inc.
1.14 + *
1.15 + * Redistribution and use in source and binary forms, with or without
1.16 + * modification, are permitted provided that the following conditions
1.17 + * are met:
1.18 + * 1. Redistributions of source code must retain the above copyright
1.19 + * notice, this list of conditions and the following disclaimer.
1.20 + * 2. Redistributions in binary form must reproduce the above copyright
1.21 + * notice, this list of conditions and the following disclaimer in the
1.22 + * documentation and/or other materials provided with the distribution.
1.23 + * 4. Neither the name of the University nor the names of its contributors
1.24 + * may be used to endorse or promote products derived from this software
1.25 + * without specific prior written permission.
1.26 + *
1.27 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1.28 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1.29 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1.30 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1.31 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1.32 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1.33 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1.34 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1.35 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1.36 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1.37 + * SUCH DAMAGE.
1.38 + *
1.39 + * @(#)errno.h 8.5 (Berkeley) 1/21/94
1.40 + * $FreeBSD: src/sys/sys/errno.h,v 1.28 2005/04/02 12:33:28 das Exp $
1.41 + */
1.42 +
1.43 +#ifndef _ERRNO_H_
1.44 +#define _ERRNO_H_
1.45 +
1.46 +#ifndef _KERNEL
1.47 +#include <sys/cdefs.h>
1.48 +#ifndef __SYMBIAN32__
1.49 +#include "reent.h"
1.50 +#endif //__SYMBIAN32__
1.51 +__BEGIN_DECLS
1.52 +#ifdef __SYMBIAN32__
1.53 +IMPORT_C int *__errno(void);
1.54 +#endif //__SYMBIAN32__
1.55 +
1.56 +__END_DECLS
1.57 +#ifndef __SYMBIAN32__
1.58 +#define errno (* __error())
1.59 +#else //__SYMBIAN32__
1.60 +#define errno (*__errno())
1.61 +#endif //__SYMBIAN32__
1.62 +
1.63 +#endif
1.64 +
1.65 +#define EPERM 1 /* Operation not permitted */
1.66 +#define ENOENT 2 /* No such file or directory */
1.67 +#define ESRCH 3 /* No such process */
1.68 +#define EINTR 4 /* Interrupted system call */
1.69 +#define EIO 5 /* Input/output error */
1.70 +#define ENXIO 6 /* Device not configured */
1.71 +#define E2BIG 7 /* Argument list too long */
1.72 +#define ENOEXEC 8 /* Exec format error */
1.73 +#define EBADF 9 /* Bad file descriptor */
1.74 +#define ECHILD 10 /* No child processes */
1.75 +#define EDEADLK 11 /* Resource deadlock avoided */
1.76 + /* 11 was EAGAIN */
1.77 +#define ENOMEM 12 /* Cannot allocate memory */
1.78 +#define EACCES 13 /* Permission denied */
1.79 +#define EFAULT 14 /* Bad address */
1.80 +#ifndef _POSIX_SOURCE
1.81 +#define ENOTBLK 15 /* Block device required */
1.82 +#endif //_POSIX_SOURCE
1.83 +#define EBUSY 16 /* Device busy */
1.84 +#define EEXIST 17 /* File exists */
1.85 +#define EXDEV 18 /* Cross-device link */
1.86 +#define ENODEV 19 /* Operation not supported by device */
1.87 +#define ENOTDIR 20 /* Not a directory */
1.88 +#define EISDIR 21 /* Is a directory */
1.89 +#define EINVAL 22 /* Invalid argument */
1.90 +#define ENFILE 23 /* Too many open files in system */
1.91 +#define EMFILE 24 /* Too many open files */
1.92 +#define ENOTTY 25 /* Inappropriate ioctl for device */
1.93 +#ifndef _POSIX_SOURCE
1.94 +#define ETXTBSY 26 /* Text file busy */
1.95 +#endif //_POSIX_SOURCE
1.96 +#define EFBIG 27 /* File too large */
1.97 +#define ENOSPC 28 /* No space left on device */
1.98 +#define ESPIPE 29 /* Illegal seek */
1.99 +#define EROFS 30 /* Read-only filesystem */
1.100 +#define EMLINK 31 /* Too many links */
1.101 +#define EPIPE 32 /* Broken pipe */
1.102 +
1.103 +/* math software */
1.104 +#define EDOM 33 /* Numerical argument out of domain */
1.105 +#define ERANGE 34 /* Result too large */
1.106 +
1.107 +/* non-blocking and interrupt i/o */
1.108 +#define EAGAIN 35 /* Resource temporarily unavailable */
1.109 +#ifndef _POSIX_SOURCE
1.110 +#define EWOULDBLOCK EAGAIN /* Operation would block */
1.111 +#define EINPROGRESS 36 /* Operation now in progress */
1.112 +#define EALREADY 37 /* Operation already in progress */
1.113 +
1.114 +/* ipc/network software -- argument errors */
1.115 +#define ENOTSOCK 38 /* Socket operation on non-socket */
1.116 +#define EDESTADDRREQ 39 /* Destination address required */
1.117 +#define EMSGSIZE 40 /* Message too long */
1.118 +#define EPROTOTYPE 41 /* Protocol wrong type for socket */
1.119 +#define ENOPROTOOPT 42 /* Protocol not available */
1.120 +#define EPROTONOSUPPORT 43 /* Protocol not supported */
1.121 +#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
1.122 +#define EOPNOTSUPP 45 /* Operation not supported */
1.123 +#define ENOTSUP EOPNOTSUPP /* Operation not supported */
1.124 +#define EPFNOSUPPORT 46 /* Protocol family not supported */
1.125 +#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
1.126 +#define EADDRINUSE 48 /* Address already in use */
1.127 +#define EADDRNOTAVAIL 49 /* Can't assign requested address */
1.128 +
1.129 +/* ipc/network software -- operational errors */
1.130 +#define ENETDOWN 50 /* Network is down */
1.131 +#define ENETUNREACH 51 /* Network is unreachable */
1.132 +#define ENETRESET 52 /* Network dropped connection on reset */
1.133 +#define ECONNABORTED 53 /* Software caused connection abort */
1.134 +#define ECONNRESET 54 /* Connection reset by peer */
1.135 +#define ENOBUFS 55 /* No buffer space available */
1.136 +#define EISCONN 56 /* Socket is already connected */
1.137 +#define ENOTCONN 57 /* Socket is not connected */
1.138 +#define ESHUTDOWN 58 /* Can't send after socket shutdown */
1.139 +#define ETOOMANYREFS 59 /* Too many references: can't splice */
1.140 +#define ETIMEDOUT 60 /* Operation timed out */
1.141 +#define ECONNREFUSED 61 /* Connection refused */
1.142 +
1.143 +#define ELOOP 62 /* Too many levels of symbolic links */
1.144 +#endif /* _POSIX_SOURCE */
1.145 +#define ENAMETOOLONG 63 /* File name too long */
1.146 +
1.147 +/* should be rearranged */
1.148 +#ifndef _POSIX_SOURCE
1.149 +#define EHOSTDOWN 64 /* Host is down */
1.150 +#define EHOSTUNREACH 65 /* No route to host */
1.151 +#endif /* _POSIX_SOURCE */
1.152 +#define ENOTEMPTY 66 /* Directory not empty */
1.153 +
1.154 +/* quotas & mush */
1.155 +#ifndef _POSIX_SOURCE
1.156 +#define EPROCLIM 67 /* Too many processes */
1.157 +#define EUSERS 68 /* Too many users */
1.158 +#define EDQUOT 69 /* Disc quota exceeded */
1.159 +
1.160 +/* Network File System */
1.161 +#define ESTALE 70 /* Stale NFS file handle */
1.162 +#define EREMOTE 71 /* Too many levels of remote in path */
1.163 +#define EBADRPC 72 /* RPC struct is bad */
1.164 +#define ERPCMISMATCH 73 /* RPC version wrong */
1.165 +#define EPROGUNAVAIL 74 /* RPC prog. not avail */
1.166 +#define EPROGMISMATCH 75 /* Program version wrong */
1.167 +#define EPROCUNAVAIL 76 /* Bad procedure for program */
1.168 +#endif /* _POSIX_SOURCE */
1.169 +
1.170 +#define ENOLCK 77 /* No locks available */
1.171 +#define ENOSYS 78 /* Function not implemented */
1.172 +
1.173 +#ifndef _POSIX_SOURCE
1.174 +#define EFTYPE 79 /* Inappropriate file type or format */
1.175 +#define EAUTH 80 /* Authentication error */
1.176 +#define ENEEDAUTH 81 /* Need authenticator */
1.177 +#define EIDRM 82 /* Identifier removed */
1.178 +#define ENOMSG 83 /* No message of desired type */
1.179 +#define EOVERFLOW 84 /* Value too large to be stored in data type */
1.180 +#define ECANCELED 85 /* Operation canceled */
1.181 +#define EILSEQ 86 /* Illegal byte sequence */
1.182 +#define ENOATTR 87 /* Attribute not found */
1.183 +
1.184 +#define EDOOFUS 88 /* Programming error */
1.185 +#endif /* _POSIX_SOURCE */
1.186 +
1.187 +#define EBADMSG 89 /* Bad message */
1.188 +#define EMULTIHOP 90 /* Multihop attempted */
1.189 +#define ENOLINK 91 /* Link has been severed */
1.190 +#define EPROTO 92 /* Protocol error */
1.191 +
1.192 +
1.193 +#ifdef _KERNEL
1.194 +/* pseudo-errors returned inside kernel to modify return to process */
1.195 +#define ERESTART (-1) /* restart syscall */
1.196 +#define EJUSTRETURN (-2) /* don't modify regs, just return */
1.197 +#define ENOIOCTL (-3) /* ioctl not handled by this layer */
1.198 +#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */
1.199 +#endif
1.200 +
1.201 +#ifdef __SYMBIAN32__
1.202 +#define ECOMM 123 /* Communication error on send */
1.203 +#define __EMAXERRNO 124
1.204 +#endif // __SYMBIAN32__
1.205 +
1.206 +
1.207 +#ifndef _POSIX_SOURCE
1.208 +#ifndef __SYMBIAN32__
1.209 +#define ELAST 92
1.210 +#else
1.211 +#define ELAST __EMAXERRNO /* Must be equal to largest errno */
1.212 +#endif //__SYMBIAN32__
1.213 +#endif /* _POSIX_SOURCE */
1.214 +
1.215 +#endif // _ERRNO_H_