summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-12-20 22:33:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:42 -0500
commitbe60bf64478261a642b5636669c7a8fc92b7b13d (patch)
treebb4bf2e5872a5038ede646a7edf96506b6de0219 /source3/configure.in
parent52d377b75f7740b529c337c2e8585826246bc148 (diff)
downloadsamba-be60bf64478261a642b5636669c7a8fc92b7b13d.tar.gz
samba-be60bf64478261a642b5636669c7a8fc92b7b13d.tar.bz2
samba-be60bf64478261a642b5636669c7a8fc92b7b13d.zip
r4296: Patch from William Jojo <jojowil@hvcc.edu> to fix HPUX sendfile and add
configure.in tests and code for sendfile on AIX. Jeremy. (This used to be commit f08aceb9882fb1df1e1e28179f87ac5c3d5afa45)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 09586adcd6..3530015110 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4239,7 +4239,36 @@ samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)])
AC_MSG_RESULT(no);
fi
;;
+ *aix*)
+ AC_CACHE_CHECK([for AIX send_file support],samba_cv_HAVE_SENDFILE,[
+ AC_TRY_LINK([\
+#include <sys/socket.h>],
+[\
+ int fromfd, tofd;
+ size_t total=0;
+ struct sf_parms hdtrl;
+ ssize_t nwritten;
+ off64_t offset;
+
+ hdtrl.header_data = 0;
+ hdtrl.header_length = 0;
+ hdtrl.file_descriptor = fromfd;
+ hdtrl.file_offset = 0;
+ hdtrl.file_bytes = 0;
+ hdtrl.trailer_data = 0;
+ hdtrl.trailer_length = 0;
+ nwritten = send_file(&tofd, &hdtrl, 0);
+],
+samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)])
+ if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
+ AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available])
+ AC_DEFINE(AIX_SENDFILE_API,1,[Whether the AIX send_file() API is available])
+ AC_DEFINE(WITH_SENDFILE,1,[Whether to include sendfile() support])
+ else
+ AC_MSG_RESULT(no);
+ fi
+ ;;
*)
;;
esac