Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 47254 invoked from network); 15 Apr 2006 01:34:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Apr 2006 01:34:26 -0000 Received: (qmail 90931 invoked by uid 500); 15 Apr 2006 01:34:15 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 90652 invoked by uid 500); 15 Apr 2006 01:34:14 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 90092 invoked by uid 99); 15 Apr 2006 01:34:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Apr 2006 18:34:12 -0700 X-ASF-Spam-Status: No, hits=3.1 required=10.0 tests=INVALID_MSGID,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 128.184.134.6 is neither permitted nor denied by domain of jayvdb@gmail.com) Received: from [128.184.134.6] (HELO hygeia.its.deakin.edu.au) (128.184.134.6) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Apr 2006 18:34:11 -0700 Received: from hygeia.its.deakin.edu.au (localhost.localdomain [127.0.0.1]) by hygeia.its.deakin.edu.au (Postfix) with ESMTP id EEE8C73936; Sat, 15 Apr 2006 11:44:50 +1000 (EST) Received: (from johnv@localhost) by hygeia.its.deakin.edu.au (8.13.1/8.13.1/Submit) id k3F1iotC009910; Sat, 15 Apr 2006 11:44:50 +1000 X-Authentication-Warning: hygeia.its.deakin.edu.au: johnv set sender to John Mark Vandenberg using -f Message-Id: <20060415014450.831137000@gmail.com>> References: <20060415014118.424412000@gmail.com>> User-Agent: quilt/0.44-1 Date: Sat, 15 Apr 2006 11:41:27 +1000 From: John Mark Vandenberg To: dev@apr.apache.org Cc: davi@haxent.com.br Subject: [patch 09/17] struct iovec Content-Disposition: inline; filename=win32api-iovec.patch X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N struct iovec is needed to emulate Unix writev. This patch moves the workaround from apr.hw to apr_want.h to it can be shared by any platform without it. AC_CHECK_TYPE has problems determining whether this type exists. The change to build/apr_common.m4 allows APR_CHECK_SIZEOF_EXTENDED to be called with a space in the argument. Index: configure.in =================================================================== --- configure.in.orig +++ configure.in @@ -1438,6 +1438,14 @@ case $host in ;; esac +APR_CHECK_SIZEOF_EXTENDED([#include ],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) @@ -1459,6 +1467,7 @@ AC_SUBST(uint64_literal) 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") Index: include/apr.h.in =================================================================== --- include/apr.h.in.orig +++ 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@ Index: include/apr_want.h =================================================================== --- include/apr_want.h.orig +++ include/apr_want.h @@ -81,10 +81,28 @@ #ifdef APR_WANT_IOVEC +#if APR_HAVE_IOVEC + #if APR_HAVE_SYS_UIO_H #include #endif +#else + +struct iovec +{ + char *iov_base; + int iov_len; +}; + +#endif + +/* apr_want is included at several layers; redefining APR_HAVE_IOVEC + * to ensure struct is not introduced several times + */ +#undef APR_HAVE_IOVEC +#define APR_HAVE_IOVEC 1 + #undef APR_WANT_IOVEC #endif Index: build/apr_common.m4 =================================================================== --- build/apr_common.m4.orig +++ build/apr_common.m4 @@ -446,9 +446,9 @@ dnl AC_DEFUN([APR_CHECK_SIZEOF_EXTENDED], [changequote(<<,>>)dnl dnl The name to #define -define(<>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl +define(<>, translit(sizeof_$2, [a-z ], [A-Z_]))dnl dnl The cache variable -define(<>, translit(ac_cv_sizeof_$2, [ *],[

]))dnl +define(<>, translit(ac_cv_sizeof_$2, [A-Z ],[a-z_]))dnl changequote([, ])dnl AC_MSG_CHECKING(size of $2) AC_CACHE_VAL(AC_CV_NAME, Index: include/apr.hw =================================================================== --- include/apr.hw.orig +++ 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 --