GME
13
|
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 00132 #define APR_UTIL_ERRSPACE_SIZE 20000 00133 00136 #define APR_OS_START_STATUS (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE) 00137 00141 #define APR_UTIL_START_STATUS (APR_OS_START_STATUS + \ 00142 (APR_OS_ERRSPACE_SIZE - APR_UTIL_ERRSPACE_SIZE)) 00143 00164 #define APR_OS_START_USERERR (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE) 00165 00169 #define APR_OS_START_USEERR APR_OS_START_USERERR 00170 00174 #define APR_OS_START_CANONERR (APR_OS_START_USERERR \ 00175 + (APR_OS_ERRSPACE_SIZE * 10)) 00176 00180 #define APR_OS_START_EAIERR (APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE) 00181 00185 #define APR_OS_START_SYSERR (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE) 00186 00225 #define APR_SUCCESS 0 00226 00288 #define APR_ENOSTAT (APR_OS_START_ERROR + 1) 00289 00290 #define APR_ENOPOOL (APR_OS_START_ERROR + 2) 00291 /* empty slot: +3 */ 00293 #define APR_EBADDATE (APR_OS_START_ERROR + 4) 00294 00295 #define APR_EINVALSOCK (APR_OS_START_ERROR + 5) 00296 00297 #define APR_ENOPROC (APR_OS_START_ERROR + 6) 00298 00299 #define APR_ENOTIME (APR_OS_START_ERROR + 7) 00300 00301 #define APR_ENODIR (APR_OS_START_ERROR + 8) 00302 00303 #define APR_ENOLOCK (APR_OS_START_ERROR + 9) 00304 00305 #define APR_ENOPOLL (APR_OS_START_ERROR + 10) 00306 00307 #define APR_ENOSOCKET (APR_OS_START_ERROR + 11) 00308 00309 #define APR_ENOTHREAD (APR_OS_START_ERROR + 12) 00310 00311 #define APR_ENOTHDKEY (APR_OS_START_ERROR + 13) 00312 00313 #define APR_EGENERAL (APR_OS_START_ERROR + 14) 00314 00315 #define APR_ENOSHMAVAIL (APR_OS_START_ERROR + 15) 00316 00317 #define APR_EBADIP (APR_OS_START_ERROR + 16) 00318 00319 #define APR_EBADMASK (APR_OS_START_ERROR + 17) 00320 /* empty slot: +18 */ 00322 #define APR_EDSOOPEN (APR_OS_START_ERROR + 19) 00323 00324 #define APR_EABSOLUTE (APR_OS_START_ERROR + 20) 00325 00326 #define APR_ERELATIVE (APR_OS_START_ERROR + 21) 00327 00328 #define APR_EINCOMPLETE (APR_OS_START_ERROR + 22) 00329 00330 #define APR_EABOVEROOT (APR_OS_START_ERROR + 23) 00331 00332 #define APR_EBADPATH (APR_OS_START_ERROR + 24) 00333 00334 #define APR_EPATHWILD (APR_OS_START_ERROR + 25) 00335 00336 #define APR_ESYMNOTFOUND (APR_OS_START_ERROR + 26) 00337 00338 #define APR_EPROC_UNKNOWN (APR_OS_START_ERROR + 27) 00339 00340 #define APR_ENOTENOUGHENTROPY (APR_OS_START_ERROR + 28) 00341 00359 #define APR_STATUS_IS_ENOSTAT(s) ((s) == APR_ENOSTAT) 00360 00365 #define APR_STATUS_IS_ENOPOOL(s) ((s) == APR_ENOPOOL) 00366 00367 #define APR_STATUS_IS_EBADDATE(s) ((s) == APR_EBADDATE) 00368 00369 #define APR_STATUS_IS_EINVALSOCK(s) ((s) == APR_EINVALSOCK) 00370 00371 #define APR_STATUS_IS_ENOPROC(s) ((s) == APR_ENOPROC) 00372 00373 #define APR_STATUS_IS_ENOTIME(s) ((s) == APR_ENOTIME) 00374 00375 #define APR_STATUS_IS_ENODIR(s) ((s) == APR_ENODIR) 00376 00377 #define APR_STATUS_IS_ENOLOCK(s) ((s) == APR_ENOLOCK) 00378 00379 #define APR_STATUS_IS_ENOPOLL(s) ((s) == APR_ENOPOLL) 00380 00381 #define APR_STATUS_IS_ENOSOCKET(s) ((s) == APR_ENOSOCKET) 00382 00383 #define APR_STATUS_IS_ENOTHREAD(s) ((s) == APR_ENOTHREAD) 00384 00385 #define APR_STATUS_IS_ENOTHDKEY(s) ((s) == APR_ENOTHDKEY) 00386 00387 #define APR_STATUS_IS_EGENERAL(s) ((s) == APR_EGENERAL) 00388 00389 #define APR_STATUS_IS_ENOSHMAVAIL(s) ((s) == APR_ENOSHMAVAIL) 00390 00391 #define APR_STATUS_IS_EBADIP(s) ((s) == APR_EBADIP) 00392 00393 #define APR_STATUS_IS_EBADMASK(s) ((s) == APR_EBADMASK) 00394 /* empty slot: +18 */ 00399 #if defined(WIN32) 00400 #define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN \ 00401 || APR_TO_OS_ERROR(s) == ERROR_MOD_NOT_FOUND) 00402 #else 00403 #define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN) 00404 #endif 00405 00406 #define APR_STATUS_IS_EABSOLUTE(s) ((s) == APR_EABSOLUTE) 00407 00408 #define APR_STATUS_IS_ERELATIVE(s) ((s) == APR_ERELATIVE) 00409 00410 #define APR_STATUS_IS_EINCOMPLETE(s) ((s) == APR_EINCOMPLETE) 00411 00412 #define APR_STATUS_IS_EABOVEROOT(s) ((s) == APR_EABOVEROOT) 00413 00414 #define APR_STATUS_IS_EBADPATH(s) ((s) == APR_EBADPATH) 00415 00416 #define APR_STATUS_IS_EPATHWILD(s) ((s) == APR_EPATHWILD) 00417 00420 #if defined(WIN32) 00421 #define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND \ 00422 || APR_TO_OS_ERROR(s) == ERROR_PROC_NOT_FOUND) 00423 #else 00424 #define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND) 00425 #endif 00426 00427 #define APR_STATUS_IS_EPROC_UNKNOWN(s) ((s) == APR_EPROC_UNKNOWN) 00428 00429 #define APR_STATUS_IS_ENOTENOUGHENTROPY(s) ((s) == APR_ENOTENOUGHENTROPY) 00430 00438 #define APR_INCHILD (APR_OS_START_STATUS + 1) 00439 00440 #define APR_INPARENT (APR_OS_START_STATUS + 2) 00441 00442 #define APR_DETACH (APR_OS_START_STATUS + 3) 00443 00444 #define APR_NOTDETACH (APR_OS_START_STATUS + 4) 00445 00446 #define APR_CHILD_DONE (APR_OS_START_STATUS + 5) 00447 00448 #define APR_CHILD_NOTDONE (APR_OS_START_STATUS + 6) 00449 00450 #define APR_TIMEUP (APR_OS_START_STATUS + 7) 00451 00452 #define APR_INCOMPLETE (APR_OS_START_STATUS + 8) 00453 /* empty slot: +9 */ 00454 /* empty slot: +10 */ 00455 /* empty slot: +11 */ 00457 #define APR_BADCH (APR_OS_START_STATUS + 12) 00458 00459 #define APR_BADARG (APR_OS_START_STATUS + 13) 00460 00461 #define APR_EOF (APR_OS_START_STATUS + 14) 00462 00463 #define APR_NOTFOUND (APR_OS_START_STATUS + 15) 00464 /* empty slot: +16 */ 00465 /* empty slot: +17 */ 00466 /* empty slot: +18 */ 00468 #define APR_ANONYMOUS (APR_OS_START_STATUS + 19) 00469 00470 #define APR_FILEBASED (APR_OS_START_STATUS + 20) 00471 00472 #define APR_KEYBASED (APR_OS_START_STATUS + 21) 00473 00474 #define APR_EINIT (APR_OS_START_STATUS + 22) 00475 00476 #define APR_ENOTIMPL (APR_OS_START_STATUS + 23) 00477 00478 #define APR_EMISMATCH (APR_OS_START_STATUS + 24) 00479 00480 #define APR_EBUSY (APR_OS_START_STATUS + 25) 00481 00492 #define APR_STATUS_IS_INCHILD(s) ((s) == APR_INCHILD) 00493 00499 #define APR_STATUS_IS_INPARENT(s) ((s) == APR_INPARENT) 00500 00506 #define APR_STATUS_IS_DETACH(s) ((s) == APR_DETACH) 00507 00513 #define APR_STATUS_IS_NOTDETACH(s) ((s) == APR_NOTDETACH) 00514 00520 #define APR_STATUS_IS_CHILD_DONE(s) ((s) == APR_CHILD_DONE) 00521 00527 #define APR_STATUS_IS_CHILD_NOTDONE(s) ((s) == APR_CHILD_NOTDONE) 00528 00534 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP) 00535 00542 #define APR_STATUS_IS_INCOMPLETE(s) ((s) == APR_INCOMPLETE) 00543 /* empty slot: +9 */ 00544 /* empty slot: +10 */ 00545 /* empty slot: +11 */ 00552 #define APR_STATUS_IS_BADCH(s) ((s) == APR_BADCH) 00553 00560 #define APR_STATUS_IS_BADARG(s) ((s) == APR_BADARG) 00561 00567 #define APR_STATUS_IS_EOF(s) ((s) == APR_EOF) 00568 00574 #define APR_STATUS_IS_NOTFOUND(s) ((s) == APR_NOTFOUND) 00575 /* empty slot: +16 */ 00576 /* empty slot: +17 */ 00577 /* empty slot: +18 */ 00584 #define APR_STATUS_IS_ANONYMOUS(s) ((s) == APR_ANONYMOUS) 00585 00591 #define APR_STATUS_IS_FILEBASED(s) ((s) == APR_FILEBASED) 00592 00598 #define APR_STATUS_IS_KEYBASED(s) ((s) == APR_KEYBASED) 00599 00606 #define APR_STATUS_IS_EINIT(s) ((s) == APR_EINIT) 00607 00615 #define APR_STATUS_IS_ENOTIMPL(s) ((s) == APR_ENOTIMPL) 00616 00622 #define APR_STATUS_IS_EMISMATCH(s) ((s) == APR_EMISMATCH) 00623 00628 #define APR_STATUS_IS_EBUSY(s) ((s) == APR_EBUSY) 00629 00636 /* APR CANONICAL ERROR VALUES */ 00638 #ifdef EACCES 00639 #define APR_EACCES EACCES 00640 #else 00641 #define APR_EACCES (APR_OS_START_CANONERR + 1) 00642 #endif 00643 00645 #ifdef EEXIST 00646 #define APR_EEXIST EEXIST 00647 #else 00648 #define APR_EEXIST (APR_OS_START_CANONERR + 2) 00649 #endif 00650 00652 #ifdef ENAMETOOLONG 00653 #define APR_ENAMETOOLONG ENAMETOOLONG 00654 #else 00655 #define APR_ENAMETOOLONG (APR_OS_START_CANONERR + 3) 00656 #endif 00657 00659 #ifdef ENOENT 00660 #define APR_ENOENT ENOENT 00661 #else 00662 #define APR_ENOENT (APR_OS_START_CANONERR + 4) 00663 #endif 00664 00666 #ifdef ENOTDIR 00667 #define APR_ENOTDIR ENOTDIR 00668 #else 00669 #define APR_ENOTDIR (APR_OS_START_CANONERR + 5) 00670 #endif 00671 00673 #ifdef ENOSPC 00674 #define APR_ENOSPC ENOSPC 00675 #else 00676 #define APR_ENOSPC (APR_OS_START_CANONERR + 6) 00677 #endif 00678 00680 #ifdef ENOMEM 00681 #define APR_ENOMEM ENOMEM 00682 #else 00683 #define APR_ENOMEM (APR_OS_START_CANONERR + 7) 00684 #endif 00685 00687 #ifdef EMFILE 00688 #define APR_EMFILE EMFILE 00689 #else 00690 #define APR_EMFILE (APR_OS_START_CANONERR + 8) 00691 #endif 00692 00694 #ifdef ENFILE 00695 #define APR_ENFILE ENFILE 00696 #else 00697 #define APR_ENFILE (APR_OS_START_CANONERR + 9) 00698 #endif 00699 00701 #ifdef EBADF 00702 #define APR_EBADF EBADF 00703 #else 00704 #define APR_EBADF (APR_OS_START_CANONERR + 10) 00705 #endif 00706 00708 #ifdef EINVAL 00709 #define APR_EINVAL EINVAL 00710 #else 00711 #define APR_EINVAL (APR_OS_START_CANONERR + 11) 00712 #endif 00713 00715 #ifdef ESPIPE 00716 #define APR_ESPIPE ESPIPE 00717 #else 00718 #define APR_ESPIPE (APR_OS_START_CANONERR + 12) 00719 #endif 00720 00725 #ifdef EAGAIN 00726 #define APR_EAGAIN EAGAIN 00727 #elif defined(EWOULDBLOCK) 00728 #define APR_EAGAIN EWOULDBLOCK 00729 #else 00730 #define APR_EAGAIN (APR_OS_START_CANONERR + 13) 00731 #endif 00732 00734 #ifdef EINTR 00735 #define APR_EINTR EINTR 00736 #else 00737 #define APR_EINTR (APR_OS_START_CANONERR + 14) 00738 #endif 00739 00741 #ifdef ENOTSOCK 00742 #define APR_ENOTSOCK ENOTSOCK 00743 #else 00744 #define APR_ENOTSOCK (APR_OS_START_CANONERR + 15) 00745 #endif 00746 00748 #ifdef ECONNREFUSED 00749 #define APR_ECONNREFUSED ECONNREFUSED 00750 #else 00751 #define APR_ECONNREFUSED (APR_OS_START_CANONERR + 16) 00752 #endif 00753 00755 #ifdef EINPROGRESS 00756 #define APR_EINPROGRESS EINPROGRESS 00757 #else 00758 #define APR_EINPROGRESS (APR_OS_START_CANONERR + 17) 00759 #endif 00760 00766 #ifdef ECONNABORTED 00767 #define APR_ECONNABORTED ECONNABORTED 00768 #else 00769 #define APR_ECONNABORTED (APR_OS_START_CANONERR + 18) 00770 #endif 00771 00773 #ifdef ECONNRESET 00774 #define APR_ECONNRESET ECONNRESET 00775 #else 00776 #define APR_ECONNRESET (APR_OS_START_CANONERR + 19) 00777 #endif 00778 00781 #ifdef ETIMEDOUT 00782 #define APR_ETIMEDOUT ETIMEDOUT 00783 #else 00784 #define APR_ETIMEDOUT (APR_OS_START_CANONERR + 20) 00785 #endif 00786 00788 #ifdef EHOSTUNREACH 00789 #define APR_EHOSTUNREACH EHOSTUNREACH 00790 #else 00791 #define APR_EHOSTUNREACH (APR_OS_START_CANONERR + 21) 00792 #endif 00793 00795 #ifdef ENETUNREACH 00796 #define APR_ENETUNREACH ENETUNREACH 00797 #else 00798 #define APR_ENETUNREACH (APR_OS_START_CANONERR + 22) 00799 #endif 00800 00802 #ifdef EFTYPE 00803 #define APR_EFTYPE EFTYPE 00804 #else 00805 #define APR_EFTYPE (APR_OS_START_CANONERR + 23) 00806 #endif 00807 00809 #ifdef EPIPE 00810 #define APR_EPIPE EPIPE 00811 #else 00812 #define APR_EPIPE (APR_OS_START_CANONERR + 24) 00813 #endif 00814 00816 #ifdef EXDEV 00817 #define APR_EXDEV EXDEV 00818 #else 00819 #define APR_EXDEV (APR_OS_START_CANONERR + 25) 00820 #endif 00821 00823 #ifdef ENOTEMPTY 00824 #define APR_ENOTEMPTY ENOTEMPTY 00825 #else 00826 #define APR_ENOTEMPTY (APR_OS_START_CANONERR + 26) 00827 #endif 00828 00830 #ifdef EAFNOSUPPORT 00831 #define APR_EAFNOSUPPORT EAFNOSUPPORT 00832 #else 00833 #define APR_EAFNOSUPPORT (APR_OS_START_CANONERR + 27) 00834 #endif 00835 00838 #if defined(OS2) && !defined(DOXYGEN) 00839 00840 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 00841 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 00842 00843 #define INCL_DOSERRORS 00844 #define INCL_DOS 00845 00846 /* Leave these undefined. 00847 * OS2 doesn't rely on the errno concept. 00848 * The API calls always return a result codes which 00849 * should be filtered through APR_FROM_OS_ERROR(). 00850 * 00851 * #define apr_get_os_error() (APR_FROM_OS_ERROR(GetLastError())) 00852 * #define apr_set_os_error(e) (SetLastError(APR_TO_OS_ERROR(e))) 00853 */ 00854 00855 /* A special case, only socket calls require this; 00856 */ 00857 #define apr_get_netos_error() (APR_FROM_OS_ERROR(errno)) 00858 #define apr_set_netos_error(e) (errno = APR_TO_OS_ERROR(e)) 00859 00860 /* And this needs to be greped away for good: 00861 */ 00862 #define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e)) 00863 00864 /* These can't sit in a private header, so in spite of the extra size, 00865 * they need to be made available here. 00866 */ 00867 #define SOCBASEERR 10000 00868 #define SOCEPERM (SOCBASEERR+1) /* Not owner */ 00869 #define SOCESRCH (SOCBASEERR+3) /* No such process */ 00870 #define SOCEINTR (SOCBASEERR+4) /* Interrupted system call */ 00871 #define SOCENXIO (SOCBASEERR+6) /* No such device or address */ 00872 #define SOCEBADF (SOCBASEERR+9) /* Bad file number */ 00873 #define SOCEACCES (SOCBASEERR+13) /* Permission denied */ 00874 #define SOCEFAULT (SOCBASEERR+14) /* Bad address */ 00875 #define SOCEINVAL (SOCBASEERR+22) /* Invalid argument */ 00876 #define SOCEMFILE (SOCBASEERR+24) /* Too many open files */ 00877 #define SOCEPIPE (SOCBASEERR+32) /* Broken pipe */ 00878 #define SOCEOS2ERR (SOCBASEERR+100) /* OS/2 Error */ 00879 #define SOCEWOULDBLOCK (SOCBASEERR+35) /* Operation would block */ 00880 #define SOCEINPROGRESS (SOCBASEERR+36) /* Operation now in progress */ 00881 #define SOCEALREADY (SOCBASEERR+37) /* Operation already in progress */ 00882 #define SOCENOTSOCK (SOCBASEERR+38) /* Socket operation on non-socket */ 00883 #define SOCEDESTADDRREQ (SOCBASEERR+39) /* Destination address required */ 00884 #define SOCEMSGSIZE (SOCBASEERR+40) /* Message too long */ 00885 #define SOCEPROTOTYPE (SOCBASEERR+41) /* Protocol wrong type for socket */ 00886 #define SOCENOPROTOOPT (SOCBASEERR+42) /* Protocol not available */ 00887 #define SOCEPROTONOSUPPORT (SOCBASEERR+43) /* Protocol not supported */ 00888 #define SOCESOCKTNOSUPPORT (SOCBASEERR+44) /* Socket type not supported */ 00889 #define SOCEOPNOTSUPP (SOCBASEERR+45) /* Operation not supported on socket */ 00890 #define SOCEPFNOSUPPORT (SOCBASEERR+46) /* Protocol family not supported */ 00891 #define SOCEAFNOSUPPORT (SOCBASEERR+47) /* Address family not supported by protocol family */ 00892 #define SOCEADDRINUSE (SOCBASEERR+48) /* Address already in use */ 00893 #define SOCEADDRNOTAVAIL (SOCBASEERR+49) /* Can't assign requested address */ 00894 #define SOCENETDOWN (SOCBASEERR+50) /* Network is down */ 00895 #define SOCENETUNREACH (SOCBASEERR+51) /* Network is unreachable */ 00896 #define SOCENETRESET (SOCBASEERR+52) /* Network dropped connection on reset */ 00897 #define SOCECONNABORTED (SOCBASEERR+53) /* Software caused connection abort */ 00898 #define SOCECONNRESET (SOCBASEERR+54) /* Connection reset by peer */ 00899 #define SOCENOBUFS (SOCBASEERR+55) /* No buffer space available */ 00900 #define SOCEISCONN (SOCBASEERR+56) /* Socket is already connected */ 00901 #define SOCENOTCONN (SOCBASEERR+57) /* Socket is not connected */ 00902 #define SOCESHUTDOWN (SOCBASEERR+58) /* Can't send after socket shutdown */ 00903 #define SOCETOOMANYREFS (SOCBASEERR+59) /* Too many references: can't splice */ 00904 #define SOCETIMEDOUT (SOCBASEERR+60) /* Connection timed out */ 00905 #define SOCECONNREFUSED (SOCBASEERR+61) /* Connection refused */ 00906 #define SOCELOOP (SOCBASEERR+62) /* Too many levels of symbolic links */ 00907 #define SOCENAMETOOLONG (SOCBASEERR+63) /* File name too long */ 00908 #define SOCEHOSTDOWN (SOCBASEERR+64) /* Host is down */ 00909 #define SOCEHOSTUNREACH (SOCBASEERR+65) /* No route to host */ 00910 #define SOCENOTEMPTY (SOCBASEERR+66) /* Directory not empty */ 00911 00912 /* APR CANONICAL ERROR TESTS */ 00913 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \ 00914 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \ 00915 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION) 00916 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST \ 00917 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \ 00918 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \ 00919 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS \ 00920 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED) 00921 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG \ 00922 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \ 00923 || (s) == APR_OS_START_SYSERR + SOCENAMETOOLONG) 00924 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 00925 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \ 00926 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 00927 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES \ 00928 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED) 00929 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 00930 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 00931 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL) 00932 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 00933 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE \ 00934 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES) 00935 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 00936 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF \ 00937 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE) 00938 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \ 00939 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \ 00940 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION) 00941 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE \ 00942 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 00943 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 00944 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \ 00945 || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK \ 00946 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION) 00947 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 00948 || (s) == APR_OS_START_SYSERR + SOCEINTR) 00949 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 00950 || (s) == APR_OS_START_SYSERR + SOCENOTSOCK) 00951 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 00952 || (s) == APR_OS_START_SYSERR + SOCECONNREFUSED) 00953 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 00954 || (s) == APR_OS_START_SYSERR + SOCEINPROGRESS) 00955 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 00956 || (s) == APR_OS_START_SYSERR + SOCECONNABORTED) 00957 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 00958 || (s) == APR_OS_START_SYSERR + SOCECONNRESET) 00959 /* XXX deprecated */ 00960 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 00961 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) 00962 #undef APR_STATUS_IS_TIMEUP 00963 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 00964 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) 00965 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 00966 || (s) == APR_OS_START_SYSERR + SOCEHOSTUNREACH) 00967 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 00968 || (s) == APR_OS_START_SYSERR + SOCENETUNREACH) 00969 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 00970 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE \ 00971 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE \ 00972 || (s) == APR_OS_START_SYSERR + SOCEPIPE) 00973 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV \ 00974 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE) 00975 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \ 00976 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY \ 00977 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED) 00978 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_AFNOSUPPORT \ 00979 || (s) == APR_OS_START_SYSERR + SOCEAFNOSUPPORT) 00980 00981 /* 00982 Sorry, too tired to wrap this up for OS2... feel free to 00983 fit the following into their best matches. 00984 00985 { ERROR_NO_SIGNAL_SENT, ESRCH }, 00986 { SOCEALREADY, EALREADY }, 00987 { SOCEDESTADDRREQ, EDESTADDRREQ }, 00988 { SOCEMSGSIZE, EMSGSIZE }, 00989 { SOCEPROTOTYPE, EPROTOTYPE }, 00990 { SOCENOPROTOOPT, ENOPROTOOPT }, 00991 { SOCEPROTONOSUPPORT, EPROTONOSUPPORT }, 00992 { SOCESOCKTNOSUPPORT, ESOCKTNOSUPPORT }, 00993 { SOCEOPNOTSUPP, EOPNOTSUPP }, 00994 { SOCEPFNOSUPPORT, EPFNOSUPPORT }, 00995 { SOCEADDRINUSE, EADDRINUSE }, 00996 { SOCEADDRNOTAVAIL, EADDRNOTAVAIL }, 00997 { SOCENETDOWN, ENETDOWN }, 00998 { SOCENETRESET, ENETRESET }, 00999 { SOCENOBUFS, ENOBUFS }, 01000 { SOCEISCONN, EISCONN }, 01001 { SOCENOTCONN, ENOTCONN }, 01002 { SOCESHUTDOWN, ESHUTDOWN }, 01003 { SOCETOOMANYREFS, ETOOMANYREFS }, 01004 { SOCELOOP, ELOOP }, 01005 { SOCEHOSTDOWN, EHOSTDOWN }, 01006 { SOCENOTEMPTY, ENOTEMPTY }, 01007 { SOCEPIPE, EPIPE } 01008 */ 01009 01010 #elif defined(WIN32) && !defined(DOXYGEN) /* !defined(OS2) */ 01011 01012 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 01013 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 01014 01015 #define apr_get_os_error() (APR_FROM_OS_ERROR(GetLastError())) 01016 #define apr_set_os_error(e) (SetLastError(APR_TO_OS_ERROR(e))) 01017 01018 /* A special case, only socket calls require this: 01019 */ 01020 #define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError())) 01021 #define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e))) 01022 01023 /* APR CANONICAL ERROR TESTS */ 01024 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \ 01025 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \ 01026 || (s) == APR_OS_START_SYSERR + ERROR_CANNOT_MAKE \ 01027 || (s) == APR_OS_START_SYSERR + ERROR_CURRENT_DIRECTORY \ 01028 || (s) == APR_OS_START_SYSERR + ERROR_DRIVE_LOCKED \ 01029 || (s) == APR_OS_START_SYSERR + ERROR_FAIL_I24 \ 01030 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \ 01031 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_FAILED \ 01032 || (s) == APR_OS_START_SYSERR + ERROR_NOT_LOCKED \ 01033 || (s) == APR_OS_START_SYSERR + ERROR_NETWORK_ACCESS_DENIED \ 01034 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION) 01035 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST \ 01036 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \ 01037 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS) 01038 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG \ 01039 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \ 01040 || (s) == APR_OS_START_SYSERR + WSAENAMETOOLONG) 01041 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 01042 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \ 01043 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 01044 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \ 01045 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES) 01046 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR \ 01047 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 01048 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NETPATH \ 01049 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NET_NAME \ 01050 || (s) == APR_OS_START_SYSERR + ERROR_BAD_PATHNAME \ 01051 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DRIVE \ 01052 || (s) == APR_OS_START_SYSERR + ERROR_DIRECTORY) 01053 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 01054 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL) 01055 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM \ 01056 || (s) == APR_OS_START_SYSERR + ERROR_ARENA_TRASHED \ 01057 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_MEMORY \ 01058 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_BLOCK \ 01059 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_QUOTA \ 01060 || (s) == APR_OS_START_SYSERR + ERROR_OUTOFMEMORY) 01061 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE \ 01062 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES) 01063 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 01064 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF \ 01065 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \ 01066 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_TARGET_HANDLE) 01067 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \ 01068 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_ACCESS \ 01069 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DATA \ 01070 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION \ 01071 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \ 01072 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \ 01073 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 01074 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE \ 01075 || (s) == APR_OS_START_SYSERR + ERROR_SEEK_ON_DEVICE \ 01076 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 01077 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 01078 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \ 01079 || (s) == APR_OS_START_SYSERR + ERROR_NO_PROC_SLOTS \ 01080 || (s) == APR_OS_START_SYSERR + ERROR_NESTING_NOT_ALLOWED \ 01081 || (s) == APR_OS_START_SYSERR + ERROR_MAX_THRDS_REACHED \ 01082 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \ 01083 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK) 01084 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 01085 || (s) == APR_OS_START_SYSERR + WSAEINTR) 01086 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 01087 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK) 01088 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 01089 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED) 01090 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 01091 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS) 01092 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 01093 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED) 01094 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 01095 || (s) == APR_OS_START_SYSERR + ERROR_NETNAME_DELETED \ 01096 || (s) == APR_OS_START_SYSERR + WSAECONNRESET) 01097 /* XXX deprecated */ 01098 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 01099 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 01100 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 01101 #undef APR_STATUS_IS_TIMEUP 01102 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 01103 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 01104 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 01105 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 01106 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH) 01107 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 01108 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH) 01109 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE \ 01110 || (s) == APR_OS_START_SYSERR + ERROR_EXE_MACHINE_TYPE_MISMATCH \ 01111 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DLL \ 01112 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_MODULETYPE \ 01113 || (s) == APR_OS_START_SYSERR + ERROR_BAD_EXE_FORMAT \ 01114 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_EXE_SIGNATURE \ 01115 || (s) == APR_OS_START_SYSERR + ERROR_FILE_CORRUPT \ 01116 || (s) == APR_OS_START_SYSERR + ERROR_BAD_FORMAT) 01117 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE \ 01118 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE) 01119 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV \ 01120 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE) 01121 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \ 01122 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY) 01123 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \ 01124 || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT) 01125 01126 #elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */ 01127 01128 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 01129 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 01130 01131 #define apr_get_os_error() (errno) 01132 #define apr_set_os_error(e) (errno = (e)) 01133 01134 /* A special case, only socket calls require this: */ 01135 #define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError())) 01136 #define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e))) 01137 01138 /* APR CANONICAL ERROR TESTS */ 01139 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES) 01140 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST) 01141 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG) 01142 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT) 01143 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 01144 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC) 01145 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 01146 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE) 01147 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 01148 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF) 01149 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL) 01150 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE) 01151 01152 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 01153 || (s) == EWOULDBLOCK \ 01154 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK) 01155 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 01156 || (s) == APR_OS_START_SYSERR + WSAEINTR) 01157 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 01158 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK) 01159 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 01160 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED) 01161 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 01162 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS) 01163 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 01164 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED) 01165 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 01166 || (s) == APR_OS_START_SYSERR + WSAECONNRESET) 01167 /* XXX deprecated */ 01168 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 01169 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 01170 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 01171 #undef APR_STATUS_IS_TIMEUP 01172 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 01173 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 01174 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 01175 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 01176 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH) 01177 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 01178 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH) 01179 #define APR_STATUS_IS_ENETDOWN(s) ((s) == APR_OS_START_SYSERR + WSAENETDOWN) 01180 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 01181 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE) 01182 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV) 01183 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY) 01184 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \ 01185 || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT) 01186 01187 #else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */ 01188 01189 /* 01190 * os error codes are clib error codes 01191 */ 01192 #define APR_FROM_OS_ERROR(e) (e) 01193 #define APR_TO_OS_ERROR(e) (e) 01194 01195 #define apr_get_os_error() (errno) 01196 #define apr_set_os_error(e) (errno = (e)) 01197 01198 /* A special case, only socket calls require this: 01199 */ 01200 #define apr_get_netos_error() (errno) 01201 #define apr_set_netos_error(e) (errno = (e)) 01202 01209 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES) 01210 01211 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST) 01212 01213 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG) 01214 01220 #ifdef EMVSCATLG 01221 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 01222 || (s) == EMVSCATLG) 01223 #else 01224 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT) 01225 #endif 01226 01227 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 01228 01229 #ifdef EDQUOT 01230 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 01231 || (s) == EDQUOT) 01232 #else 01233 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC) 01234 #endif 01235 01236 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 01237 01238 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE) 01239 01240 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 01241 01242 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF) 01243 01244 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL) 01245 01246 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE) 01247 01249 #if !defined(EWOULDBLOCK) || !defined(EAGAIN) 01250 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 01251 #elif (EWOULDBLOCK == EAGAIN) 01252 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 01253 #else 01254 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 01255 || (s) == EWOULDBLOCK) 01256 #endif 01257 01259 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR) 01260 01261 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK) 01262 01263 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED) 01264 01265 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS) 01266 01278 #ifdef EPROTO 01279 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 01280 || (s) == EPROTO) 01281 #else 01282 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED) 01283 #endif 01284 01286 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET) 01287 01289 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT) 01290 01291 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH) 01292 01293 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH) 01294 01295 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 01296 01297 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE) 01298 01299 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV) 01300 01301 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY || \ 01302 (s) == APR_EEXIST) 01303 01304 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT) 01305 01307 #endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */ 01308 01311 #ifdef __cplusplus 01312 } 01313 #endif 01314 01315 #endif /* ! APR_ERRNO_H */