changeset 411:c2fdc076ae7f HEAD

checks for writev()
author Timo Sirainen <tss@iki.fi>
date Mon, 14 Oct 2002 03:27:42 +0300
parents 1f0e7229ee58
children 79280b4912ff
files acconfig.h configure.in
diffstat 2 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/acconfig.h	Mon Oct 14 02:49:11 2002 +0300
+++ b/acconfig.h	Mon Oct 14 03:27:42 2002 +0300
@@ -7,6 +7,9 @@
 /* Define if you have struct tm->tm_gmtoff */
 #undef HAVE_TM_GMTOFF
 
+/* Define if you have struct iovec */
+#undef HAVE_STRUCT_IOVEC
+
 #undef USERINFO_PASSWD
 #undef USERINFO_PASSWD_FILE
 #undef USERINFO_SHADOW
--- a/configure.in	Mon Oct 14 02:49:11 2002 +0300
+++ b/configure.in	Mon Oct 14 03:27:42 2002 +0300
@@ -14,7 +14,7 @@
 AM_PROG_LIBTOOL
 
 AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h)
-AC_CHECK_HEADERS(sys/sendfile.h linux/mman.h)
+AC_CHECK_HEADERS(sys/uio.h sys/sendfile.h linux/mman.h)
 
 # check posix headers
 AC_CHECK_HEADERS(sys/time.h)
@@ -106,7 +106,7 @@
 
 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them
 AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise setreuid)
-AC_CHECK_FUNCS(strcasecmp stricmp vsnprintf memmove vsyslog)
+AC_CHECK_FUNCS(strcasecmp stricmp vsnprintf memmove vsyslog writev)
 
 dnl * poll/select?
 
@@ -252,6 +252,22 @@
 fi
 AC_MSG_RESULT($i_cv_field_tm_gmtoff)
 
+dnl * do we have struct iovec
+AC_MSG_CHECKING([for struct iovec])
+AC_CACHE_VAL(i_cv_struct_iovec,
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <unistd.h>],
+[struct iovec *iovec;],
+i_cv_struct_iovec=yes,
+i_cv_struct_iovec=no)])
+
+if test $i_cv_struct_iovec = yes; then
+	AC_DEFINE(HAVE_STRUCT_IOVEC)
+fi
+AC_MSG_RESULT($i_cv_struct_iovec)
+
 dnl * linux compatible mremap()
 AC_MSG_CHECKING([linux compatible mremap()])
 AC_TRY_RUN([