[dovecot-cvs] dovecot acconfig.h,1.8,1.9 configure.in,1.35,1.36

cras at procontrol.fi cras at procontrol.fi
Mon Oct 28 05:35:07 EET 2002


Update of /home/cvs/dovecot
In directory danu:/tmp/cvs-serv6761

Modified Files:
	acconfig.h configure.in 
Log Message:
Support FreeBSD-compatible sendfile(). Completely untested.



Index: acconfig.h
===================================================================
RCS file: /home/cvs/dovecot/acconfig.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- acconfig.h	24 Oct 2002 00:34:20 -0000	1.8
+++ acconfig.h	28 Oct 2002 03:35:05 -0000	1.9
@@ -53,5 +53,11 @@
 /* Define if you have Linux-compatible mremap() */
 #undef HAVE_LINUX_MREMAP
 
+/* Define if you have Linux-compatible sendfile() */
+#undef HAVE_LINUX_SENDFILE
+
+/* Define if you have FreeBSD-compatible sendfile() */
+#undef HAVE_FREEBSD_SENDFILE
+
 /* Define if you have fdatasync() */
 #undef HAVE_FDATASYNC

Index: configure.in
===================================================================
RCS file: /home/cvs/dovecot/configure.in,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- configure.in	24 Oct 2002 00:34:20 -0000	1.35
+++ configure.in	28 Oct 2002 03:35:05 -0000	1.36
@@ -14,7 +14,7 @@
 AM_PROG_LIBTOOL
 
 AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h)
-AC_CHECK_HEADERS(sys/uio.h sys/sendfile.h linux/mman.h)
+AC_CHECK_HEADERS(sys/uio.h linux/mman.h)
 
 # check posix headers
 AC_CHECK_HEADERS(sys/time.h)
@@ -280,8 +280,8 @@
 fi
 AC_MSG_RESULT($i_cv_struct_iovec)
 
-dnl * linux compatible mremap()
-AC_MSG_CHECKING([linux compatible mremap()])
+dnl * Linux compatible mremap()
+AC_MSG_CHECKING([Linux compatible mremap()])
 AC_TRY_RUN([
   #include <unistd.h>
   #define __USE_GNU
@@ -289,6 +289,32 @@
   int main() { mremap(0, 0, 0, MREMAP_MAYMOVE); }
 ], [
   AC_DEFINE(HAVE_LINUX_MREMAP)
+  AC_MSG_RESULT(yes)
+], [
+  AC_MSG_RESULT(no)
+])
+
+dnl * Linux compatible sendfile()
+AC_MSG_CHECKING([Linux compatible sendfile()])
+AC_TRY_RUN([
+  #include <sys/sendfile.h>
+  int main() { sendfile(0, 0, (void *) 0, 0); }
+], [
+  AC_DEFINE(HAVE_LINUX_SENDFILE)
+  AC_MSG_RESULT(yes)
+], [
+  AC_MSG_RESULT(no)
+])
+
+dnl * FreeBSD compatible sendfile()
+AC_MSG_CHECKING([FreeBSD compatible sendfile()])
+AC_TRY_RUN([
+  #include <sys/types.h>
+  #include <sys/socket.h>
+  #include <sys/uio.h>
+  int main() { sendfile(0, 0, 0, 0, (void *) 0, (void *) 0, 0); }
+], [
+  AC_DEFINE(HAVE_FREEBSD_SENDFILE)
   AC_MSG_RESULT(yes)
 ], [
   AC_MSG_RESULT(no)




More information about the dovecot-cvs mailing list