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