apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r421075 - in /apr/apr/trunk: configure.in include/apr.h.in include/apr.hw include/apr_want.h
Date Wed, 12 Jul 2006 02:09:06 GMT
Author: jerenkrantz
Date: Tue Jul 11 19:09:05 2006
New Revision: 421075

URL: http://svn.apache.org/viewvc?rev=421075&view=rev
Log:
Define struct iovec for mingw.

This patch also moves the iovec 'workaround' from apr.hw into apr_want.h too.

Originally titled: [patch 09/17] struct iovec

Submitted by: John Mark Vandenberg
Reviewed by: Justin Erenkrantz

Modified:
    apr/apr/trunk/configure.in
    apr/apr/trunk/include/apr.h.in
    apr/apr/trunk/include/apr.hw
    apr/apr/trunk/include/apr_want.h

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?rev=421075&r1=421074&r2=421075&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Tue Jul 11 19:09:05 2006
@@ -1406,6 +1406,13 @@
         ;;
 esac
 
+APR_CHECK_SIZEOF_EXTENDED([#include <sys/uio.h>],struct iovec,0)
+if test "$ac_cv_sizeof_struct_iovec" = "0"; then
+    have_iovec=0
+else
+    have_iovec=1
+fi
+
 AC_SUBST(voidp_size)
 AC_SUBST(short_value)
 AC_SUBST(int_value)
@@ -1427,6 +1434,7 @@
 AC_SUBST(stdint) 
 AC_SUBST(bigendian)
 AC_SUBST(aprlfs)
+AC_SUBST(have_iovec)
 
 dnl ----------------------------- Checking for string functions
 AC_CHECK_FUNCS(strnicmp, have_strnicmp="1", have_strnicmp="0")

Modified: apr/apr/trunk/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.h.in?rev=421075&r1=421074&r2=421075&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.h.in (original)
+++ apr/apr/trunk/include/apr.h.in Tue Jul 11 19:09:05 2006
@@ -220,6 +220,7 @@
 #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@

Modified: apr/apr/trunk/include/apr.hw
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.hw?rev=421075&r1=421074&r2=421075&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.hw (original)
+++ apr/apr/trunk/include/apr.hw Tue Jul 11 19:09:05 2006
@@ -487,10 +487,7 @@
 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

Modified: apr/apr/trunk/include/apr_want.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_want.h?rev=421075&r1=421074&r2=421075&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_want.h (original)
+++ apr/apr/trunk/include/apr_want.h Tue Jul 11 19:09:05 2006
@@ -81,9 +81,27 @@
 
 #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



Mime
View raw message