From 6c32fe5207c4baab12212e9d53b80b41986ed1d7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 22 Feb 2011 21:24:39 +0100 Subject: s3-waf: add check for sendfile on hpux. Guenther --- source3/wscript | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/source3/wscript b/source3/wscript index 99dcb5d9f0..8892c461c0 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1366,6 +1366,43 @@ main() { conf.DEFINE('HAVE_SENDFILE', '1') conf.DEFINE('FREEBSD_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') + elif (host_os.rfind('hpux') > -1): + conf.CHECK_CODE(''' + #include + #include + 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); + ''', + '_HAVE_SENDFILE64', + msg='Checking for hpux sendfile64 support') + conf.CHECK_CODE(''' + #include + #include + 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); + ''', + '_HAVE_SENDFILE', + msg='Checking for hpux sendfile support') + if conf.CONFIG_SET('_HAVE_SENDFILE64'): + conf.DEFINE('HAVE_SENDFILE64', '1') + conf.DEFINE('HPUX_SENDFILE_API', '1') + conf.DEFINE('WITH_SENDFILE', '1') + elif conf.CONFIG_SET('_HAVE_SENDFILE'): + conf.DEFINE('HAVE_SENDFILE', '1') + conf.DEFINE('HPUX_SENDFILE_API', '1') + conf.DEFINE('WITH_SENDFILE', '1') default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam auth_sam auth_unix auth_winbind auth_wbc auth_server -- cgit