Apache HTTPD
apr_errno.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef APR_ERRNO_H
18#define APR_ERRNO_H
19
25#include "apr.h"
26
27#if APR_HAVE_ERRNO_H
28#include <errno.h>
29#endif
30
31#ifdef __cplusplus
32extern "C" {
33#endif /* __cplusplus */
34
44typedef int apr_status_t;
45
54
55#if defined(DOXYGEN)
64#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
65
75#define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
76
112#endif /* defined(DOXYGEN) */
113
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)
186
225#define APR_SUCCESS 0
226
288#define APR_ENOSTAT (APR_OS_START_ERROR + 1)
290#define APR_ENOPOOL (APR_OS_START_ERROR + 2)
291/* empty slot: +3 */
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)
320/* empty slot: +18 */
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)
394/* empty slot: +18 */
399#if defined(WIN32)
400#define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN \
401 || APR_TO_OS_ERROR(s) == ERROR_MOD_NOT_FOUND)
402#else
403#define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN)
404#endif
406#define APR_STATUS_IS_EABSOLUTE(s) ((s) == APR_EABSOLUTE)
408#define APR_STATUS_IS_ERELATIVE(s) ((s) == APR_ERELATIVE)
410#define APR_STATUS_IS_EINCOMPLETE(s) ((s) == APR_EINCOMPLETE)
412#define APR_STATUS_IS_EABOVEROOT(s) ((s) == APR_EABOVEROOT)
414#define APR_STATUS_IS_EBADPATH(s) ((s) == APR_EBADPATH)
416#define APR_STATUS_IS_EPATHWILD(s) ((s) == APR_EPATHWILD)
420#if defined(WIN32)
421#define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND \
422 || APR_TO_OS_ERROR(s) == ERROR_PROC_NOT_FOUND)
423#else
424#define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND)
425#endif
427#define APR_STATUS_IS_EPROC_UNKNOWN(s) ((s) == APR_EPROC_UNKNOWN)
429#define APR_STATUS_IS_ENOTENOUGHENTROPY(s) ((s) == APR_ENOTENOUGHENTROPY)
430
438#define APR_INCHILD (APR_OS_START_STATUS + 1)
440#define APR_INPARENT (APR_OS_START_STATUS + 2)
442#define APR_DETACH (APR_OS_START_STATUS + 3)
444#define APR_NOTDETACH (APR_OS_START_STATUS + 4)
446#define APR_CHILD_DONE (APR_OS_START_STATUS + 5)
448#define APR_CHILD_NOTDONE (APR_OS_START_STATUS + 6)
450#define APR_TIMEUP (APR_OS_START_STATUS + 7)
452#define APR_INCOMPLETE (APR_OS_START_STATUS + 8)
453/* empty slot: +9 */
454/* empty slot: +10 */
455/* empty slot: +11 */
457#define APR_BADCH (APR_OS_START_STATUS + 12)
459#define APR_BADARG (APR_OS_START_STATUS + 13)
461#define APR_EOF (APR_OS_START_STATUS + 14)
463#define APR_NOTFOUND (APR_OS_START_STATUS + 15)
464/* empty slot: +16 */
465/* empty slot: +17 */
466/* empty slot: +18 */
468#define APR_ANONYMOUS (APR_OS_START_STATUS + 19)
470#define APR_FILEBASED (APR_OS_START_STATUS + 20)
472#define APR_KEYBASED (APR_OS_START_STATUS + 21)
474#define APR_EINIT (APR_OS_START_STATUS + 22)
476#define APR_ENOTIMPL (APR_OS_START_STATUS + 23)
478#define APR_EMISMATCH (APR_OS_START_STATUS + 24)
480#define APR_EBUSY (APR_OS_START_STATUS + 25)
492#define APR_STATUS_IS_INCHILD(s) ((s) == APR_INCHILD)
499#define APR_STATUS_IS_INPARENT(s) ((s) == APR_INPARENT)
506#define APR_STATUS_IS_DETACH(s) ((s) == APR_DETACH)
513#define APR_STATUS_IS_NOTDETACH(s) ((s) == APR_NOTDETACH)
520#define APR_STATUS_IS_CHILD_DONE(s) ((s) == APR_CHILD_DONE)
527#define APR_STATUS_IS_CHILD_NOTDONE(s) ((s) == APR_CHILD_NOTDONE)
534#define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP)
542#define APR_STATUS_IS_INCOMPLETE(s) ((s) == APR_INCOMPLETE)
543/* empty slot: +9 */
544/* empty slot: +10 */
545/* empty slot: +11 */
552#define APR_STATUS_IS_BADCH(s) ((s) == APR_BADCH)
560#define APR_STATUS_IS_BADARG(s) ((s) == APR_BADARG)
567#define APR_STATUS_IS_EOF(s) ((s) == APR_EOF)
574#define APR_STATUS_IS_NOTFOUND(s) ((s) == APR_NOTFOUND)
575/* empty slot: +16 */
576/* empty slot: +17 */
577/* empty slot: +18 */
584#define APR_STATUS_IS_ANONYMOUS(s) ((s) == APR_ANONYMOUS)
591#define APR_STATUS_IS_FILEBASED(s) ((s) == APR_FILEBASED)
598#define APR_STATUS_IS_KEYBASED(s) ((s) == APR_KEYBASED)
606#define APR_STATUS_IS_EINIT(s) ((s) == APR_EINIT)
615#define APR_STATUS_IS_ENOTIMPL(s) ((s) == APR_ENOTIMPL)
622#define APR_STATUS_IS_EMISMATCH(s) ((s) == APR_EMISMATCH)
628#define APR_STATUS_IS_EBUSY(s) ((s) == APR_EBUSY)
629
636/* APR CANONICAL ERROR VALUES */
638#ifdef EACCES
639#define APR_EACCES EACCES
640#else
641#define APR_EACCES (APR_OS_START_CANONERR + 1)
642#endif
643
645#ifdef EEXIST
646#define APR_EEXIST EEXIST
647#else
648#define APR_EEXIST (APR_OS_START_CANONERR + 2)
649#endif
650
652#ifdef ENAMETOOLONG
653#define APR_ENAMETOOLONG ENAMETOOLONG
654#else
655#define APR_ENAMETOOLONG (APR_OS_START_CANONERR + 3)
656#endif
657
659#ifdef ENOENT
660#define APR_ENOENT ENOENT
661#else
662#define APR_ENOENT (APR_OS_START_CANONERR + 4)
663#endif
664
666#ifdef ENOTDIR
667#define APR_ENOTDIR ENOTDIR
668#else
669#define APR_ENOTDIR (APR_OS_START_CANONERR + 5)
670#endif
671
673#ifdef ENOSPC
674#define APR_ENOSPC ENOSPC
675#else
676#define APR_ENOSPC (APR_OS_START_CANONERR + 6)
677#endif
678
680#ifdef ENOMEM
681#define APR_ENOMEM ENOMEM
682#else
683#define APR_ENOMEM (APR_OS_START_CANONERR + 7)
684#endif
685
687#ifdef EMFILE
688#define APR_EMFILE EMFILE
689#else
690#define APR_EMFILE (APR_OS_START_CANONERR + 8)
691#endif
692
694#ifdef ENFILE
695#define APR_ENFILE ENFILE
696#else
697#define APR_ENFILE (APR_OS_START_CANONERR + 9)
698#endif
699
701#ifdef EBADF
702#define APR_EBADF EBADF
703#else
704#define APR_EBADF (APR_OS_START_CANONERR + 10)
705#endif
706
708#ifdef EINVAL
709#define APR_EINVAL EINVAL
710#else
711#define APR_EINVAL (APR_OS_START_CANONERR + 11)
712#endif
713
715#ifdef ESPIPE
716#define APR_ESPIPE ESPIPE
717#else
718#define APR_ESPIPE (APR_OS_START_CANONERR + 12)
719#endif
720
725#ifdef EAGAIN
726#define APR_EAGAIN EAGAIN
727#elif defined(EWOULDBLOCK)
728#define APR_EAGAIN EWOULDBLOCK
729#else
730#define APR_EAGAIN (APR_OS_START_CANONERR + 13)
731#endif
732
734#ifdef EINTR
735#define APR_EINTR EINTR
736#else
737#define APR_EINTR (APR_OS_START_CANONERR + 14)
738#endif
739
741#ifdef ENOTSOCK
742#define APR_ENOTSOCK ENOTSOCK
743#else
744#define APR_ENOTSOCK (APR_OS_START_CANONERR + 15)
745#endif
746
748#ifdef ECONNREFUSED
749#define APR_ECONNREFUSED ECONNREFUSED
750#else
751#define APR_ECONNREFUSED (APR_OS_START_CANONERR + 16)
752#endif
753
755#ifdef EINPROGRESS
756#define APR_EINPROGRESS EINPROGRESS
757#else
758#define APR_EINPROGRESS (APR_OS_START_CANONERR + 17)
759#endif
760
766#ifdef ECONNABORTED
767#define APR_ECONNABORTED ECONNABORTED
768#else
769#define APR_ECONNABORTED (APR_OS_START_CANONERR + 18)
770#endif
771
773#ifdef ECONNRESET
774#define APR_ECONNRESET ECONNRESET
775#else
776#define APR_ECONNRESET (APR_OS_START_CANONERR + 19)
777#endif
778
781#ifdef ETIMEDOUT
782#define APR_ETIMEDOUT ETIMEDOUT
783#else
784#define APR_ETIMEDOUT (APR_OS_START_CANONERR + 20)
785#endif
786
788#ifdef EHOSTUNREACH
789#define APR_EHOSTUNREACH EHOSTUNREACH
790#else
791#define APR_EHOSTUNREACH (APR_OS_START_CANONERR + 21)
792#endif
793
795#ifdef ENETUNREACH
796#define APR_ENETUNREACH ENETUNREACH
797#else
798#define APR_ENETUNREACH (APR_OS_START_CANONERR + 22)
799#endif
800
802#ifdef EFTYPE
803#define APR_EFTYPE EFTYPE
804#else
805#define APR_EFTYPE (APR_OS_START_CANONERR + 23)
806#endif
807
809#ifdef EPIPE
810#define APR_EPIPE EPIPE
811#else
812#define APR_EPIPE (APR_OS_START_CANONERR + 24)
813#endif
814
816#ifdef EXDEV
817#define APR_EXDEV EXDEV
818#else
819#define APR_EXDEV (APR_OS_START_CANONERR + 25)
820#endif
821
823#ifdef ENOTEMPTY
824#define APR_ENOTEMPTY ENOTEMPTY
825#else
826#define APR_ENOTEMPTY (APR_OS_START_CANONERR + 26)
827#endif
828
830#ifdef EAFNOSUPPORT
831#define APR_EAFNOSUPPORT EAFNOSUPPORT
832#else
833#define APR_EAFNOSUPPORT (APR_OS_START_CANONERR + 27)
834#endif
835
837#ifdef EOPNOTSUPP
838#define APR_EOPNOTSUPP EOPNOTSUPP
839#else
840#define APR_EOPNOTSUPP (APR_OS_START_CANONERR + 28)
841#endif
842
844#ifdef ERANGE
845#define APR_ERANGE ERANGE
846#else
847#define APR_ERANGE (APR_OS_START_CANONERR + 29)
848#endif
849
852#if defined(OS2) && !defined(DOXYGEN)
853
854#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
855#define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
856
857#define INCL_DOSERRORS
858#define INCL_DOS
859
860/* Leave these undefined.
861 * OS2 doesn't rely on the errno concept.
862 * The API calls always return a result codes which
863 * should be filtered through APR_FROM_OS_ERROR().
864 *
865 * #define apr_get_os_error() (APR_FROM_OS_ERROR(GetLastError()))
866 * #define apr_set_os_error(e) (SetLastError(APR_TO_OS_ERROR(e)))
867 */
868
869/* A special case, only socket calls require this;
870 */
871#define apr_get_netos_error() (APR_FROM_OS_ERROR(errno))
872#define apr_set_netos_error(e) (errno = APR_TO_OS_ERROR(e))
873
874/* And this needs to be greped away for good:
875 */
876#define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e))
877
878/* These can't sit in a private header, so in spite of the extra size,
879 * they need to be made available here.
880 */
881#define SOCBASEERR 10000
882#define SOCEPERM (SOCBASEERR+1) /* Not owner */
883#define SOCESRCH (SOCBASEERR+3) /* No such process */
884#define SOCEINTR (SOCBASEERR+4) /* Interrupted system call */
885#define SOCENXIO (SOCBASEERR+6) /* No such device or address */
886#define SOCEBADF (SOCBASEERR+9) /* Bad file number */
887#define SOCEACCES (SOCBASEERR+13) /* Permission denied */
888#define SOCEFAULT (SOCBASEERR+14) /* Bad address */
889#define SOCEINVAL (SOCBASEERR+22) /* Invalid argument */
890#define SOCEMFILE (SOCBASEERR+24) /* Too many open files */
891#define SOCEPIPE (SOCBASEERR+32) /* Broken pipe */
892#define SOCEOS2ERR (SOCBASEERR+100) /* OS/2 Error */
893#define SOCEWOULDBLOCK (SOCBASEERR+35) /* Operation would block */
894#define SOCEINPROGRESS (SOCBASEERR+36) /* Operation now in progress */
895#define SOCEALREADY (SOCBASEERR+37) /* Operation already in progress */
896#define SOCENOTSOCK (SOCBASEERR+38) /* Socket operation on non-socket */
897#define SOCEDESTADDRREQ (SOCBASEERR+39) /* Destination address required */
898#define SOCEMSGSIZE (SOCBASEERR+40) /* Message too long */
899#define SOCEPROTOTYPE (SOCBASEERR+41) /* Protocol wrong type for socket */
900#define SOCENOPROTOOPT (SOCBASEERR+42) /* Protocol not available */
901#define SOCEPROTONOSUPPORT (SOCBASEERR+43) /* Protocol not supported */
902#define SOCESOCKTNOSUPPORT (SOCBASEERR+44) /* Socket type not supported */
903#define SOCEOPNOTSUPP (SOCBASEERR+45) /* Operation not supported on socket */
904#define SOCEPFNOSUPPORT (SOCBASEERR+46) /* Protocol family not supported */
905#define SOCEAFNOSUPPORT (SOCBASEERR+47) /* Address family not supported by protocol family */
906#define SOCEADDRINUSE (SOCBASEERR+48) /* Address already in use */
907#define SOCEADDRNOTAVAIL (SOCBASEERR+49) /* Can't assign requested address */
908#define SOCENETDOWN (SOCBASEERR+50) /* Network is down */
909#define SOCENETUNREACH (SOCBASEERR+51) /* Network is unreachable */
910#define SOCENETRESET (SOCBASEERR+52) /* Network dropped connection on reset */
911#define SOCECONNABORTED (SOCBASEERR+53) /* Software caused connection abort */
912#define SOCECONNRESET (SOCBASEERR+54) /* Connection reset by peer */
913#define SOCENOBUFS (SOCBASEERR+55) /* No buffer space available */
914#define SOCEISCONN (SOCBASEERR+56) /* Socket is already connected */
915#define SOCENOTCONN (SOCBASEERR+57) /* Socket is not connected */
916#define SOCESHUTDOWN (SOCBASEERR+58) /* Can't send after socket shutdown */
917#define SOCETOOMANYREFS (SOCBASEERR+59) /* Too many references: can't splice */
918#define SOCETIMEDOUT (SOCBASEERR+60) /* Connection timed out */
919#define SOCECONNREFUSED (SOCBASEERR+61) /* Connection refused */
920#define SOCELOOP (SOCBASEERR+62) /* Too many levels of symbolic links */
921#define SOCENAMETOOLONG (SOCBASEERR+63) /* File name too long */
922#define SOCEHOSTDOWN (SOCBASEERR+64) /* Host is down */
923#define SOCEHOSTUNREACH (SOCBASEERR+65) /* No route to host */
924#define SOCENOTEMPTY (SOCBASEERR+66) /* Directory not empty */
925
926/* APR CANONICAL ERROR TESTS */
927#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \
928 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \
929 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION)
930#define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST \
931 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \
932 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \
933 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS \
934 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED)
935#define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG \
936 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \
937 || (s) == APR_OS_START_SYSERR + SOCENAMETOOLONG)
938#define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \
939 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \
940 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \
941 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES \
942 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED)
943#define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR)
944#define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \
945 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL)
946#define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM)
947#define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE \
948 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES)
949#define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE)
950#define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF \
951 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE)
952#define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \
953 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \
954 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION)
955#define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE \
956 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)
957#define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \
958 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \
959 || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK \
960 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION)
961#define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \
962 || (s) == APR_OS_START_SYSERR + SOCEINTR)
963#define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \
964 || (s) == APR_OS_START_SYSERR + SOCENOTSOCK)
965#define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \
966 || (s) == APR_OS_START_SYSERR + SOCECONNREFUSED)
967#define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \
968 || (s) == APR_OS_START_SYSERR + SOCEINPROGRESS)
969#define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \
970 || (s) == APR_OS_START_SYSERR + SOCECONNABORTED)
971#define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \
972 || (s) == APR_OS_START_SYSERR + SOCECONNRESET)
973/* XXX deprecated */
974#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \
975 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT)
976#undef APR_STATUS_IS_TIMEUP
977#define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \
978 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT)
979#define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \
980 || (s) == APR_OS_START_SYSERR + SOCEHOSTUNREACH)
981#define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \
982 || (s) == APR_OS_START_SYSERR + SOCENETUNREACH)
983#define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE)
984#define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE \
985 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE \
986 || (s) == APR_OS_START_SYSERR + SOCEPIPE)
987#define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV \
988 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE)
989#define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \
990 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY \
991 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED)
992#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_AFNOSUPPORT \
993 || (s) == APR_OS_START_SYSERR + SOCEAFNOSUPPORT)
994#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
995 || (s) == APR_OS_START_SYSERR + SOCEOPNOTSUPP)
996#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
997
998/*
999 Sorry, too tired to wrap this up for OS2... feel free to
1000 fit the following into their best matches.
1001
1002 { ERROR_NO_SIGNAL_SENT, ESRCH },
1003 { SOCEALREADY, EALREADY },
1004 { SOCEDESTADDRREQ, EDESTADDRREQ },
1005 { SOCEMSGSIZE, EMSGSIZE },
1006 { SOCEPROTOTYPE, EPROTOTYPE },
1007 { SOCENOPROTOOPT, ENOPROTOOPT },
1008 { SOCEPROTONOSUPPORT, EPROTONOSUPPORT },
1009 { SOCESOCKTNOSUPPORT, ESOCKTNOSUPPORT },
1010 { SOCEPFNOSUPPORT, EPFNOSUPPORT },
1011 { SOCEADDRINUSE, EADDRINUSE },
1012 { SOCEADDRNOTAVAIL, EADDRNOTAVAIL },
1013 { SOCENETDOWN, ENETDOWN },
1014 { SOCENETRESET, ENETRESET },
1015 { SOCENOBUFS, ENOBUFS },
1016 { SOCEISCONN, EISCONN },
1017 { SOCENOTCONN, ENOTCONN },
1018 { SOCESHUTDOWN, ESHUTDOWN },
1019 { SOCETOOMANYREFS, ETOOMANYREFS },
1020 { SOCELOOP, ELOOP },
1021 { SOCEHOSTDOWN, EHOSTDOWN },
1022 { SOCENOTEMPTY, ENOTEMPTY },
1023 { SOCEPIPE, EPIPE }
1024*/
1025
1026#elif defined(WIN32) && !defined(DOXYGEN) /* !defined(OS2) */
1027
1028#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
1029#define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
1030
1031#define apr_get_os_error() (APR_FROM_OS_ERROR(GetLastError()))
1032#define apr_set_os_error(e) (SetLastError(APR_TO_OS_ERROR(e)))
1033
1034/* A special case, only socket calls require this:
1035 */
1036#define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError()))
1037#define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e)))
1038
1039/* APR CANONICAL ERROR TESTS */
1040#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \
1041 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \
1042 || (s) == APR_OS_START_SYSERR + ERROR_CANNOT_MAKE \
1043 || (s) == APR_OS_START_SYSERR + ERROR_CURRENT_DIRECTORY \
1044 || (s) == APR_OS_START_SYSERR + ERROR_DRIVE_LOCKED \
1045 || (s) == APR_OS_START_SYSERR + ERROR_FAIL_I24 \
1046 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \
1047 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_FAILED \
1048 || (s) == APR_OS_START_SYSERR + ERROR_NOT_LOCKED \
1049 || (s) == APR_OS_START_SYSERR + ERROR_NETWORK_ACCESS_DENIED \
1050 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION)
1051#define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST \
1052 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \
1053 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS)
1054#define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG \
1055 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \
1056 || (s) == APR_OS_START_SYSERR + WSAENAMETOOLONG)
1057#define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \
1058 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \
1059 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \
1060 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \
1061 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES)
1062#define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR \
1063 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \
1064 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NETPATH \
1065 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NET_NAME \
1066 || (s) == APR_OS_START_SYSERR + ERROR_BAD_PATHNAME \
1067 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DRIVE \
1068 || (s) == APR_OS_START_SYSERR + ERROR_DIRECTORY)
1069#define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \
1070 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL)
1071#define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM \
1072 || (s) == APR_OS_START_SYSERR + ERROR_ARENA_TRASHED \
1073 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_MEMORY \
1074 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_BLOCK \
1075 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_QUOTA \
1076 || (s) == APR_OS_START_SYSERR + ERROR_OUTOFMEMORY)
1077#define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE \
1078 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES)
1079#define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE)
1080#define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF \
1081 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \
1082 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_TARGET_HANDLE)
1083#define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \
1084 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_ACCESS \
1085 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DATA \
1086 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION \
1087 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \
1088 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \
1089 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)
1090#define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE \
1091 || (s) == APR_OS_START_SYSERR + ERROR_SEEK_ON_DEVICE \
1092 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)
1093#define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \
1094 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \
1095 || (s) == APR_OS_START_SYSERR + ERROR_NO_PROC_SLOTS \
1096 || (s) == APR_OS_START_SYSERR + ERROR_NESTING_NOT_ALLOWED \
1097 || (s) == APR_OS_START_SYSERR + ERROR_MAX_THRDS_REACHED \
1098 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \
1099 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK)
1100#define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \
1101 || (s) == APR_OS_START_SYSERR + WSAEINTR)
1102#define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \
1103 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK)
1104#define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \
1105 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED)
1106#define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \
1107 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS)
1108#define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \
1109 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED)
1110#define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \
1111 || (s) == APR_OS_START_SYSERR + ERROR_NETNAME_DELETED \
1112 || (s) == APR_OS_START_SYSERR + WSAECONNRESET)
1113/* XXX deprecated */
1114#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \
1115 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \
1116 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)
1117#undef APR_STATUS_IS_TIMEUP
1118#define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \
1119 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \
1120 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)
1121#define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \
1122 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH)
1123#define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \
1124 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH)
1125#define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE \
1126 || (s) == APR_OS_START_SYSERR + ERROR_EXE_MACHINE_TYPE_MISMATCH \
1127 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DLL \
1128 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_MODULETYPE \
1129 || (s) == APR_OS_START_SYSERR + ERROR_BAD_EXE_FORMAT \
1130 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_EXE_SIGNATURE \
1131 || (s) == APR_OS_START_SYSERR + ERROR_FILE_CORRUPT \
1132 || (s) == APR_OS_START_SYSERR + ERROR_BAD_FORMAT)
1133#define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE \
1134 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE)
1135#define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV \
1136 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE)
1137#define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \
1138 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY)
1139#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \
1140 || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)
1141#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
1142 || (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP)
1143#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
1144
1145#elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */
1146
1147#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
1148#define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
1149
1150#define apr_get_os_error() (errno)
1151#define apr_set_os_error(e) (errno = (e))
1152
1153/* A special case, only socket calls require this: */
1154#define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError()))
1155#define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e)))
1156
1157/* APR CANONICAL ERROR TESTS */
1158#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES)
1159#define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST)
1160#define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG)
1161#define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT)
1162#define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR)
1163#define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC)
1164#define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM)
1165#define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE)
1166#define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE)
1167#define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF)
1168#define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL)
1169#define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE)
1170
1171#define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \
1172 || (s) == EWOULDBLOCK \
1173 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK)
1174#define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \
1175 || (s) == APR_OS_START_SYSERR + WSAEINTR)
1176#define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \
1177 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK)
1178#define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \
1179 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED)
1180#define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \
1181 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS)
1182#define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \
1183 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED)
1184#define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \
1185 || (s) == APR_OS_START_SYSERR + WSAECONNRESET)
1186/* XXX deprecated */
1187#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \
1188 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \
1189 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)
1190#undef APR_STATUS_IS_TIMEUP
1191#define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \
1192 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \
1193 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)
1194#define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \
1195 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH)
1196#define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \
1197 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH)
1198#define APR_STATUS_IS_ENETDOWN(s) ((s) == APR_OS_START_SYSERR + WSAENETDOWN)
1199#define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE)
1200#define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE)
1201#define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV)
1202#define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY)
1203#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \
1204 || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)
1205#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
1206 || (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP)
1207#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
1208
1209#else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
1210
1211/*
1212 * os error codes are clib error codes
1213 */
1214#define APR_FROM_OS_ERROR(e) (e)
1215#define APR_TO_OS_ERROR(e) (e)
1216
1217#define apr_get_os_error() (errno)
1218#define apr_set_os_error(e) (errno = (e))
1219
1220/* A special case, only socket calls require this:
1221 */
1222#define apr_get_netos_error() (errno)
1223#define apr_set_netos_error(e) (errno = (e))
1224
1231#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES)
1233#define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST)
1235#define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG)
1242#ifdef EMVSCATLG
1243#define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \
1244 || (s) == EMVSCATLG)
1245#else
1246#define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT)
1247#endif
1249#define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR)
1251#ifdef EDQUOT
1252#define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \
1253 || (s) == EDQUOT)
1254#else
1255#define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC)
1256#endif
1258#define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM)
1260#define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE)
1262#define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE)
1264#define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF)
1266#define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL)
1268#define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE)
1269
1271#if !defined(EWOULDBLOCK) || !defined(EAGAIN)
1272#define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN)
1273#elif (EWOULDBLOCK == EAGAIN)
1274#define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN)
1275#else
1276#define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \
1277 || (s) == EWOULDBLOCK)
1278#endif
1279
1281#define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR)
1283#define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK)
1285#define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED)
1287#define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS)
1288
1300#ifdef EPROTO
1301#define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \
1302 || (s) == EPROTO)
1303#else
1304#define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED)
1305#endif
1306
1308#define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET)
1311#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT)
1313#define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH)
1315#define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH)
1317#define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE)
1319#define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE)
1321#define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV)
1323#define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY || \
1324 (s) == APR_EEXIST)
1326#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT)
1328#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP)
1329
1331#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
1334#endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
1335
1338#ifdef __cplusplus
1339}
1340#endif
1341
1342#endif /* ! APR_ERRNO_H */
const void apr_status_t(*) apr_status_t(* APR_DECLARE)(void) apr_pool_pre_cleanup_register(apr_pool_t *p
Definition apr_pools.h:646
apr_size_t size
char * buf
Definition apr_errno.h:52
char apr_size_t bufsize
Definition apr_errno.h:53
int apr_status_t
Definition apr_errno.h:44