diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/apr.h.in | 1 | ||||
-rw-r--r-- | include/apr.hw | 5 | ||||
-rw-r--r-- | include/apr_want.h | 18 |
3 files changed, 20 insertions, 4 deletions
diff --git a/include/apr.h.in b/include/apr.h.in index f28c908e3..38ab2aef1 100644 --- a/include/apr.h.in +++ b/include/apr.h.in @@ -220,6 +220,7 @@ extern "C" { #define APR_HAVE_STRUCT_RLIMIT @struct_rlimit@ #define APR_HAVE_UNION_SEMUN @have_union_semun@ #define APR_HAVE_SCTP @have_sctp@ +#define APR_HAVE_IOVEC @have_iovec@ /* APR Feature Macros */ #define APR_HAS_SHARED_MEMORY @sharedmem@ diff --git a/include/apr.hw b/include/apr.hw index b27b5e2bb..3a33ad177 100644 --- a/include/apr.hw +++ b/include/apr.hw @@ -487,10 +487,7 @@ typedef int gid_t; typedef int apr_wait_t; /* struct iovec is needed to emulate Unix writev */ -struct iovec { - char* iov_base; - apr_size_t iov_len; -}; +#define APR_HAVE_IOVEC 0 /* Nasty Win32 .h ommissions we really need */ #define STDIN_FILENO 0 diff --git a/include/apr_want.h b/include/apr_want.h index c7556a792..b0da0a0c9 100644 --- a/include/apr_want.h +++ b/include/apr_want.h @@ -81,10 +81,28 @@ #ifdef APR_WANT_IOVEC +#if APR_HAVE_IOVEC + #if APR_HAVE_SYS_UIO_H #include <sys/uio.h> #endif +#else + +struct iovec +{ + char *iov_base; + int iov_len; +}; + +#endif + +/* apr_want is included at several layers; redefining APR_HAVE_IOVEC + * now to ensure that our struct is not introduced several times. + */ +#undef APR_HAVE_IOVEC +#define APR_HAVE_IOVEC 1 + #undef APR_WANT_IOVEC #endif |