Annotation of parser3/src/lib/sdbm/apr-include/apr_errno.h, revision 1.4
1.2 paf 1: /* ====================================================================
2: * The Apache Software License, Version 1.1
3: *
4: * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
5: * reserved.
6: *
7: * Redistribution and use in source and binary forms, with or without
8: * modification, are permitted provided that the following conditions
9: * are met:
10: *
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: *
14: * 2. Redistributions in binary form must reproduce the above copyright
15: * notice, this list of conditions and the following disclaimer in
16: * the documentation and/or other materials provided with the
17: * distribution.
18: *
19: * 3. The end-user documentation included with the redistribution,
20: * if any, must include the following acknowledgment:
21: * "This product includes software developed by the
22: * Apache Software Foundation (http://www.apache.org/)."
23: * Alternately, this acknowledgment may appear in the software itself,
24: * if and wherever such third-party acknowledgments normally appear.
25: *
26: * 4. The names "Apache" and "Apache Software Foundation" must
27: * not be used to endorse or promote products derived from this
28: * software without prior written permission. For written
29: * permission, please contact apache@apache.org.
30: *
31: * 5. Products derived from this software may not be called "Apache",
32: * nor may "Apache" appear in their name, without prior written
33: * permission of the Apache Software Foundation.
34: *
35: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38: * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46: * SUCH DAMAGE.
47: * ====================================================================
48: *
49: * This software consists of voluntary contributions made by many
50: * individuals on behalf of the Apache Software Foundation. For more
51: * information on the Apache Software Foundation, please see
52: * <http://www.apache.org/>.
53: */
54:
55: #ifndef APR_ERRNO_H
56: #define APR_ERRNO_H
57:
58: #include "apr.h"
59:
60: #if APR_HAVE_ERRNO_H
61: #include <errno.h>
62: #endif
63:
64: #ifdef __cplusplus
65: extern "C" {
66: #endif /* __cplusplus */
67:
68: /**
69: * @file apr_errno.h
70: * @brief APR Error Codes
71: */
72: /**
73: * @defgroup APR_Error_Codes Error Codes
74: * @ingroup APR
75: * @{
76: */
77:
78: /**
79: * Type for specifying an error or status code.
80: */
81: typedef int apr_status_t;
82:
83: /**
84: * APR_OS_START_ERROR is where the APR specific error values start.
85: */
86: #define APR_OS_START_ERROR 20000
87: /**
88: * APR_OS_ERRSPACE_SIZE is the maximum number of errors you can fit
89: * into one of the error/status ranges below -- except for
90: * APR_OS_START_USERERR, which see.
91: */
92: #define APR_OS_ERRSPACE_SIZE 50000
93: /**
94: * APR_OS_START_STATUS is where the APR specific status codes start.
95: */
96: #define APR_OS_START_STATUS (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)
97: /**
98: * APR_OS_START_USERERR are reserved for applications that use APR that
99: * layer their own error codes along with APR's. Note that the
100: * error immediately following this one is set ten times farther
101: * away than usual, so that users of apr have a lot of room in
102: * which to declare custom error codes.
103: */
104: #define APR_OS_START_USERERR (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE)
105: /**
106: * APR_OS_START_USEERR is obsolete, defined for compatibility only.
107: * Use APR_OS_START_USERERR instead.
108: */
109: #define APR_OS_START_USEERR APR_OS_START_USERERR
110: /**
111: * APR_OS_START_CANONERR is where APR versions of errno values are defined
112: * on systems which don't have the corresponding errno.
113: */
114: #define APR_OS_START_CANONERR (APR_OS_START_USERERR \
115: + (APR_OS_ERRSPACE_SIZE * 10))
116: /**
117: * APR_OS_START_EAIERR folds EAI_ error codes from getaddrinfo() into
118: * apr_status_t values.
119: */
120: #define APR_OS_START_EAIERR (APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE)
121: /**
122: * APR_OS_START_SYSERR folds platform-specific system error values into
123: * apr_status_t values.
124: */
125: #define APR_OS_START_SYSERR (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE)
126:
127: /** no error. @see APR_STATUS_IS_SUCCESS */
128: #define APR_SUCCESS 0
129:
130: /* APR ERROR VALUES */
131: /**
132: * @defgroup APRErrorValues Error Values
133: * <PRE>
134: * <b>APR ERROR VALUES</b>
135: * APR_ENOSTAT APR was unable to perform a stat on the file
136: * APR_ENOPOOL APR was not provided a pool with which to allocate memory
137: * APR_EBADDATE APR was given an invalid date
138: * APR_EINVALSOCK APR was given an invalid socket
139: * APR_ENOPROC APR was not given a process structure
140: * APR_ENOTIME APR was not given a time structure
141: * APR_ENODIR APR was not given a directory structure
142: * APR_ENOLOCK APR was not given a lock structure
143: * APR_ENOPOLL APR was not given a poll structure
144: * APR_ENOSOCKET APR was not given a socket
145: * APR_ENOTHREAD APR was not given a thread structure
146: * APR_ENOTHDKEY APR was not given a thread key structure
147: * APR_ENOSHMAVAIL There is no more shared memory available
148: * APR_EDSOOPEN APR was unable to open the dso object. For more
149: * information call apr_dso_error().
150: * APR_EGENERAL General failure (specific information not available)
151: * APR_EBADIP The specified IP address is invalid
152: * APR_EBADMASK The specified netmask is invalid
153: * </PRE>
154: *
155: * <PRE>
156: * <b>APR STATUS VALUES</b>
157: * APR_INCHILD Program is currently executing in the child
158: * APR_INPARENT Program is currently executing in the parent
159: * APR_DETACH The thread is detached
160: * APR_NOTDETACH The thread is not detached
161: * APR_CHILD_DONE The child has finished executing
162: * APR_CHILD_NOTDONE The child has not finished executing
163: * APR_TIMEUP The operation did not finish before the timeout
164: * APR_INCOMPLETE The operation was incomplete although some processing
165: * was performed and the results are partially valid
166: * APR_BADCH Getopt found an option not in the option string
167: * APR_BADARG Getopt found an option that is missing an argument
168: * and an argument was specified in the option string
169: * APR_EOF APR has encountered the end of the file
170: * APR_NOTFOUND APR was unable to find the socket in the poll structure
171: * APR_ANONYMOUS APR is using anonymous shared memory
172: * APR_FILEBASED APR is using a file name as the key to the shared memory
173: * APR_KEYBASED APR is using a shared key as the key to the shared memory
174: * APR_EINIT Ininitalizer value. If no option has been found, but
175: * the status variable requires a value, this should be used
176: * APR_ENOTIMPL The APR function has not been implemented on this
177: * platform, either because nobody has gotten to it yet,
178: * or the function is impossible on this platform.
179: * APR_EMISMATCH Two passwords do not match.
180: * APR_EABSOLUTE The given path was absolute.
181: * APR_ERELATIVE The given path was relative.
182: * APR_EINCOMPLETE The given path was neither relative nor absolute.
183: * APR_EABOVEROOT The given path was above the root path.
184: * APR_EBUSY The given lock was busy.
185: * </PRE>
186: * @{
187: */
188: /** @see APR_STATUS_IS_ENOSTAT */
189: #define APR_ENOSTAT (APR_OS_START_ERROR + 1)
190: /** @see APR_STATUS_IS_ENOPOOL */
191: #define APR_ENOPOOL (APR_OS_START_ERROR + 2)
192: /* empty slot: +3 */
193: /** @see APR_STATUS_IS_EBADDATE */
194: #define APR_EBADDATE (APR_OS_START_ERROR + 4)
195: /** @see APR_STATUS_IS_EINVALSOCK */
196: #define APR_EINVALSOCK (APR_OS_START_ERROR + 5)
197: /** @see APR_STATUS_IS_ENOPROC */
198: #define APR_ENOPROC (APR_OS_START_ERROR + 6)
199: /** @see APR_STATUS_IS_ENOTIME */
200: #define APR_ENOTIME (APR_OS_START_ERROR + 7)
201: /** @see APR_STATUS_IS_ENODIR */
202: #define APR_ENODIR (APR_OS_START_ERROR + 8)
203: /** @see APR_STATUS_IS_ENOLOCK */
204: #define APR_ENOLOCK (APR_OS_START_ERROR + 9)
205: /** @see APR_STATUS_IS_ENOPOLL */
206: #define APR_ENOPOLL (APR_OS_START_ERROR + 10)
207: /** @see APR_STATUS_IS_ENOSOCKET */
208: #define APR_ENOSOCKET (APR_OS_START_ERROR + 11)
209: /** @see APR_STATUS_IS_ENOTHREAD */
210: #define APR_ENOTHREAD (APR_OS_START_ERROR + 12)
211: /** @see APR_STATUS_IS_ENOTHDKEY */
212: #define APR_ENOTHDKEY (APR_OS_START_ERROR + 13)
213: /** @see APR_STATUS_IS_EGENERAL */
214: #define APR_EGENERAL (APR_OS_START_ERROR + 14)
215: /** @see APR_STATUS_IS_ENOSHMAVAIL */
216: #define APR_ENOSHMAVAIL (APR_OS_START_ERROR + 15)
217: /** @see APR_STATUS_IS_EBADIP */
218: #define APR_EBADIP (APR_OS_START_ERROR + 16)
219: /** @see APR_STATUS_IS_EBADMASK */
220: #define APR_EBADMASK (APR_OS_START_ERROR + 17)
221: /* empty slot: +18 */
222: /** @see APR_STATUS_IS_EDSOPEN */
223: #define APR_EDSOOPEN (APR_OS_START_ERROR + 19)
224: /** @see APR_STATUS_IS_EABSOLUTE */
225: #define APR_EABSOLUTE (APR_OS_START_ERROR + 20)
226: /** @see APR_STATUS_IS_ERELATIVE */
227: #define APR_ERELATIVE (APR_OS_START_ERROR + 21)
228: /** @see APR_STATUS_IS_EINCOMPLETE */
229: #define APR_EINCOMPLETE (APR_OS_START_ERROR + 22)
230: /** @see APR_STATUS_IS_EABOVEROOT */
231: #define APR_EABOVEROOT (APR_OS_START_ERROR + 23)
232: /** @see APR_STATUS_IS_EBADPATH */
233: #define APR_EBADPATH (APR_OS_START_ERROR + 24)
234:
235: /* APR STATUS VALUES */
236: /** @see APR_STATUS_IS_INCHILD */
237: #define APR_INCHILD (APR_OS_START_STATUS + 1)
238: /** @see APR_STATUS_IS_INPARENT */
239: #define APR_INPARENT (APR_OS_START_STATUS + 2)
240: /** @see APR_STATUS_IS_DETACH */
241: #define APR_DETACH (APR_OS_START_STATUS + 3)
242: /** @see APR_STATUS_IS_NOTDETACH */
243: #define APR_NOTDETACH (APR_OS_START_STATUS + 4)
244: /** @see APR_STATUS_IS_CHILD_DONE */
245: #define APR_CHILD_DONE (APR_OS_START_STATUS + 5)
246: /** @see APR_STATUS_IS_CHILD_NOTDONE */
247: #define APR_CHILD_NOTDONE (APR_OS_START_STATUS + 6)
248: /** @see APR_STATUS_IS_TIMEUP */
249: #define APR_TIMEUP (APR_OS_START_STATUS + 7)
250: /** @see APR_STATUS_IS_INCOMPLETE */
251: #define APR_INCOMPLETE (APR_OS_START_STATUS + 8)
252: /* empty slot: +9 */
253: /* empty slot: +10 */
254: /* empty slot: +11 */
255: /** @see APR_STATUS_IS_BADCH */
256: #define APR_BADCH (APR_OS_START_STATUS + 12)
257: /** @see APR_STATUS_IS_BADARG */
258: #define APR_BADARG (APR_OS_START_STATUS + 13)
259: /** @see APR_STATUS_IS_EOF */
260: #define APR_EOF (APR_OS_START_STATUS + 14)
261: /** @see APR_STATUS_IS_NOTFOUND */
262: #define APR_NOTFOUND (APR_OS_START_STATUS + 15)
263: /* empty slot: +16 */
264: /* empty slot: +17 */
265: /* empty slot: +18 */
266: /** @see APR_STATUS_IS_ANONYMOUS */
267: #define APR_ANONYMOUS (APR_OS_START_STATUS + 19)
268: /** @see APR_STATUS_IS_FILEBASED */
269: #define APR_FILEBASED (APR_OS_START_STATUS + 20)
270: /** @see APR_STATUS_IS_KEYBASED */
271: #define APR_KEYBASED (APR_OS_START_STATUS + 21)
272: /** @see APR_STATUS_IS_EINIT */
273: #define APR_EINIT (APR_OS_START_STATUS + 22)
274: /** @see APR_STATUS_IS_ENOTIMPL */
275: #define APR_ENOTIMPL (APR_OS_START_STATUS + 23)
276: /** @see APR_STATUS_IS_EMISMATCH */
277: #define APR_EMISMATCH (APR_OS_START_STATUS + 24)
278: /** @see APR_STATUS_IS_EBUSY */
279: #define APR_EBUSY (APR_OS_START_STATUS + 25)
280:
281: /**
282: * @defgroup aprerrcanonical Canonical Errors
283: * @{
284: */
285: /* APR CANONICAL ERROR VALUES */
286: /** @see APR_STATUS_IS_EACCES */
287: #ifdef EACCES
288: #define APR_EACCES EACCES
289: #else
290: #define APR_EACCES (APR_OS_START_CANONERR + 1)
291: #endif
292:
293: /** @see APR_STATUS_IS_EXIST */
294: #ifdef EEXIST
295: #define APR_EEXIST EEXIST
296: #else
297: #define APR_EEXIST (APR_OS_START_CANONERR + 2)
298: #endif
299:
300: /** @see APR_STATUS_IS_ENAMETOOLONG */
301: #ifdef ENAMETOOLONG
302: #define APR_ENAMETOOLONG ENAMETOOLONG
303: #else
304: #define APR_ENAMETOOLONG (APR_OS_START_CANONERR + 3)
305: #endif
306:
307: /** @see APR_STATUS_IS_ENOENT */
308: #ifdef ENOENT
309: #define APR_ENOENT ENOENT
310: #else
311: #define APR_ENOENT (APR_OS_START_CANONERR + 4)
312: #endif
313:
314: /** @see APR_STATUS_IS_ENOTDIR */
315: #ifdef ENOTDIR
316: #define APR_ENOTDIR ENOTDIR
317: #else
318: #define APR_ENOTDIR (APR_OS_START_CANONERR + 5)
319: #endif
320:
321: /** @see APR_STATUS_IS_ENOSPC */
322: #ifdef ENOSPC
323: #define APR_ENOSPC ENOSPC
324: #else
325: #define APR_ENOSPC (APR_OS_START_CANONERR + 6)
326: #endif
327:
328: /** @see APR_STATUS_IS_ENOMEM */
329: #ifdef ENOMEM
330: #define APR_ENOMEM ENOMEM
331: #else
332: #define APR_ENOMEM (APR_OS_START_CANONERR + 7)
333: #endif
334:
335: /** @see APR_STATUS_IS_EMFILE */
336: #ifdef EMFILE
337: #define APR_EMFILE EMFILE
338: #else
339: #define APR_EMFILE (APR_OS_START_CANONERR + 8)
340: #endif
341:
342: /** @see APR_STATUS_IS_ENFILE */
343: #ifdef ENFILE
344: #define APR_ENFILE ENFILE
345: #else
346: #define APR_ENFILE (APR_OS_START_CANONERR + 9)
347: #endif
348:
349: /** @see APR_STATUS_IS_EBADF */
350: #ifdef EBADF
351: #define APR_EBADF EBADF
352: #else
353: #define APR_EBADF (APR_OS_START_CANONERR + 10)
354: #endif
355:
356: /** @see APR_STATUS_IS_EINVAL */
357: #ifdef EINVAL
358: #define APR_EINVAL EINVAL
359: #else
360: #define APR_EINVAL (APR_OS_START_CANONERR + 11)
361: #endif
362:
363: /** @see APR_STATUS_IS_ESPIPE */
364: #ifdef ESPIPE
365: #define APR_ESPIPE ESPIPE
366: #else
367: #define APR_ESPIPE (APR_OS_START_CANONERR + 12)
368: #endif
369:
370: /**
371: * @see APR_STATUS_IS_EAGAIN
372: * @warning use APR_STATUS_IS_EAGAIN instead of just testing this value
373: */
374: #ifdef EAGAIN
375: #define APR_EAGAIN EAGAIN
376: #elif defined(EWOULDBLOCK)
377: #define APR_EAGAIN EWOULDBLOCK
378: #else
379: #define APR_EAGAIN (APR_OS_START_CANONERR + 13)
380: #endif
381:
382: /** @see APR_STATUS_IS_EINTR */
383: #ifdef EINTR
384: #define APR_EINTR EINTR
385: #else
386: #define APR_EINTR (APR_OS_START_CANONERR + 14)
387: #endif
388:
389: /** @see APR_STATUS_IS_ENOTSOCK */
390: #ifdef ENOTSOCK
391: #define APR_ENOTSOCK ENOTSOCK
392: #else
393: #define APR_ENOTSOCK (APR_OS_START_CANONERR + 15)
394: #endif
395:
396: /** @see APR_STATUS_IS_ECONNREFUSED */
397: #ifdef ECONNREFUSED
398: #define APR_ECONNREFUSED ECONNREFUSED
399: #else
400: #define APR_ECONNREFUSED (APR_OS_START_CANONERR + 16)
401: #endif
402:
403: /** @see APR_STATUS_IS_EINPROGRESS */
404: #ifdef EINPROGRESS
405: #define APR_EINPROGRESS EINPROGRESS
406: #else
407: #define APR_EINPROGRESS (APR_OS_START_CANONERR + 17)
408: #endif
409:
410: /**
411: * @see APR_STATUS_IS_ECONNABORTED
412: * @warning use APR_STATUS_IS_ECONNABORTED instead of just testing this value
413: */
414:
415: #ifdef ECONNABORTED
416: #define APR_ECONNABORTED ECONNABORTED
417: #else
418: #define APR_ECONNABORTED (APR_OS_START_CANONERR + 18)
419: #endif
420:
421: /** @see APR_STATUS_IS_ECONNRESET */
422: #ifdef ECONNRESET
423: #define APR_ECONNRESET ECONNRESET
424: #else
425: #define APR_ECONNRESET (APR_OS_START_CANONERR + 19)
426: #endif
427:
428: /** @see APR_STATUS_IS_ETIMEDOUT */
429: #ifdef ETIMEDOUT
430: #define APR_ETIMEDOUT ETIMEDOUT
431: #else
432: #define APR_ETIMEDOUT (APR_OS_START_CANONERR + 20)
433: #endif
434:
435: /** @see APR_STATUS_IS_EHOSTUNREACH */
436: #ifdef EHOSTUNREACH
437: #define APR_EHOSTUNREACH EHOSTUNREACH
438: #else
439: #define APR_EHOSTUNREACH (APR_OS_START_CANONERR + 21)
440: #endif
441:
442: /** @see APR_STATUS_IS_ENETUNREACH */
443: #ifdef ENETUNREACH
444: #define APR_ENETUNREACH ENETUNREACH
445: #else
446: #define APR_ENETUNREACH (APR_OS_START_CANONERR + 22)
447: #endif
448:
449: /** @see APR_STATUS_IS_EFTYPE */
450: #ifdef EFTYPE
451: #define APR_EFTYPE EFTYPE
452: #else
453: #define APR_EFTYPE (APR_OS_START_CANONERR + 23)
454: #endif
455:
456: /** @see APR_STATUS_IS_EPIPE */
457: #ifdef EPIPE
458: #define APR_EPIPE EPIPE
459: #else
460: #define APR_EPIPE (APR_OS_START_CANONERR + 24)
461: #endif
462:
463: /** @see APR_STATUS_IS_EXDEV */
464: #ifdef EXDEV
465: #define APR_EXDEV EXDEV
466: #else
467: #define APR_EXDEV (APR_OS_START_CANONERR + 25)
468: #endif
469:
470: /** @see APR_STATUS_IS_ENOTEMPTY */
471: #ifdef ENOTEMPTY
472: #define APR_ENOTEMPTY ENOTEMPTY
473: #else
474: #define APR_ENOTEMPTY (APR_OS_START_CANONERR + 26)
475: #endif
476:
477: /** @} */
478:
479: #ifdef __cplusplus
480: }
481: #endif
482:
483: #endif /* ! APR_ERRNO_H */
E-mail: