diff options
author | Günther Deschner <gd@samba.org> | 2011-02-22 21:24:39 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-22 21:52:19 +0100 |
commit | 6c32fe5207c4baab12212e9d53b80b41986ed1d7 (patch) | |
tree | c1638a34ee03f8b92f4050ea82c243c0d64d2d68 /source3/wscript | |
parent | 2babc4fcf47ad865e301ce22cceff4e0b0429de9 (diff) | |
download | samba-6c32fe5207c4baab12212e9d53b80b41986ed1d7.tar.gz samba-6c32fe5207c4baab12212e9d53b80b41986ed1d7.tar.xz samba-6c32fe5207c4baab12212e9d53b80b41986ed1d7.zip |
s3-waf: add check for sendfile on hpux.
Guenther
Diffstat (limited to 'source3/wscript')
-rw-r--r-- | source3/wscript | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript index 99dcb5d9f03..8892c461c02 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 <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); + ''', + '_HAVE_SENDFILE64', + msg='Checking for hpux sendfile64 support') + conf.CHECK_CODE(''' + #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); + ''', + '_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 |