Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

apr_errno.h

Go to the documentation of this file.
00001 /* Copyright 2000-2004 The Apache Software Foundation
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 
00016 #ifndef APR_ERRNO_H
00017 #define APR_ERRNO_H
00018 
00024 #include "apr.h"
00025 
00026 #if APR_HAVE_ERRNO_H
00027 #include <errno.h>
00028 #endif
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif /* __cplusplus */
00033 
00043 typedef int apr_status_t;
00044 
00051 APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf, 
00052                                  apr_size_t bufsize);
00053 
00054 #if defined(DOXYGEN)
00055 
00063 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
00064 
00074 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
00075 
00111 #endif /* defined(DOXYGEN) */
00112 
00116 #define APR_OS_START_ERROR     20000
00117 
00122 #define APR_OS_ERRSPACE_SIZE 50000
00123 
00126 #define APR_OS_START_STATUS    (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)
00127 
00134 #define APR_OS_START_USERERR    (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE)
00135 
00139 #define APR_OS_START_USEERR     APR_OS_START_USERERR
00140 
00144 #define APR_OS_START_CANONERR  (APR_OS_START_USERERR \
00145                                  + (APR_OS_ERRSPACE_SIZE * 10))
00146 
00150 #define APR_OS_START_EAIERR    (APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE)
00151 
00155 #define APR_OS_START_SYSERR    (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE)
00156 
00158 #define APR_SUCCESS 0
00159 
00220 #define APR_ENOSTAT        (APR_OS_START_ERROR + 1)
00221 
00222 #define APR_ENOPOOL        (APR_OS_START_ERROR + 2)
00223 /* empty slot: +3 */
00225 #define APR_EBADDATE       (APR_OS_START_ERROR + 4)
00226 
00227 #define APR_EINVALSOCK     (APR_OS_START_ERROR + 5)
00228 
00229 #define APR_ENOPROC        (APR_OS_START_ERROR + 6)
00230 
00231 #define APR_ENOTIME        (APR_OS_START_ERROR + 7)
00232 
00233 #define APR_ENODIR         (APR_OS_START_ERROR + 8)
00234 
00235 #define APR_ENOLOCK        (APR_OS_START_ERROR + 9)
00236 
00237 #define APR_ENOPOLL        (APR_OS_START_ERROR + 10)
00238 
00239 #define APR_ENOSOCKET      (APR_OS_START_ERROR + 11)
00240 
00241 #define APR_ENOTHREAD      (APR_OS_START_ERROR + 12)
00242 
00243 #define APR_ENOTHDKEY      (APR_OS_START_ERROR + 13)
00244 
00245 #define APR_EGENERAL       (APR_OS_START_ERROR + 14)
00246 
00247 #define APR_ENOSHMAVAIL    (APR_OS_START_ERROR + 15)
00248 
00249 #define APR_EBADIP         (APR_OS_START_ERROR + 16)
00250 
00251 #define APR_EBADMASK       (APR_OS_START_ERROR + 17)
00252 /* empty slot: +18 */
00254 #define APR_EDSOOPEN       (APR_OS_START_ERROR + 19)
00255 
00256 #define APR_EABSOLUTE      (APR_OS_START_ERROR + 20)
00257 
00258 #define APR_ERELATIVE      (APR_OS_START_ERROR + 21)
00259 
00260 #define APR_EINCOMPLETE    (APR_OS_START_ERROR + 22)
00261 
00262 #define APR_EABOVEROOT     (APR_OS_START_ERROR + 23)
00263 
00264 #define APR_EBADPATH       (APR_OS_START_ERROR + 24)
00265 
00266 #define APR_EPATHWILD      (APR_OS_START_ERROR + 25)
00267 
00268 #define APR_ESYMNOTFOUND   (APR_OS_START_ERROR + 26)
00269 
00270 #define APR_EPROC_UNKNOWN  (APR_OS_START_ERROR + 27)
00271 
00289 #define APR_STATUS_IS_ENOSTAT(s)        ((s) == APR_ENOSTAT)
00290 
00295 #define APR_STATUS_IS_ENOPOOL(s)        ((s) == APR_ENOPOOL)
00296 
00297 #define APR_STATUS_IS_EBADDATE(s)       ((s) == APR_EBADDATE)
00298 
00299 #define APR_STATUS_IS_EINVALSOCK(s)     ((s) == APR_EINVALSOCK)
00300 
00301 #define APR_STATUS_IS_ENOPROC(s)        ((s) == APR_ENOPROC)
00302 
00303 #define APR_STATUS_IS_ENOTIME(s)        ((s) == APR_ENOTIME)
00304 
00305 #define APR_STATUS_IS_ENODIR(s)         ((s) == APR_ENODIR)
00306 
00307 #define APR_STATUS_IS_ENOLOCK(s)        ((s) == APR_ENOLOCK)
00308 
00309 #define APR_STATUS_IS_ENOPOLL(s)        ((s) == APR_ENOPOLL)
00310 
00311 #define APR_STATUS_IS_ENOSOCKET(s)      ((s) == APR_ENOSOCKET)
00312 
00313 #define APR_STATUS_IS_ENOTHREAD(s)      ((s) == APR_ENOTHREAD)
00314 
00315 #define APR_STATUS_IS_ENOTHDKEY(s)      ((s) == APR_ENOTHDKEY)
00316 
00317 #define APR_STATUS_IS_EGENERAL(s)       ((s) == APR_EGENERAL)
00318 
00319 #define APR_STATUS_IS_ENOSHMAVAIL(s)    ((s) == APR_ENOSHMAVAIL)
00320 
00321 #define APR_STATUS_IS_EBADIP(s)         ((s) == APR_EBADIP)
00322 
00323 #define APR_STATUS_IS_EBADMASK(s)       ((s) == APR_EBADMASK)
00324 /* empty slot: +18 */
00329 #if defined(WIN32)
00330 #define APR_STATUS_IS_EDSOOPEN(s)       ((s) == APR_EDSOOPEN \
00331                        || APR_TO_OS_ERROR(s) == ERROR_MOD_NOT_FOUND)
00332 #else
00333 #define APR_STATUS_IS_EDSOOPEN(s)       ((s) == APR_EDSOOPEN)
00334 #endif
00335 
00336 #define APR_STATUS_IS_EABSOLUTE(s)      ((s) == APR_EABSOLUTE)
00337 
00338 #define APR_STATUS_IS_ERELATIVE(s)      ((s) == APR_ERELATIVE)
00339 
00340 #define APR_STATUS_IS_EINCOMPLETE(s)    ((s) == APR_EINCOMPLETE)
00341 
00342 #define APR_STATUS_IS_EABOVEROOT(s)     ((s) == APR_EABOVEROOT)
00343 
00344 #define APR_STATUS_IS_EBADPATH(s)       ((s) == APR_EBADPATH)
00345 
00346 #define APR_STATUS_IS_EPATHWILD(s)      ((s) == APR_EPATHWILD)
00347 
00350 #if defined(WIN32)
00351 #define APR_STATUS_IS_ESYMNOTFOUND(s)   ((s) == APR_ESYMNOTFOUND \
00352                        || APR_TO_OS_ERROR(s) == ERROR_PROC_NOT_FOUND)
00353 #else
00354 #define APR_STATUS_IS_ESYMNOTFOUND(s)   ((s) == APR_ESYMNOTFOUND)
00355 #endif
00356 
00357 #define APR_STATUS_IS_EPROC_UNKNOWN(s)  ((s) == APR_EPROC_UNKNOWN)
00358 
00366 #define APR_INCHILD        (APR_OS_START_STATUS + 1)
00367 
00368 #define APR_INPARENT       (APR_OS_START_STATUS + 2)
00369 
00370 #define APR_DETACH         (APR_OS_START_STATUS + 3)
00371 
00372 #define APR_NOTDETACH      (APR_OS_START_STATUS + 4)
00373 
00374 #define APR_CHILD_DONE     (APR_OS_START_STATUS + 5)
00375 
00376 #define APR_CHILD_NOTDONE  (APR_OS_START_STATUS + 6)
00377 
00378 #define APR_TIMEUP         (APR_OS_START_STATUS + 7)
00379 
00380 #define APR_INCOMPLETE     (APR_OS_START_STATUS + 8)
00381 /* empty slot: +9 */
00382 /* empty slot: +10 */
00383 /* empty slot: +11 */
00385 #define APR_BADCH          (APR_OS_START_STATUS + 12)
00386 
00387 #define APR_BADARG         (APR_OS_START_STATUS + 13)
00388 
00389 #define APR_EOF            (APR_OS_START_STATUS + 14)
00390 
00391 #define APR_NOTFOUND       (APR_OS_START_STATUS + 15)
00392 /* empty slot: +16 */
00393 /* empty slot: +17 */
00394 /* empty slot: +18 */
00396 #define APR_ANONYMOUS      (APR_OS_START_STATUS + 19)
00397 
00398 #define APR_FILEBASED      (APR_OS_START_STATUS + 20)
00399 
00400 #define APR_KEYBASED       (APR_OS_START_STATUS + 21)
00401 
00402 #define APR_EINIT          (APR_OS_START_STATUS + 22)  
00403 
00404 #define APR_ENOTIMPL       (APR_OS_START_STATUS + 23)
00405 
00406 #define APR_EMISMATCH      (APR_OS_START_STATUS + 24)
00407 
00408 #define APR_EBUSY          (APR_OS_START_STATUS + 25)
00409 
00420 #define APR_STATUS_IS_INCHILD(s)        ((s) == APR_INCHILD)
00421 
00427 #define APR_STATUS_IS_INPARENT(s)       ((s) == APR_INPARENT)
00428 
00434 #define APR_STATUS_IS_DETACH(s)         ((s) == APR_DETACH)
00435 
00441 #define APR_STATUS_IS_NOTDETACH(s)      ((s) == APR_NOTDETACH)
00442 
00448 #define APR_STATUS_IS_CHILD_DONE(s)     ((s) == APR_CHILD_DONE)
00449 
00455 #define APR_STATUS_IS_CHILD_NOTDONE(s)  ((s) == APR_CHILD_NOTDONE)
00456 
00462 #define APR_STATUS_IS_TIMEUP(s)         ((s) == APR_TIMEUP)
00463 
00470 #define APR_STATUS_IS_INCOMPLETE(s)     ((s) == APR_INCOMPLETE)
00471 /* empty slot: +9 */
00472 /* empty slot: +10 */
00473 /* empty slot: +11 */
00480 #define APR_STATUS_IS_BADCH(s)          ((s) == APR_BADCH)
00481 
00488 #define APR_STATUS_IS_BADARG(s)         ((s) == APR_BADARG)
00489 
00495 #define APR_STATUS_IS_EOF(s)            ((s) == APR_EOF)
00496 
00502 #define APR_STATUS_IS_NOTFOUND(s)       ((s) == APR_NOTFOUND)
00503 /* empty slot: +16 */
00504 /* empty slot: +17 */
00505 /* empty slot: +18 */
00512 #define APR_STATUS_IS_ANONYMOUS(s)      ((s) == APR_ANONYMOUS)
00513 
00519 #define APR_STATUS_IS_FILEBASED(s)      ((s) == APR_FILEBASED)
00520 
00526 #define APR_STATUS_IS_KEYBASED(s)       ((s) == APR_KEYBASED)
00527 
00534 #define APR_STATUS_IS_EINIT(s)          ((s) == APR_EINIT)
00535 
00543 #define APR_STATUS_IS_ENOTIMPL(s)       ((s) == APR_ENOTIMPL)
00544 
00550 #define APR_STATUS_IS_EMISMATCH(s)      ((s) == APR_EMISMATCH)
00551 
00556 #define APR_STATUS_IS_EBUSY(s)          ((s) == APR_EBUSY)
00557 
00564 /* APR CANONICAL ERROR VALUES */
00566 #ifdef EACCES
00567 #define APR_EACCES EACCES
00568 #else
00569 #define APR_EACCES         (APR_OS_START_CANONERR + 1)
00570 #endif
00571 
00573 #ifdef EEXIST
00574 #define APR_EEXIST EEXIST
00575 #else
00576 #define APR_EEXIST         (APR_OS_START_CANONERR + 2)
00577 #endif
00578 
00580 #ifdef ENAMETOOLONG
00581 #define APR_ENAMETOOLONG ENAMETOOLONG
00582 #else
00583 #define APR_ENAMETOOLONG   (APR_OS_START_CANONERR + 3)
00584 #endif
00585 
00587 #ifdef ENOENT
00588 #define APR_ENOENT ENOENT
00589 #else
00590 #define APR_ENOENT         (APR_OS_START_CANONERR + 4)
00591 #endif
00592 
00594 #ifdef ENOTDIR
00595 #define APR_ENOTDIR ENOTDIR
00596 #else
00597 #define APR_ENOTDIR        (APR_OS_START_CANONERR + 5)
00598 #endif
00599 
00601 #ifdef ENOSPC
00602 #define APR_ENOSPC ENOSPC
00603 #else
00604 #define APR_ENOSPC         (APR_OS_START_CANONERR + 6)
00605 #endif
00606 
00608 #ifdef ENOMEM
00609 #define APR_ENOMEM ENOMEM
00610 #else
00611 #define APR_ENOMEM         (APR_OS_START_CANONERR + 7)
00612 #endif
00613 
00615 #ifdef EMFILE
00616 #define APR_EMFILE EMFILE
00617 #else
00618 #define APR_EMFILE         (APR_OS_START_CANONERR + 8)
00619 #endif
00620 
00622 #ifdef ENFILE
00623 #define APR_ENFILE ENFILE
00624 #else
00625 #define APR_ENFILE         (APR_OS_START_CANONERR + 9)
00626 #endif
00627 
00629 #ifdef EBADF
00630 #define APR_EBADF EBADF
00631 #else
00632 #define APR_EBADF          (APR_OS_START_CANONERR + 10)
00633 #endif
00634 
00636 #ifdef EINVAL
00637 #define APR_EINVAL EINVAL
00638 #else
00639 #define APR_EINVAL         (APR_OS_START_CANONERR + 11)
00640 #endif
00641 
00643 #ifdef ESPIPE
00644 #define APR_ESPIPE ESPIPE
00645 #else
00646 #define APR_ESPIPE         (APR_OS_START_CANONERR + 12)
00647 #endif
00648 
00653 #ifdef EAGAIN
00654 #define APR_EAGAIN EAGAIN
00655 #elif defined(EWOULDBLOCK)
00656 #define APR_EAGAIN EWOULDBLOCK
00657 #else
00658 #define APR_EAGAIN         (APR_OS_START_CANONERR + 13)
00659 #endif
00660 
00662 #ifdef EINTR
00663 #define APR_EINTR EINTR
00664 #else
00665 #define APR_EINTR          (APR_OS_START_CANONERR + 14)
00666 #endif
00667 
00669 #ifdef ENOTSOCK
00670 #define APR_ENOTSOCK ENOTSOCK
00671 #else
00672 #define APR_ENOTSOCK       (APR_OS_START_CANONERR + 15)
00673 #endif
00674 
00676 #ifdef ECONNREFUSED
00677 #define APR_ECONNREFUSED ECONNREFUSED
00678 #else
00679 #define APR_ECONNREFUSED   (APR_OS_START_CANONERR + 16)
00680 #endif
00681 
00683 #ifdef EINPROGRESS
00684 #define APR_EINPROGRESS EINPROGRESS
00685 #else
00686 #define APR_EINPROGRESS    (APR_OS_START_CANONERR + 17)
00687 #endif
00688 
00694 #ifdef ECONNABORTED
00695 #define APR_ECONNABORTED ECONNABORTED
00696 #else
00697 #define APR_ECONNABORTED   (APR_OS_START_CANONERR + 18)
00698 #endif
00699 
00701 #ifdef ECONNRESET
00702 #define APR_ECONNRESET ECONNRESET
00703 #else
00704 #define APR_ECONNRESET     (APR_OS_START_CANONERR + 19)
00705 #endif
00706 
00708 #ifdef ETIMEDOUT
00709 #define APR_ETIMEDOUT ETIMEDOUT
00710 #else
00711 #define APR_ETIMEDOUT      (APR_OS_START_CANONERR + 20)
00712 #endif
00713 
00715 #ifdef EHOSTUNREACH
00716 #define APR_EHOSTUNREACH EHOSTUNREACH
00717 #else
00718 #define APR_EHOSTUNREACH   (APR_OS_START_CANONERR + 21)
00719 #endif
00720 
00722 #ifdef ENETUNREACH
00723 #define APR_ENETUNREACH ENETUNREACH
00724 #else
00725 #define APR_ENETUNREACH    (APR_OS_START_CANONERR + 22)
00726 #endif
00727 
00729 #ifdef EFTYPE
00730 #define APR_EFTYPE EFTYPE
00731 #else
00732 #define APR_EFTYPE        (APR_OS_START_CANONERR + 23)
00733 #endif
00734 
00736 #ifdef EPIPE
00737 #define APR_EPIPE EPIPE
00738 #else
00739 #define APR_EPIPE         (APR_OS_START_CANONERR + 24)
00740 #endif
00741 
00743 #ifdef EXDEV
00744 #define APR_EXDEV EXDEV
00745 #else
00746 #define APR_EXDEV         (APR_OS_START_CANONERR + 25)
00747 #endif
00748 
00750 #ifdef ENOTEMPTY
00751 #define APR_ENOTEMPTY ENOTEMPTY
00752 #else
00753 #define APR_ENOTEMPTY     (APR_OS_START_CANONERR + 26)
00754 #endif
00755 
00758 #if defined(OS2) && !defined(DOXYGEN)
00759 
00760 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
00761 #define APR_TO_OS_ERROR(e)   (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
00762 
00763 #define INCL_DOSERRORS
00764 #define INCL_DOS
00765 
00766 /* Leave these undefined.
00767  * OS2 doesn't rely on the errno concept.
00768  * The API calls always return a result codes which
00769  * should be filtered through APR_FROM_OS_ERROR().
00770  *
00771  * #define apr_get_os_error()   (APR_FROM_OS_ERROR(GetLastError()))
00772  * #define apr_set_os_error(e)  (SetLastError(APR_TO_OS_ERROR(e)))
00773  */
00774 
00775 /* A special case, only socket calls require this;
00776  */
00777 #define apr_get_netos_error()   (APR_FROM_OS_ERROR(errno))
00778 #define apr_set_netos_error(e)  (errno = APR_TO_OS_ERROR(e))
00779 
00780 /* And this needs to be greped away for good:
00781  */
00782 #define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e))
00783 
00784 #define APR_STATUS_IS_SUCCESS(s)           ((s) == APR_SUCCESS \
00785                 || (s) == APR_OS_START_SYSERR + NO_ERROR)
00786 
00787 /* These can't sit in a private header, so in spite of the extra size, 
00788  * they need to be made available here.
00789  */
00790 #define SOCBASEERR              10000
00791 #define SOCEPERM                (SOCBASEERR+1)             /* Not owner */
00792 #define SOCESRCH                (SOCBASEERR+3)             /* No such process */
00793 #define SOCEINTR                (SOCBASEERR+4)             /* Interrupted system call */
00794 #define SOCENXIO                (SOCBASEERR+6)             /* No such device or address */
00795 #define SOCEBADF                (SOCBASEERR+9)             /* Bad file number */
00796 #define SOCEACCES               (SOCBASEERR+13)            /* Permission denied */
00797 #define SOCEFAULT               (SOCBASEERR+14)            /* Bad address */
00798 #define SOCEINVAL               (SOCBASEERR+22)            /* Invalid argument */
00799 #define SOCEMFILE               (SOCBASEERR+24)            /* Too many open files */
00800 #define SOCEPIPE                (SOCBASEERR+32)            /* Broken pipe */
00801 #define SOCEOS2ERR              (SOCBASEERR+100)           /* OS/2 Error */
00802 #define SOCEWOULDBLOCK          (SOCBASEERR+35)            /* Operation would block */
00803 #define SOCEINPROGRESS          (SOCBASEERR+36)            /* Operation now in progress */
00804 #define SOCEALREADY             (SOCBASEERR+37)            /* Operation already in progress */
00805 #define SOCENOTSOCK             (SOCBASEERR+38)            /* Socket operation on non-socket */
00806 #define SOCEDESTADDRREQ         (SOCBASEERR+39)            /* Destination address required */
00807 #define SOCEMSGSIZE             (SOCBASEERR+40)            /* Message too long */
00808 #define SOCEPROTOTYPE           (SOCBASEERR+41)            /* Protocol wrong type for socket */
00809 #define SOCENOPROTOOPT          (SOCBASEERR+42)            /* Protocol not available */
00810 #define SOCEPROTONOSUPPORT      (SOCBASEERR+43)            /* Protocol not supported */
00811 #define SOCESOCKTNOSUPPORT      (SOCBASEERR+44)            /* Socket type not supported */
00812 #define SOCEOPNOTSUPP           (SOCBASEERR+45)            /* Operation not supported on socket */
00813 #define SOCEPFNOSUPPORT         (SOCBASEERR+46)            /* Protocol family not supported */
00814 #define SOCEAFNOSUPPORT         (SOCBASEERR+47)            /* Address family not supported by protocol family */
00815 #define SOCEADDRINUSE           (SOCBASEERR+48)            /* Address already in use */
00816 #define SOCEADDRNOTAVAIL        (SOCBASEERR+49)            /* Can't assign requested address */
00817 #define SOCENETDOWN             (SOCBASEERR+50)            /* Network is down */
00818 #define SOCENETUNREACH          (SOCBASEERR+51)            /* Network is unreachable */
00819 #define SOCENETRESET            (SOCBASEERR+52)            /* Network dropped connection on reset */
00820 #define SOCECONNABORTED         (SOCBASEERR+53)            /* Software caused connection abort */
00821 #define SOCECONNRESET           (SOCBASEERR+54)            /* Connection reset by peer */
00822 #define SOCENOBUFS              (SOCBASEERR+55)            /* No buffer space available */
00823 #define SOCEISCONN              (SOCBASEERR+56)            /* Socket is already connected */
00824 #define SOCENOTCONN             (SOCBASEERR+57)            /* Socket is not connected */
00825 #define SOCESHUTDOWN            (SOCBASEERR+58)            /* Can't send after socket shutdown */
00826 #define SOCETOOMANYREFS         (SOCBASEERR+59)            /* Too many references: can't splice */
00827 #define SOCETIMEDOUT            (SOCBASEERR+60)            /* Connection timed out */
00828 #define SOCECONNREFUSED         (SOCBASEERR+61)            /* Connection refused */
00829 #define SOCELOOP                (SOCBASEERR+62)            /* Too many levels of symbolic links */
00830 #define SOCENAMETOOLONG         (SOCBASEERR+63)            /* File name too long */
00831 #define SOCEHOSTDOWN            (SOCBASEERR+64)            /* Host is down */
00832 #define SOCEHOSTUNREACH         (SOCBASEERR+65)            /* No route to host */
00833 #define SOCENOTEMPTY            (SOCBASEERR+66)            /* Directory not empty */
00834 
00835 /* APR CANONICAL ERROR TESTS */
00836 #define APR_STATUS_IS_EACCES(s)         ((s) == APR_EACCES \
00837                 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \
00838                 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION)
00839 #define APR_STATUS_IS_EEXIST(s)         ((s) == APR_EEXIST \
00840                 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \
00841                 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \
00842                 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS \
00843                 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED)
00844 #define APR_STATUS_IS_ENAMETOOLONG(s)   ((s) == APR_ENAMETOOLONG \
00845                 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \
00846                 || (s) == APR_OS_START_SYSERR + SOCENAMETOOLONG)
00847 #define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT \
00848                 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \
00849                 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \
00850                 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES \
00851                 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED)
00852 #define APR_STATUS_IS_ENOTDIR(s)        ((s) == APR_ENOTDIR)
00853 #define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC \
00854                 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL)
00855 #define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM)
00856 #define APR_STATUS_IS_EMFILE(s)         ((s) == APR_EMFILE \
00857                 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES)
00858 #define APR_STATUS_IS_ENFILE(s)         ((s) == APR_ENFILE)
00859 #define APR_STATUS_IS_EBADF(s)          ((s) == APR_EBADF \
00860                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE)
00861 #define APR_STATUS_IS_EINVAL(s)         ((s) == APR_EINVAL \
00862                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \
00863                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION)
00864 #define APR_STATUS_IS_ESPIPE(s)         ((s) == APR_ESPIPE \
00865                 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)
00866 #define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN \
00867                 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \
00868                 || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK \
00869                 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION)
00870 #define APR_STATUS_IS_EINTR(s)          ((s) == APR_EINTR \
00871                 || (s) == APR_OS_START_SYSERR + SOCEINTR)
00872 #define APR_STATUS_IS_ENOTSOCK(s)       ((s) == APR_ENOTSOCK \
00873                 || (s) == APR_OS_START_SYSERR + SOCENOTSOCK)
00874 #define APR_STATUS_IS_ECONNREFUSED(s)   ((s) == APR_ECONNREFUSED \
00875                 || (s) == APR_OS_START_SYSERR + SOCECONNREFUSED)
00876 #define APR_STATUS_IS_EINPROGRESS(s)    ((s) == APR_EINPROGRESS \
00877                 || (s) == APR_OS_START_SYSERR + SOCEINPROGRESS)
00878 #define APR_STATUS_IS_ECONNABORTED(s)   ((s) == APR_ECONNABORTED \
00879                 || (s) == APR_OS_START_SYSERR + SOCECONNABORTED)
00880 #define APR_STATUS_IS_ECONNRESET(s)     ((s) == APR_ECONNRESET \
00881                 || (s) == APR_OS_START_SYSERR + SOCECONNRESET)
00882 #define APR_STATUS_IS_ETIMEDOUT(s)      ((s) == APR_ETIMEDOUT \
00883                 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT)    
00884 #define APR_STATUS_IS_EHOSTUNREACH(s)   ((s) == APR_EHOSTUNREACH \
00885                 || (s) == APR_OS_START_SYSERR + SOCEHOSTUNREACH)
00886 #define APR_STATUS_IS_ENETUNREACH(s)    ((s) == APR_ENETUNREACH \
00887                 || (s) == APR_OS_START_SYSERR + SOCENETUNREACH)
00888 #define APR_STATUS_IS_EFTYPE(s)         ((s) == APR_EFTYPE)
00889 #define APR_STATUS_IS_EPIPE(s)          ((s) == APR_EPIPE \
00890                 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE \
00891                 || (s) == APR_OS_START_SYSERR + SOCEPIPE)
00892 #define APR_STATUS_IS_EXDEV(s)          ((s) == APR_EXDEV \
00893                 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE)
00894 #define APR_STATUS_IS_ENOTEMPTY(s)      ((s) == APR_ENOTEMPTY \
00895                 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY \
00896                 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED)
00897 
00898 /*
00899     Sorry, too tired to wrap this up for OS2... feel free to
00900     fit the following into their best matches.
00901 
00902     { ERROR_NO_SIGNAL_SENT,     ESRCH           },
00903     { SOCEALREADY,              EALREADY        },
00904     { SOCEDESTADDRREQ,          EDESTADDRREQ    },
00905     { SOCEMSGSIZE,              EMSGSIZE        },
00906     { SOCEPROTOTYPE,            EPROTOTYPE      },
00907     { SOCENOPROTOOPT,           ENOPROTOOPT     },
00908     { SOCEPROTONOSUPPORT,       EPROTONOSUPPORT },
00909     { SOCESOCKTNOSUPPORT,       ESOCKTNOSUPPORT },
00910     { SOCEOPNOTSUPP,            EOPNOTSUPP      },
00911     { SOCEPFNOSUPPORT,          EPFNOSUPPORT    },
00912     { SOCEAFNOSUPPORT,          EAFNOSUPPORT    },
00913     { SOCEADDRINUSE,            EADDRINUSE      },
00914     { SOCEADDRNOTAVAIL,         EADDRNOTAVAIL   },
00915     { SOCENETDOWN,              ENETDOWN        },
00916     { SOCENETRESET,             ENETRESET       },
00917     { SOCENOBUFS,               ENOBUFS         },
00918     { SOCEISCONN,               EISCONN         },
00919     { SOCENOTCONN,              ENOTCONN        },
00920     { SOCESHUTDOWN,             ESHUTDOWN       },
00921     { SOCETOOMANYREFS,          ETOOMANYREFS    },
00922     { SOCELOOP,                 ELOOP           },
00923     { SOCEHOSTDOWN,             EHOSTDOWN       },
00924     { SOCENOTEMPTY,             ENOTEMPTY       },
00925     { SOCEPIPE,                 EPIPE           }
00926 */
00927 
00928 #elif defined(WIN32) && !defined(DOXYGEN) /* !defined(OS2) */
00929 
00930 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
00931 #define APR_TO_OS_ERROR(e)   (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
00932 
00933 #define apr_get_os_error()   (APR_FROM_OS_ERROR(GetLastError()))
00934 #define apr_set_os_error(e)  (SetLastError(APR_TO_OS_ERROR(e)))
00935 
00936 /* A special case, only socket calls require this:
00937  */
00938 #define apr_get_netos_error()   (APR_FROM_OS_ERROR(WSAGetLastError()))
00939 #define apr_set_netos_error(e)   (WSASetLastError(APR_TO_OS_ERROR(e)))
00940 
00941 #define APR_STATUS_IS_SUCCESS(s)           ((s) == APR_SUCCESS \
00942                 || (s) == APR_OS_START_SYSERR + ERROR_SUCCESS)
00943 
00944 /* APR CANONICAL ERROR TESTS */
00945 #define APR_STATUS_IS_EACCES(s)         ((s) == APR_EACCES \
00946                 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \
00947                 || (s) == APR_OS_START_SYSERR + ERROR_CANNOT_MAKE \
00948                 || (s) == APR_OS_START_SYSERR + ERROR_CURRENT_DIRECTORY \
00949                 || (s) == APR_OS_START_SYSERR + ERROR_DRIVE_LOCKED \
00950                 || (s) == APR_OS_START_SYSERR + ERROR_FAIL_I24 \
00951                 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \
00952                 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_FAILED \
00953                 || (s) == APR_OS_START_SYSERR + ERROR_NOT_LOCKED \
00954                 || (s) == APR_OS_START_SYSERR + ERROR_NETWORK_ACCESS_DENIED \
00955                 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION)
00956 #define APR_STATUS_IS_EEXIST(s)         ((s) == APR_EEXIST \
00957                 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \
00958                 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS)
00959 #define APR_STATUS_IS_ENAMETOOLONG(s)   ((s) == APR_ENAMETOOLONG \
00960                 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \
00961                 || (s) == APR_OS_START_SYSERR + WSAENAMETOOLONG)
00962 #define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT \
00963                 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \
00964                 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \
00965                 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \
00966                 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES)
00967 #define APR_STATUS_IS_ENOTDIR(s)        ((s) == APR_ENOTDIR \
00968                 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \
00969                 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NETPATH \
00970                 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NET_NAME \
00971                 || (s) == APR_OS_START_SYSERR + ERROR_BAD_PATHNAME \
00972                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DRIVE)
00973 #define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC \
00974                 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL)
00975 #define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM \
00976                 || (s) == APR_OS_START_SYSERR + ERROR_ARENA_TRASHED \
00977                 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_MEMORY \
00978                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_BLOCK \
00979                 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_QUOTA \
00980                 || (s) == APR_OS_START_SYSERR + ERROR_OUTOFMEMORY)
00981 #define APR_STATUS_IS_EMFILE(s)         ((s) == APR_EMFILE \
00982                 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES)
00983 #define APR_STATUS_IS_ENFILE(s)         ((s) == APR_ENFILE)
00984 #define APR_STATUS_IS_EBADF(s)          ((s) == APR_EBADF \
00985                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \
00986                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_TARGET_HANDLE)
00987 #define APR_STATUS_IS_EINVAL(s)         ((s) == APR_EINVAL \
00988                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_ACCESS \
00989                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DATA \
00990                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION \
00991                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \
00992                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \
00993                 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)
00994 #define APR_STATUS_IS_ESPIPE(s)         ((s) == APR_ESPIPE \
00995                 || (s) == APR_OS_START_SYSERR + ERROR_SEEK_ON_DEVICE \
00996                 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)
00997 #define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN \
00998                 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \
00999                 || (s) == APR_OS_START_SYSERR + ERROR_NO_PROC_SLOTS \
01000                 || (s) == APR_OS_START_SYSERR + ERROR_NESTING_NOT_ALLOWED \
01001                 || (s) == APR_OS_START_SYSERR + ERROR_MAX_THRDS_REACHED \
01002                 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \
01003                 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK)
01004 #define APR_STATUS_IS_EINTR(s)          ((s) == APR_EINTR \
01005                 || (s) == APR_OS_START_SYSERR + WSAEINTR)
01006 #define APR_STATUS_IS_ENOTSOCK(s)       ((s) == APR_ENOTSOCK \
01007                 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK)
01008 #define APR_STATUS_IS_ECONNREFUSED(s)   ((s) == APR_ECONNREFUSED \
01009                 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED)
01010 #define APR_STATUS_IS_EINPROGRESS(s)    ((s) == APR_EINPROGRESS \
01011                 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS)
01012 #define APR_STATUS_IS_ECONNABORTED(s)   ((s) == APR_ECONNABORTED \
01013                 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED)
01014 #define APR_STATUS_IS_ECONNRESET(s)     ((s) == APR_ECONNRESET \
01015                 || (s) == APR_OS_START_SYSERR + ERROR_NETNAME_DELETED \
01016                 || (s) == APR_OS_START_SYSERR + WSAECONNRESET)
01017 #define APR_STATUS_IS_ETIMEDOUT(s)      ((s) == APR_ETIMEDOUT \
01018                 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \
01019                 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)
01020 #define APR_STATUS_IS_EHOSTUNREACH(s)   ((s) == APR_EHOSTUNREACH \
01021                 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH)
01022 #define APR_STATUS_IS_ENETUNREACH(s)    ((s) == APR_ENETUNREACH \
01023                 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH)
01024 #define APR_STATUS_IS_EFTYPE(s)         ((s) == APR_EFTYPE \
01025                 || (s) == APR_OS_START_SYSERR + ERROR_EXE_MACHINE_TYPE_MISMATCH \
01026                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DLL \
01027                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_MODULETYPE \
01028                 || (s) == APR_OS_START_SYSERR + ERROR_BAD_EXE_FORMAT \
01029                 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_EXE_SIGNATURE \
01030                 || (s) == APR_OS_START_SYSERR + ERROR_FILE_CORRUPT \
01031                 || (s) == APR_OS_START_SYSERR + ERROR_BAD_FORMAT)
01032 #define APR_STATUS_IS_EPIPE(s)          ((s) == APR_EPIPE \
01033                 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE)
01034 #define APR_STATUS_IS_EXDEV(s)          ((s) == APR_EXDEV \
01035                 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE)
01036 #define APR_STATUS_IS_ENOTEMPTY(s)      ((s) == APR_ENOTEMPTY \
01037                 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY)
01038 
01039 #elif defined(NETWARE) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */
01040 
01041 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
01042 #define APR_TO_OS_ERROR(e)   (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
01043 
01044 #define apr_get_os_error()    (errno)
01045 #define apr_set_os_error(e)   (errno = (e))
01046 
01047 /* A special case, only socket calls require this: */
01048 #define apr_get_netos_error()   (APR_FROM_OS_ERROR(WSAGetLastError()))
01049 #define apr_set_netos_error(e)  (WSASetLastError(APR_TO_OS_ERROR(e)))
01050 
01051 #define APR_STATUS_IS_SUCCESS(s)           ((s) == APR_SUCCESS)
01052 
01053 /* APR CANONICAL ERROR TESTS */
01054 #define APR_STATUS_IS_EACCES(s)         ((s) == APR_EACCES)
01055 #define APR_STATUS_IS_EEXIST(s)         ((s) == APR_EEXIST)
01056 #define APR_STATUS_IS_ENAMETOOLONG(s)   ((s) == APR_ENAMETOOLONG)
01057 #define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT)
01058 #define APR_STATUS_IS_ENOTDIR(s)        ((s) == APR_ENOTDIR)
01059 #define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC)
01060 #define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM)
01061 #define APR_STATUS_IS_EMFILE(s)         ((s) == APR_EMFILE)
01062 #define APR_STATUS_IS_ENFILE(s)         ((s) == APR_ENFILE)
01063 #define APR_STATUS_IS_EBADF(s)          ((s) == APR_EBADF)
01064 #define APR_STATUS_IS_EINVAL(s)         ((s) == APR_EINVAL)
01065 #define APR_STATUS_IS_ESPIPE(s)         ((s) == APR_ESPIPE)
01066 
01067 #define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN \
01068                 || (s) ==                       EWOULDBLOCK \
01069                 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK)
01070 #define APR_STATUS_IS_EINTR(s)          ((s) == APR_EINTR \
01071                 || (s) == APR_OS_START_SYSERR + WSAEINTR)
01072 #define APR_STATUS_IS_ENOTSOCK(s)       ((s) == APR_ENOTSOCK \
01073                 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK)
01074 #define APR_STATUS_IS_ECONNREFUSED(s)   ((s) == APR_ECONNREFUSED \
01075                 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED)
01076 #define APR_STATUS_IS_EINPROGRESS(s)    ((s) == APR_EINPROGRESS \
01077                 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS)
01078 #define APR_STATUS_IS_ECONNABORTED(s)   ((s) == APR_ECONNABORTED \
01079                 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED)
01080 #define APR_STATUS_IS_ECONNRESET(s)     ((s) == APR_ECONNRESET \
01081                 || (s) == APR_OS_START_SYSERR + WSAECONNRESET)
01082 #define APR_STATUS_IS_ETIMEDOUT(s)      ((s) == APR_ETIMEDOUT \
01083                 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \
01084                 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)
01085 #define APR_STATUS_IS_EHOSTUNREACH(s)   ((s) == APR_EHOSTUNREACH \
01086                 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH)
01087 #define APR_STATUS_IS_ENETUNREACH(s)    ((s) == APR_ENETUNREACH \
01088                 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH)
01089 #define APR_STATUS_IS_ENETDOWN(s)       ((s) == APR_OS_START_SYSERR + WSAENETDOWN)
01090 #define APR_STATUS_IS_EFTYPE(s)         ((s) == APR_EFTYPE)
01091 #define APR_STATUS_IS_EPIPE(s)          ((s) == APR_EPIPE)
01092 #define APR_STATUS_IS_EXDEV(s)          ((s) == APR_EXDEV)
01093 #define APR_STATUS_IS_ENOTEMPTY(s)      ((s) == APR_ENOTEMPTY)
01094 
01095 #else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
01096 
01097 /*
01098  *  os error codes are clib error codes
01099  */
01100 #define APR_FROM_OS_ERROR(e)  (e)
01101 #define APR_TO_OS_ERROR(e)    (e)
01102 
01103 #define apr_get_os_error()    (errno)
01104 #define apr_set_os_error(e)   (errno = (e))
01105 
01106 /* A special case, only socket calls require this:
01107  */
01108 #define apr_get_netos_error() (errno)
01109 #define apr_set_netos_error(e) (errno = (e))
01110 
01117 #define APR_STATUS_IS_SUCCESS(s)        ((s) == APR_SUCCESS)
01118 
01120 #define APR_STATUS_IS_EACCES(s)         ((s) == APR_EACCES)
01121 
01122 #define APR_STATUS_IS_EEXIST(s)         ((s) == APR_EEXIST)
01123 
01124 #define APR_STATUS_IS_ENAMETOOLONG(s)   ((s) == APR_ENAMETOOLONG)
01125 
01126 #define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT)
01127 
01128 #define APR_STATUS_IS_ENOTDIR(s)        ((s) == APR_ENOTDIR)
01129 
01130 #define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC)
01131 
01132 #define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM)
01133 
01134 #define APR_STATUS_IS_EMFILE(s)         ((s) == APR_EMFILE)
01135 
01136 #define APR_STATUS_IS_ENFILE(s)         ((s) == APR_ENFILE)
01137 
01138 #define APR_STATUS_IS_EBADF(s)          ((s) == APR_EBADF)
01139 
01140 #define APR_STATUS_IS_EINVAL(s)         ((s) == APR_EINVAL)
01141 
01142 #define APR_STATUS_IS_ESPIPE(s)         ((s) == APR_ESPIPE)
01143 
01145 #if !defined(EWOULDBLOCK) || !defined(EAGAIN)
01146 #define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN)
01147 #elif (EWOULDBLOCK == EAGAIN)
01148 #define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN)
01149 #else
01150 #define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN \
01151                                       || (s) == EWOULDBLOCK)
01152 #endif
01153 
01155 #define APR_STATUS_IS_EINTR(s)          ((s) == APR_EINTR)
01156 
01157 #define APR_STATUS_IS_ENOTSOCK(s)       ((s) == APR_ENOTSOCK)
01158 
01159 #define APR_STATUS_IS_ECONNREFUSED(s)   ((s) == APR_ECONNREFUSED)
01160 
01161 #define APR_STATUS_IS_EINPROGRESS(s)    ((s) == APR_EINPROGRESS)
01162 
01174 #ifdef EPROTO
01175 #define APR_STATUS_IS_ECONNABORTED(s)    ((s) == APR_ECONNABORTED \
01176                                        || (s) == EPROTO)
01177 #else
01178 #define APR_STATUS_IS_ECONNABORTED(s)    ((s) == APR_ECONNABORTED)
01179 #endif
01180 
01182 #define APR_STATUS_IS_ECONNRESET(s)      ((s) == APR_ECONNRESET)
01183 
01184 #define APR_STATUS_IS_ETIMEDOUT(s)       ((s) == APR_ETIMEDOUT)    
01185 
01186 #define APR_STATUS_IS_EHOSTUNREACH(s)    ((s) == APR_EHOSTUNREACH)
01187 
01188 #define APR_STATUS_IS_ENETUNREACH(s)     ((s) == APR_ENETUNREACH)
01189 
01190 #define APR_STATUS_IS_EFTYPE(s)          ((s) == APR_EFTYPE)
01191 
01192 #define APR_STATUS_IS_EPIPE(s)           ((s) == APR_EPIPE)
01193 
01194 #define APR_STATUS_IS_EXDEV(s)           ((s) == APR_EXDEV)
01195 
01196 #define APR_STATUS_IS_ENOTEMPTY(s)       ((s) == APR_ENOTEMPTY || \
01197                                           (s) == APR_EEXIST)
01198 
01200 #endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
01201 
01204 #ifdef __cplusplus
01205 }
01206 #endif
01207 
01208 #endif  /* ! APR_ERRNO_H */

Generated on Wed Dec 8 10:14:03 2004 for Apache Portable Runtime by doxygen 1.3.6