64 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 75 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 117 #define APR_OS_START_ERROR 20000 123 #define APR_OS_ERRSPACE_SIZE 50000 132 #define APR_UTIL_ERRSPACE_SIZE 20000 136 #define APR_OS_START_STATUS (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE) 141 #define APR_UTIL_START_STATUS (APR_OS_START_STATUS + \ 142 (APR_OS_ERRSPACE_SIZE - APR_UTIL_ERRSPACE_SIZE)) 164 #define APR_OS_START_USERERR (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE) 169 #define APR_OS_START_USEERR APR_OS_START_USERERR 174 #define APR_OS_START_CANONERR (APR_OS_START_USERERR \ 175 + (APR_OS_ERRSPACE_SIZE * 10)) 180 #define APR_OS_START_EAIERR (APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE) 185 #define APR_OS_START_SYSERR (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE) 225 #define APR_SUCCESS 0 288 #define APR_ENOSTAT (APR_OS_START_ERROR + 1) 290 #define APR_ENOPOOL (APR_OS_START_ERROR + 2) 293 #define APR_EBADDATE (APR_OS_START_ERROR + 4) 295 #define APR_EINVALSOCK (APR_OS_START_ERROR + 5) 297 #define APR_ENOPROC (APR_OS_START_ERROR + 6) 299 #define APR_ENOTIME (APR_OS_START_ERROR + 7) 301 #define APR_ENODIR (APR_OS_START_ERROR + 8) 303 #define APR_ENOLOCK (APR_OS_START_ERROR + 9) 305 #define APR_ENOPOLL (APR_OS_START_ERROR + 10) 307 #define APR_ENOSOCKET (APR_OS_START_ERROR + 11) 309 #define APR_ENOTHREAD (APR_OS_START_ERROR + 12) 311 #define APR_ENOTHDKEY (APR_OS_START_ERROR + 13) 313 #define APR_EGENERAL (APR_OS_START_ERROR + 14) 315 #define APR_ENOSHMAVAIL (APR_OS_START_ERROR + 15) 317 #define APR_EBADIP (APR_OS_START_ERROR + 16) 319 #define APR_EBADMASK (APR_OS_START_ERROR + 17) 322 #define APR_EDSOOPEN (APR_OS_START_ERROR + 19) 324 #define APR_EABSOLUTE (APR_OS_START_ERROR + 20) 326 #define APR_ERELATIVE (APR_OS_START_ERROR + 21) 328 #define APR_EINCOMPLETE (APR_OS_START_ERROR + 22) 330 #define APR_EABOVEROOT (APR_OS_START_ERROR + 23) 332 #define APR_EBADPATH (APR_OS_START_ERROR + 24) 334 #define APR_EPATHWILD (APR_OS_START_ERROR + 25) 336 #define APR_ESYMNOTFOUND (APR_OS_START_ERROR + 26) 338 #define APR_EPROC_UNKNOWN (APR_OS_START_ERROR + 27) 340 #define APR_ENOTENOUGHENTROPY (APR_OS_START_ERROR + 28) 359 #define APR_STATUS_IS_ENOSTAT(s) ((s) == APR_ENOSTAT) 365 #define APR_STATUS_IS_ENOPOOL(s) ((s) == APR_ENOPOOL) 367 #define APR_STATUS_IS_EBADDATE(s) ((s) == APR_EBADDATE) 369 #define APR_STATUS_IS_EINVALSOCK(s) ((s) == APR_EINVALSOCK) 371 #define APR_STATUS_IS_ENOPROC(s) ((s) == APR_ENOPROC) 373 #define APR_STATUS_IS_ENOTIME(s) ((s) == APR_ENOTIME) 375 #define APR_STATUS_IS_ENODIR(s) ((s) == APR_ENODIR) 377 #define APR_STATUS_IS_ENOLOCK(s) ((s) == APR_ENOLOCK) 379 #define APR_STATUS_IS_ENOPOLL(s) ((s) == APR_ENOPOLL) 381 #define APR_STATUS_IS_ENOSOCKET(s) ((s) == APR_ENOSOCKET) 383 #define APR_STATUS_IS_ENOTHREAD(s) ((s) == APR_ENOTHREAD) 385 #define APR_STATUS_IS_ENOTHDKEY(s) ((s) == APR_ENOTHDKEY) 387 #define APR_STATUS_IS_EGENERAL(s) ((s) == APR_EGENERAL) 389 #define APR_STATUS_IS_ENOSHMAVAIL(s) ((s) == APR_ENOSHMAVAIL) 391 #define APR_STATUS_IS_EBADIP(s) ((s) == APR_EBADIP) 393 #define APR_STATUS_IS_EBADMASK(s) ((s) == APR_EBADMASK) 400 #define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN \ 401 || APR_TO_OS_ERROR(s) == ERROR_MOD_NOT_FOUND) 403 #define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN \ 404 || APR_TO_OS_ERROR(s) == ERROR_FILE_NOT_FOUND) 406 #define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN) 409 #define APR_STATUS_IS_EABSOLUTE(s) ((s) == APR_EABSOLUTE) 411 #define APR_STATUS_IS_ERELATIVE(s) ((s) == APR_ERELATIVE) 413 #define APR_STATUS_IS_EINCOMPLETE(s) ((s) == APR_EINCOMPLETE) 415 #define APR_STATUS_IS_EABOVEROOT(s) ((s) == APR_EABOVEROOT) 417 #define APR_STATUS_IS_EBADPATH(s) ((s) == APR_EBADPATH) 419 #define APR_STATUS_IS_EPATHWILD(s) ((s) == APR_EPATHWILD) 424 #define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND \ 425 || APR_TO_OS_ERROR(s) == ERROR_PROC_NOT_FOUND) 427 #define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND \ 428 || APR_TO_OS_ERROR(s) == ERROR_INVALID_NAME) 430 #define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND) 433 #define APR_STATUS_IS_EPROC_UNKNOWN(s) ((s) == APR_EPROC_UNKNOWN) 435 #define APR_STATUS_IS_ENOTENOUGHENTROPY(s) ((s) == APR_ENOTENOUGHENTROPY) 444 #define APR_INCHILD (APR_OS_START_STATUS + 1) 446 #define APR_INPARENT (APR_OS_START_STATUS + 2) 448 #define APR_DETACH (APR_OS_START_STATUS + 3) 450 #define APR_NOTDETACH (APR_OS_START_STATUS + 4) 452 #define APR_CHILD_DONE (APR_OS_START_STATUS + 5) 454 #define APR_CHILD_NOTDONE (APR_OS_START_STATUS + 6) 456 #define APR_TIMEUP (APR_OS_START_STATUS + 7) 458 #define APR_INCOMPLETE (APR_OS_START_STATUS + 8) 463 #define APR_BADCH (APR_OS_START_STATUS + 12) 465 #define APR_BADARG (APR_OS_START_STATUS + 13) 467 #define APR_EOF (APR_OS_START_STATUS + 14) 469 #define APR_NOTFOUND (APR_OS_START_STATUS + 15) 474 #define APR_ANONYMOUS (APR_OS_START_STATUS + 19) 476 #define APR_FILEBASED (APR_OS_START_STATUS + 20) 478 #define APR_KEYBASED (APR_OS_START_STATUS + 21) 480 #define APR_EINIT (APR_OS_START_STATUS + 22) 482 #define APR_ENOTIMPL (APR_OS_START_STATUS + 23) 484 #define APR_EMISMATCH (APR_OS_START_STATUS + 24) 486 #define APR_EBUSY (APR_OS_START_STATUS + 25) 498 #define APR_STATUS_IS_INCHILD(s) ((s) == APR_INCHILD) 505 #define APR_STATUS_IS_INPARENT(s) ((s) == APR_INPARENT) 512 #define APR_STATUS_IS_DETACH(s) ((s) == APR_DETACH) 519 #define APR_STATUS_IS_NOTDETACH(s) ((s) == APR_NOTDETACH) 526 #define APR_STATUS_IS_CHILD_DONE(s) ((s) == APR_CHILD_DONE) 533 #define APR_STATUS_IS_CHILD_NOTDONE(s) ((s) == APR_CHILD_NOTDONE) 540 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP) 548 #define APR_STATUS_IS_INCOMPLETE(s) ((s) == APR_INCOMPLETE) 558 #define APR_STATUS_IS_BADCH(s) ((s) == APR_BADCH) 566 #define APR_STATUS_IS_BADARG(s) ((s) == APR_BADARG) 573 #define APR_STATUS_IS_EOF(s) ((s) == APR_EOF) 580 #define APR_STATUS_IS_NOTFOUND(s) ((s) == APR_NOTFOUND) 590 #define APR_STATUS_IS_ANONYMOUS(s) ((s) == APR_ANONYMOUS) 597 #define APR_STATUS_IS_FILEBASED(s) ((s) == APR_FILEBASED) 604 #define APR_STATUS_IS_KEYBASED(s) ((s) == APR_KEYBASED) 612 #define APR_STATUS_IS_EINIT(s) ((s) == APR_EINIT) 621 #define APR_STATUS_IS_ENOTIMPL(s) ((s) == APR_ENOTIMPL) 628 #define APR_STATUS_IS_EMISMATCH(s) ((s) == APR_EMISMATCH) 634 #define APR_STATUS_IS_EBUSY(s) ((s) == APR_EBUSY) 645 #define APR_EACCES EACCES 647 #define APR_EACCES (APR_OS_START_CANONERR + 1) 652 #define APR_EEXIST EEXIST 654 #define APR_EEXIST (APR_OS_START_CANONERR + 2) 659 #define APR_ENAMETOOLONG ENAMETOOLONG 661 #define APR_ENAMETOOLONG (APR_OS_START_CANONERR + 3) 666 #define APR_ENOENT ENOENT 668 #define APR_ENOENT (APR_OS_START_CANONERR + 4) 673 #define APR_ENOTDIR ENOTDIR 675 #define APR_ENOTDIR (APR_OS_START_CANONERR + 5) 680 #define APR_ENOSPC ENOSPC 682 #define APR_ENOSPC (APR_OS_START_CANONERR + 6) 687 #define APR_ENOMEM ENOMEM 689 #define APR_ENOMEM (APR_OS_START_CANONERR + 7) 694 #define APR_EMFILE EMFILE 696 #define APR_EMFILE (APR_OS_START_CANONERR + 8) 701 #define APR_ENFILE ENFILE 703 #define APR_ENFILE (APR_OS_START_CANONERR + 9) 708 #define APR_EBADF EBADF 710 #define APR_EBADF (APR_OS_START_CANONERR + 10) 715 #define APR_EINVAL EINVAL 717 #define APR_EINVAL (APR_OS_START_CANONERR + 11) 722 #define APR_ESPIPE ESPIPE 724 #define APR_ESPIPE (APR_OS_START_CANONERR + 12) 732 #define APR_EAGAIN EAGAIN 733 #elif defined(EWOULDBLOCK) 734 #define APR_EAGAIN EWOULDBLOCK 736 #define APR_EAGAIN (APR_OS_START_CANONERR + 13) 741 #define APR_EINTR EINTR 743 #define APR_EINTR (APR_OS_START_CANONERR + 14) 748 #define APR_ENOTSOCK ENOTSOCK 750 #define APR_ENOTSOCK (APR_OS_START_CANONERR + 15) 755 #define APR_ECONNREFUSED ECONNREFUSED 757 #define APR_ECONNREFUSED (APR_OS_START_CANONERR + 16) 762 #define APR_EINPROGRESS EINPROGRESS 764 #define APR_EINPROGRESS (APR_OS_START_CANONERR + 17) 773 #define APR_ECONNABORTED ECONNABORTED 775 #define APR_ECONNABORTED (APR_OS_START_CANONERR + 18) 780 #define APR_ECONNRESET ECONNRESET 782 #define APR_ECONNRESET (APR_OS_START_CANONERR + 19) 788 #define APR_ETIMEDOUT ETIMEDOUT 790 #define APR_ETIMEDOUT (APR_OS_START_CANONERR + 20) 795 #define APR_EHOSTUNREACH EHOSTUNREACH 797 #define APR_EHOSTUNREACH (APR_OS_START_CANONERR + 21) 802 #define APR_ENETUNREACH ENETUNREACH 804 #define APR_ENETUNREACH (APR_OS_START_CANONERR + 22) 809 #define APR_EFTYPE EFTYPE 811 #define APR_EFTYPE (APR_OS_START_CANONERR + 23) 816 #define APR_EPIPE EPIPE 818 #define APR_EPIPE (APR_OS_START_CANONERR + 24) 823 #define APR_EXDEV EXDEV 825 #define APR_EXDEV (APR_OS_START_CANONERR + 25) 830 #define APR_ENOTEMPTY ENOTEMPTY 832 #define APR_ENOTEMPTY (APR_OS_START_CANONERR + 26) 837 #define APR_EAFNOSUPPORT EAFNOSUPPORT 839 #define APR_EAFNOSUPPORT (APR_OS_START_CANONERR + 27) 844 #define APR_EOPNOTSUPP EOPNOTSUPP 846 #define APR_EOPNOTSUPP (APR_OS_START_CANONERR + 28) 851 #define APR_ERANGE ERANGE 853 #define APR_ERANGE (APR_OS_START_CANONERR + 29) 858 #define APR_EALREADY EALREADY 860 #define APR_EALREADY (APR_OS_START_CANONERR + 30) 865 #if defined(OS2) && !defined(DOXYGEN) 867 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 868 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 870 #define INCL_DOSERRORS 884 #define apr_get_netos_error() (APR_FROM_OS_ERROR(errno)) 885 #define apr_set_netos_error(e) (errno = APR_TO_OS_ERROR(e)) 890 #define SOCBASEERR 10000 891 #define SOCEPERM (SOCBASEERR+1) 892 #define SOCESRCH (SOCBASEERR+3) 893 #define SOCEINTR (SOCBASEERR+4) 894 #define SOCENXIO (SOCBASEERR+6) 895 #define SOCEBADF (SOCBASEERR+9) 896 #define SOCEACCES (SOCBASEERR+13) 897 #define SOCEFAULT (SOCBASEERR+14) 898 #define SOCEINVAL (SOCBASEERR+22) 899 #define SOCEMFILE (SOCBASEERR+24) 900 #define SOCEPIPE (SOCBASEERR+32) 901 #define SOCEOS2ERR (SOCBASEERR+100) 902 #define SOCEWOULDBLOCK (SOCBASEERR+35) 903 #define SOCEINPROGRESS (SOCBASEERR+36) 904 #define SOCEALREADY (SOCBASEERR+37) 905 #define SOCENOTSOCK (SOCBASEERR+38) 906 #define SOCEDESTADDRREQ (SOCBASEERR+39) 907 #define SOCEMSGSIZE (SOCBASEERR+40) 908 #define SOCEPROTOTYPE (SOCBASEERR+41) 909 #define SOCENOPROTOOPT (SOCBASEERR+42) 910 #define SOCEPROTONOSUPPORT (SOCBASEERR+43) 911 #define SOCESOCKTNOSUPPORT (SOCBASEERR+44) 912 #define SOCEOPNOTSUPP (SOCBASEERR+45) 913 #define SOCEPFNOSUPPORT (SOCBASEERR+46) 914 #define SOCEAFNOSUPPORT (SOCBASEERR+47) 915 #define SOCEADDRINUSE (SOCBASEERR+48) 916 #define SOCEADDRNOTAVAIL (SOCBASEERR+49) 917 #define SOCENETDOWN (SOCBASEERR+50) 918 #define SOCENETUNREACH (SOCBASEERR+51) 919 #define SOCENETRESET (SOCBASEERR+52) 920 #define SOCECONNABORTED (SOCBASEERR+53) 921 #define SOCECONNRESET (SOCBASEERR+54) 922 #define SOCENOBUFS (SOCBASEERR+55) 923 #define SOCEISCONN (SOCBASEERR+56) 924 #define SOCENOTCONN (SOCBASEERR+57) 925 #define SOCESHUTDOWN (SOCBASEERR+58) 926 #define SOCETOOMANYREFS (SOCBASEERR+59) 927 #define SOCETIMEDOUT (SOCBASEERR+60) 928 #define SOCECONNREFUSED (SOCBASEERR+61) 929 #define SOCELOOP (SOCBASEERR+62) 930 #define SOCENAMETOOLONG (SOCBASEERR+63) 931 #define SOCEHOSTDOWN (SOCBASEERR+64) 932 #define SOCEHOSTUNREACH (SOCBASEERR+65) 933 #define SOCENOTEMPTY (SOCBASEERR+66) 936 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \ 937 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \ 938 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION) 939 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST \ 940 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \ 941 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \ 942 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS \ 943 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED) 944 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG \ 945 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \ 946 || (s) == APR_OS_START_SYSERR + SOCENAMETOOLONG) 947 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 948 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \ 949 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 950 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES \ 951 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED) 952 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 953 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 954 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL) 955 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 956 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE \ 957 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES) 958 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 959 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF \ 960 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE) 961 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \ 962 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \ 963 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION) 964 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE \ 965 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 966 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 967 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \ 968 || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK \ 969 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION) 970 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 971 || (s) == APR_OS_START_SYSERR + SOCEINTR) 972 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 973 || (s) == APR_OS_START_SYSERR + SOCENOTSOCK) 974 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 975 || (s) == APR_OS_START_SYSERR + SOCECONNREFUSED) 976 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 977 || (s) == APR_OS_START_SYSERR + SOCEINPROGRESS) 978 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 979 || (s) == APR_OS_START_SYSERR + SOCECONNABORTED) 980 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 981 || (s) == APR_OS_START_SYSERR + SOCECONNRESET) 983 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 984 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) 985 #undef APR_STATUS_IS_TIMEUP 986 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 987 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) 988 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 989 || (s) == APR_OS_START_SYSERR + SOCEHOSTUNREACH) 990 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 991 || (s) == APR_OS_START_SYSERR + SOCENETUNREACH) 992 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 993 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE \ 994 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE \ 995 || (s) == APR_OS_START_SYSERR + SOCEPIPE) 996 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV \ 997 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE) 998 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \ 999 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY \ 1000 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED) 1001 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_AFNOSUPPORT \ 1002 || (s) == APR_OS_START_SYSERR + SOCEAFNOSUPPORT) 1003 #define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \ 1004 || (s) == APR_OS_START_SYSERR + SOCEOPNOTSUPP) 1005 #define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE) 1006 #define APR_STATUS_IS_EALREADY(s) ((s) == APR_EALREADY \ 1007 || (s) == APR_OS_START_SYSERR + SOCEALREADY) 1036 #elif defined(WIN32) && !defined(DOXYGEN) 1038 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 1039 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 1041 #define apr_get_os_error() (APR_FROM_OS_ERROR(GetLastError())) 1042 #define apr_set_os_error(e) (SetLastError(APR_TO_OS_ERROR(e))) 1046 #define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError())) 1047 #define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e))) 1050 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \ 1051 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \ 1052 || (s) == APR_OS_START_SYSERR + ERROR_CANNOT_MAKE \ 1053 || (s) == APR_OS_START_SYSERR + ERROR_CURRENT_DIRECTORY \ 1054 || (s) == APR_OS_START_SYSERR + ERROR_DRIVE_LOCKED \ 1055 || (s) == APR_OS_START_SYSERR + ERROR_FAIL_I24 \ 1056 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \ 1057 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_FAILED \ 1058 || (s) == APR_OS_START_SYSERR + ERROR_NOT_LOCKED \ 1059 || (s) == APR_OS_START_SYSERR + ERROR_NETWORK_ACCESS_DENIED \ 1060 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION) 1061 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST \ 1062 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \ 1063 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS) 1064 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG \ 1065 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \ 1066 || (s) == APR_OS_START_SYSERR + WSAENAMETOOLONG) 1067 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 1068 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \ 1069 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 1070 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \ 1071 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES) 1072 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR \ 1073 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 1074 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NETPATH \ 1075 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NET_NAME \ 1076 || (s) == APR_OS_START_SYSERR + ERROR_BAD_PATHNAME \ 1077 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DRIVE \ 1078 || (s) == APR_OS_START_SYSERR + ERROR_DIRECTORY) 1079 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 1080 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL) 1081 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM \ 1082 || (s) == APR_OS_START_SYSERR + ERROR_ARENA_TRASHED \ 1083 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_MEMORY \ 1084 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_BLOCK \ 1085 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_QUOTA \ 1086 || (s) == APR_OS_START_SYSERR + ERROR_OUTOFMEMORY) 1087 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE \ 1088 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES) 1089 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 1090 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF \ 1091 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \ 1092 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_TARGET_HANDLE) 1093 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \ 1094 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_ACCESS \ 1095 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DATA \ 1096 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION \ 1097 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \ 1098 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \ 1099 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 1100 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE \ 1101 || (s) == APR_OS_START_SYSERR + ERROR_SEEK_ON_DEVICE \ 1102 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 1103 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 1104 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \ 1105 || (s) == APR_OS_START_SYSERR + ERROR_NO_PROC_SLOTS \ 1106 || (s) == APR_OS_START_SYSERR + ERROR_NESTING_NOT_ALLOWED \ 1107 || (s) == APR_OS_START_SYSERR + ERROR_MAX_THRDS_REACHED \ 1108 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \ 1109 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK) 1110 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 1111 || (s) == APR_OS_START_SYSERR + WSAEINTR) 1112 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 1113 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK) 1114 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 1115 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED) 1116 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 1117 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS) 1118 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 1119 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED) 1120 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 1121 || (s) == APR_OS_START_SYSERR + ERROR_NETNAME_DELETED \ 1122 || (s) == APR_OS_START_SYSERR + WSAECONNRESET) 1124 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 1125 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 1126 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 1127 #undef APR_STATUS_IS_TIMEUP 1128 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 1129 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 1130 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 1131 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 1132 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH) 1133 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 1134 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH) 1135 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE \ 1136 || (s) == APR_OS_START_SYSERR + ERROR_EXE_MACHINE_TYPE_MISMATCH \ 1137 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DLL \ 1138 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_MODULETYPE \ 1139 || (s) == APR_OS_START_SYSERR + ERROR_BAD_EXE_FORMAT \ 1140 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_EXE_SIGNATURE \ 1141 || (s) == APR_OS_START_SYSERR + ERROR_FILE_CORRUPT \ 1142 || (s) == APR_OS_START_SYSERR + ERROR_BAD_FORMAT) 1143 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE \ 1144 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE) 1145 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV \ 1146 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE) 1147 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \ 1148 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY) 1149 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \ 1150 || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT) 1151 #define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \ 1152 || (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP) 1153 #define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE) 1154 #define APR_STATUS_IS_EALREADY(s) ((s) == APR_EALREADY \ 1155 || (s) == APR_OS_START_SYSERR + WSAEALREADY) 1157 #elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) 1159 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 1160 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 1162 #define apr_get_os_error() (errno) 1163 #define apr_set_os_error(e) (errno = (e)) 1166 #define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError())) 1167 #define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e))) 1170 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES) 1171 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST) 1172 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG) 1173 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT) 1174 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 1175 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC) 1176 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 1177 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE) 1178 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 1179 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF) 1180 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL) 1181 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE) 1183 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 1184 || (s) == EWOULDBLOCK \ 1185 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK) 1186 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 1187 || (s) == APR_OS_START_SYSERR + WSAEINTR) 1188 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 1189 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK) 1190 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 1191 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED) 1192 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 1193 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS) 1194 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 1195 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED) 1196 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 1197 || (s) == APR_OS_START_SYSERR + WSAECONNRESET) 1199 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 1200 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 1201 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 1202 #undef APR_STATUS_IS_TIMEUP 1203 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 1204 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 1205 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 1206 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 1207 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH) 1208 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 1209 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH) 1210 #define APR_STATUS_IS_ENETDOWN(s) ((s) == APR_OS_START_SYSERR + WSAENETDOWN) 1211 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 1212 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE) 1213 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV) 1214 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY) 1215 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \ 1216 || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT) 1217 #define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \ 1218 || (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP) 1219 #define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE) 1220 #define APR_STATUS_IS_EALREADY(s) ((s) == APR_EALREADY \ 1221 || (s) == APR_OS_START_SYSERR + WSAEALREADY) 1228 #define APR_FROM_OS_ERROR(e) (e) 1229 #define APR_TO_OS_ERROR(e) (e) 1231 #define apr_get_os_error() (errno) 1232 #define apr_set_os_error(e) (errno = (e)) 1236 #define apr_get_netos_error() (errno) 1237 #define apr_set_netos_error(e) (errno = (e)) 1245 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES) 1247 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST) 1249 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG) 1257 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 1258 || (s) == EMVSCATLG) 1260 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT) 1263 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 1266 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 1269 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC) 1272 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 1274 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE) 1276 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 1278 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF) 1280 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL) 1282 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE) 1285 #if !defined(EWOULDBLOCK) || !defined(EAGAIN) 1286 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 1287 #elif (EWOULDBLOCK == EAGAIN) 1288 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 1290 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 1291 || (s) == EWOULDBLOCK) 1295 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR) 1297 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK) 1299 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED) 1301 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS) 1315 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 1318 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED) 1322 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET) 1325 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT) 1327 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH) 1329 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH) 1331 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 1333 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE) 1335 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV) 1337 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY || \ 1340 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT) 1342 #define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP) 1345 #define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE) 1348 #define APR_STATUS_IS_EALREADY(s) ((s) == APR_EALREADY)
char * apr_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize)
APR Platform Definitions.
#define APR_DECLARE(x)
Definition: macros.h:6
int apr_status_t
Definition: apr_errno.h:44