apr_errno.h

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

Generated on Mon Nov 26 11:47:26 2007 for Apache Portable Runtime by  doxygen 1.5.2