diff options
author | Jeremy Allison <jra@samba.org> | 2002-09-18 20:07:56 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-09-18 20:07:56 +0000 |
commit | 994638f577d2d0df8f5f185fd96d4448dcd9d7e5 (patch) | |
tree | 40249f238acb7f0aaa629622002e0f9486157654 /source3/configure.in | |
parent | aad3c35ac1197a70c04eccaf7d4fee804a210954 (diff) | |
download | samba-994638f577d2d0df8f5f185fd96d4448dcd9d7e5.tar.gz samba-994638f577d2d0df8f5f185fd96d4448dcd9d7e5.tar.bz2 samba-994638f577d2d0df8f5f185fd96d4448dcd9d7e5.zip |
HPUX sendfile is now detected correctly.
Jeremy.
(This used to be commit 91e41ebe97c143f413e2a5614b20f3db4642490f)
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in index ef25ba4fed..d53886bc65 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2793,7 +2793,61 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) AC_MSG_RESULT(no); fi ;; - *) + + *hpux*) + AC_CACHE_CHECK([for hpux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ + AC_TRY_LINK([\ +#include <sys/socket.h> +#include <sys/uio.h>], +[\ + int fromfd, tofd; + size_t total=0; + struct iovec hdtrl[2]; + ssize_t nwritten; + off64_t offset; + + hdtrl[0].iov_base = 0; + hdtrl[0].iov_len = 0; + + nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0); +], +samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) + if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then + AC_DEFINE(HAVE_SENDFILE64) + AC_DEFINE(HPUX_SENDFILE_API) + AC_DEFINE(WITH_SENDFILE) + else + AC_MSG_RESULT(no); + fi + + AC_CACHE_CHECK([for hpux sendfile support],samba_cv_HAVE_SENDFILE,[ + AC_TRY_LINK([\ +#include <sys/socket.h> +#include <sys/uio.h>], +[\ + int fromfd, tofd; + size_t total=0; + struct iovec hdtrl[2]; + ssize_t nwritten; + off_t offset; + + hdtrl[0].iov_base = 0; + hdtrl[0].iov_len = 0; + + nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 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) + AC_DEFINE(HPUX_SENDFILE_API) + AC_DEFINE(WITH_SENDFILE) + else + AC_MSG_RESULT(no); + fi + + ;; + + *) ;; esac ;; |