diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 348 | ||||
-rw-r--r-- | source3/wscript | 176 |
2 files changed, 38 insertions, 486 deletions
diff --git a/source3/configure.in b/source3/configure.in index 74c962652f..3c7ed6f125 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -957,14 +957,12 @@ AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid) AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf) AC_CHECK_FUNCS(getgrset) -AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64) -AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64) -AC_CHECK_FUNCS(fallocate fallocate64) -AC_CHECK_FUNCS(fseeko fseek64 fseeko64 ftell64 ftello64 setluid getpwanam) -AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64) -AC_CHECK_FUNCS(fdopendir fdopendir64) +AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf) +AC_CHECK_FUNCS(atexit grantpt posix_fallocate) +AC_CHECK_FUNCS(fallocate) +AC_CHECK_FUNCS(fseeko setluid getpwanam) +AC_CHECK_FUNCS(fdopendir) AC_CHECK_FUNCS(getpwent_r) -AC_CHECK_FUNCS(getdents64) AC_CHECK_FUNCS(setenv strcasecmp fcvt fcvtl) AC_CHECK_FUNCS(syslog vsyslog timegm) AC_CHECK_FUNCS(setlocale) @@ -1137,11 +1135,9 @@ AC_CHECK_FUNCS(_acl __acl _facl __facl _open __open _chdir __chdir) AC_CHECK_FUNCS(_close __close _fchdir __fchdir _fcntl __fcntl) AC_CHECK_FUNCS(getdents __getdents _lseek __lseek _read __read) AC_CHECK_FUNCS(getdirentries _write __write _fork __fork) -AC_CHECK_FUNCS(_stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64) -AC_CHECK_FUNCS(__sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64) -AC_CHECK_FUNCS(pread _pread __pread pread64 _pread64 __pread64) -AC_CHECK_FUNCS(pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64) -AC_CHECK_FUNCS(open64 _open64 __open64 creat64) +AC_CHECK_FUNCS(__sys_llseek llseek _llseek __llseek) +AC_CHECK_FUNCS(pread _pread __pread) +AC_CHECK_FUNCS(pwrite _pwrite __pwrite) AC_CHECK_FUNCS(prctl) AC_TRY_COMPILE([ @@ -1186,52 +1182,6 @@ main() { ;; esac -# -# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX -# - -if test x$ac_cv_func_stat64 = xno ; then - AC_MSG_CHECKING([for stat64 in <sys/stat.h>]) - AC_TRY_LINK([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <sys/stat.h> -], [struct stat64 st64; exit(stat64(".",&st64));], [ac_cv_func_stat64=yes]) - AC_MSG_RESULT([$ac_cv_func_stat64]) - if test x$ac_cv_func_stat64 = xyes ; then - AC_DEFINE(HAVE_STAT64,1,[Whether stat64() is available]) - fi -fi - -if test x$ac_cv_func_lstat64 = xno ; then - AC_MSG_CHECKING([for lstat64 in <sys/stat.h>]) - AC_TRY_LINK([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <sys/stat.h> -], [struct stat64 st64; exit(lstat64(".",&st64));], [ac_cv_func_lstat64=yes]) - AC_MSG_RESULT([$ac_cv_func_lstat64]) - if test x$ac_cv_func_lstat64 = xyes ; then - AC_DEFINE(HAVE_LSTAT64,[Whether lstat64() is available]) - fi -fi - -if test x$ac_cv_func_fstat64 = xno ; then - AC_MSG_CHECKING([for fstat64 in <sys/stat.h>]) - AC_TRY_LINK([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <sys/stat.h> -], [struct stat64 st64; exit(fstat64(0,&st64));], [ac_cv_func_fstat64=yes]) - AC_MSG_RESULT([$ac_cv_func_fstat64]) - if test x$ac_cv_func_fstat64 = xyes ; then - AC_DEFINE(HAVE_FSTAT64,1,[Whether fstat64() is available]) - fi -fi - ################################################# # Check whether struct stat has timestamps with sub-second resolution. # @@ -2130,19 +2080,6 @@ if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then AC_DEFINE(SIZEOF_OFF_T,8,[The size of the 'off_t' type]) fi -AC_CACHE_CHECK([for off64_t],samba_cv_HAVE_OFF64_T,[ -AC_TRY_RUN([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <stdio.h> -#include <sys/stat.h> -main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }], -samba_cv_HAVE_OFF64_T=yes,samba_cv_HAVE_OFF64_T=no,samba_cv_HAVE_OFF64_T=cross)]) -if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then - AC_DEFINE(HAVE_OFF64_T,1,[Whether off64_t is available]) -fi - AC_CACHE_CHECK([for 64 bit ino_t],samba_cv_SIZEOF_INO_T,[ AC_TRY_RUN([ #if defined(HAVE_UNISTD_H) @@ -2156,19 +2093,6 @@ if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then AC_DEFINE(SIZEOF_INO_T,8,[The size of the 'ino_t' type]) fi -AC_CACHE_CHECK([for ino64_t],samba_cv_HAVE_INO64_T,[ -AC_TRY_RUN([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <stdio.h> -#include <sys/stat.h> -main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }], -samba_cv_HAVE_INO64_T=yes,samba_cv_HAVE_INO64_T=no,samba_cv_HAVE_INO64_T=cross)]) -if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then - AC_DEFINE(HAVE_INO64_T,1,[Whether the 'ino64_t' type is available]) -fi - AC_CACHE_CHECK([for 64 bit dev_t],samba_cv_SIZEOF_DEV_T,[ AC_TRY_RUN([ #if defined(HAVE_UNISTD_H) @@ -2182,45 +2106,6 @@ if test x"$samba_cv_SIZEOF_DEV_T" = x"yes"; then AC_DEFINE(SIZEOF_DEV_T,8,[The size of the 'dev_t' type]) fi -AC_CACHE_CHECK([for dev64_t],samba_cv_HAVE_DEV64_T,[ -AC_TRY_RUN([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <stdio.h> -#include <sys/stat.h> -main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }], -samba_cv_HAVE_DEV64_T=yes,samba_cv_HAVE_DEV64_T=no,samba_cv_HAVE_DEV64_T=cross)]) -if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then - AC_DEFINE(HAVE_DEV64_T,1,[Whether the 'dev64_t' type is available]) -fi - -AC_CACHE_CHECK([for struct dirent64],samba_cv_HAVE_STRUCT_DIR64,[ -AC_TRY_COMPILE([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <sys/types.h> -#include <dirent.h>], -[DIR64 de;], -samba_cv_HAVE_STRUCT_DIR64=yes,samba_cv_HAVE_STRUCT_DIR64=no)]) -if test x"$samba_cv_HAVE_STRUCT_DIR64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then - AC_DEFINE(HAVE_STRUCT_DIR64,1,[Whether the 'DIR64' abstract data type is available]) -fi - -AC_CACHE_CHECK([for struct dirent64],samba_cv_HAVE_STRUCT_DIRENT64,[ -AC_TRY_COMPILE([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <sys/types.h> -#include <dirent.h>], -[struct dirent64 de;], -samba_cv_HAVE_STRUCT_DIRENT64=yes,samba_cv_HAVE_STRUCT_DIRENT64=no)]) -if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then - AC_DEFINE(HAVE_STRUCT_DIRENT64,1,[Whether the 'dirent64' struct is available]) -fi - AC_CACHE_CHECK([for major macro],samba_cv_HAVE_DEVICE_MAJOR_FN,[ AC_TRY_RUN([ #if defined(HAVE_UNISTD_H) @@ -2455,23 +2340,6 @@ if test x"$samba_cv_HAVE_LINUX_FALLOCATE" = x"yes" && test x"$ac_cv_func_falloca AC_DEFINE(HAVE_LINUX_FALLOCATE,1,[Whether the Linux 'fallocate' function is available]) fi -AC_CACHE_CHECK([for linux fallocate64],samba_cv_HAVE_LINUX_FALLOCATE64,[ -AC_TRY_COMPILE([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <sys/types.h> -#define _GNU_SOURCE -#include <fcntl.h> -#if defined(HAVE_LINUX_FALLOC_H) -#include <linux/falloc.h> -#endif], -[int ret = fallocate64(0, FALLOC_FL_KEEP_SIZE, 0, 10);], -samba_cv_HAVE_LINUX_FALLOCATE64=yes,samba_cv_HAVE_LINUX_FALLOCATE64=no)]) -if test x"$samba_cv_HAVE_LINUX_FALLOCATE64" = x"yes" && test x"$ac_cv_func_fallocate64" = x"yes"; then - AC_DEFINE(HAVE_LINUX_FALLOCATE64,1,[Whether the Linux 'fallocate64' function is available]) -fi - AC_CACHE_CHECK([for getcwd takes NULL],samba_cv_GETCWD_TAKES_NULL,[ AC_TRY_RUN([ #if defined(HAVE_UNISTD_H) @@ -3032,48 +2900,6 @@ if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then AC_DEFINE(HAVE_FCNTL_LOCK,1,[Whether fcntl locking is available]) fi -AC_CACHE_CHECK([for broken (glibc2.1/x86) 64 bit fcntl locking],samba_cv_HAVE_BROKEN_FCNTL64_LOCKS,[ -AC_TRY_RUN([#include "${srcdir-.}/../tests/fcntl_lock64.c"], - samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes,samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no,samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross)]) -if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then - AC_DEFINE(HAVE_BROKEN_FCNTL64_LOCKS,1,[Whether fcntl64 locks are broken]) - -else - -dnl -dnl Don't check for 64 bit fcntl locking if we know that the -dnl glibc2.1 broken check has succeeded. -dnl - - AC_CACHE_CHECK([for 64 bit fcntl locking],samba_cv_HAVE_STRUCT_FLOCK64,[ - AC_TRY_RUN([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <stdio.h> -#include <stdlib.h> - -#ifdef HAVE_FCNTL_H -#include <fcntl.h> -#endif - -#ifdef HAVE_SYS_FCNTL_H -#include <sys/fcntl.h> -#endif -main() { struct flock64 fl64; -#if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64) -exit(0); -#else -exit(1); -#endif -}], - samba_cv_HAVE_STRUCT_FLOCK64=yes,samba_cv_HAVE_STRUCT_FLOCK64=no,samba_cv_HAVE_STRUCT_FLOCK64=cross)]) - - if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then - AC_DEFINE(HAVE_STRUCT_FLOCK64,1,[Whether the flock64 struct is available]) - fi -fi - # glibc up to 2.3.6 had dangerously broken posix_fallocate(). DON'T USE IT. AC_CACHE_CHECK([for broken posix_fallocate],samba_cv_HAVE_BROKEN_POSIX_FALLOCATE,[ AC_TRY_COMPILE([ @@ -5068,30 +4894,6 @@ if test $space = no; then fi fi -# Test for statvfs64. -if test $space = no; then - # SVR4 - AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64, - [AC_TRY_RUN([ -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <sys/types.h> -#include <sys/statvfs.h> - main () - { - struct statvfs64 fsd; - exit (statvfs64 (".", &fsd)); - }], - fu_cv_sys_stat_statvfs64=yes, - fu_cv_sys_stat_statvfs64=no, - fu_cv_sys_stat_statvfs64=cross)]) - if test $fu_cv_sys_stat_statvfs64 = yes; then - space=yes - AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available]) - fi -fi - # smbd/statvfs.c assumes that statvfs.f_fsid is an integer. # This is not the case on ancient Linux systems. @@ -5686,24 +5488,9 @@ AC_ARG_WITH(aio-support, [ struct aiocb a; return aio_read(&a);], samba_cv_HAVE_AIO=yes,samba_cv_HAVE_AIO=no) LIBS=$aio_LIBS]) - AC_CACHE_CHECK([for 64-bit asynchronous io support],samba_cv_HAVE_AIO64,[ - aio_LIBS=$LIBS - LIBS=$AIO_LIBS - AC_TRY_LINK([#include <sys/types.h> -#include <aio.h>], -[ struct aiocb64 a; return aio_read64(&a);], -samba_cv_HAVE_AIO64=yes,samba_cv_HAVE_AIO64=no) - LIBS=$aio_LIBS]) - if test x"$samba_cv_HAVE_AIO64" = x"yes"; then - AC_DEFINE(HAVE_AIOCB64,1,[Whether 64 bit aio is available]) - AC_DEFINE(WITH_AIO, 1, [Using asynchronous io]) - LIBS=$AIO_LIBS - elif test x"$samba_cv_HAVE_AIO" = x"yes"; then + if test x"$samba_cv_HAVE_AIO" = x"yes"; then AC_DEFINE(WITH_AIO, 1, [Using asynchronous io]) LIBS=$AIO_LIBS - fi - - if test x"$samba_cv_HAVE_AIO" = x"yes"; then AC_MSG_CHECKING(for aio_read) AC_LINK_IFELSE([#include <aio.h> int main() { struct aiocb a; return aio_read(&a); }], @@ -5747,49 +5534,6 @@ int main() { struct aiocb a; return aio_suspend(&a, 1, NULL); }], [AC_MSG_RESULT(no)]) fi - if test x"$samba_cv_HAVE_AIO64" = x"yes"; then - AC_MSG_CHECKING(for aio_read64) - AC_LINK_IFELSE([#include <aio.h> -int main() { struct aiocb a; return aio_read64(&a); }], -[AC_DEFINE(HAVE_AIO_READ64, 1, [Have aio_read64]) AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) - - AC_MSG_CHECKING(for aio_write64) - AC_LINK_IFELSE([#include <aio.h> -int main() { struct aiocb a; return aio_write64(&a); }], -[AC_DEFINE(HAVE_AIO_WRITE64, 1, [Have aio_write64]) AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) - - AC_MSG_CHECKING(for aio_fsync64) - AC_LINK_IFELSE([#include <aio.h> -int main() { struct aiocb a; return aio_fsync64(1, &a); }], -[AC_DEFINE(HAVE_AIO_FSYNC64, 1, [Have aio_fsync64]) AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) - - AC_MSG_CHECKING(for aio_return64) - AC_LINK_IFELSE([#include <aio.h> -int main() { struct aiocb a; return aio_return64(&a); }], -[AC_DEFINE(HAVE_AIO_RETURN64, 1, [Have aio_return64]) AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) - - AC_MSG_CHECKING(for aio_error64) - AC_LINK_IFELSE([#include <aio.h> -int main() { struct aiocb a; return aio_error64(&a); }], -[AC_DEFINE(HAVE_AIO_ERROR64, 1, [Have aio_error64]) AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) - - AC_MSG_CHECKING(for aio_cancel64) - AC_LINK_IFELSE([#include <aio.h> -int main() { struct aiocb a; return aio_cancel64(1, &a); }], -[AC_DEFINE(HAVE_AIO_CANCEL64, 1, [Have aio_cancel64]) AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) - - AC_MSG_CHECKING(for aio_suspend64) - AC_LINK_IFELSE([#include <aio.h> -int main() { struct aiocb a; return aio_suspend64(&a, 1, NULL); }], -[AC_DEFINE(HAVE_AIO_SUSPEND64, 1, [Have aio_suspend64]) AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) - fi ;; esac ;; @@ -5823,16 +5567,6 @@ AC_ARG_WITH(sendfile-support, case "$host_os" in *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu) - AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ - AC_TRY_LINK([#include <sys/sendfile.h>], -[\ -int tofd, fromfd; -off64_t offset; -size_t total; -ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) - AC_CACHE_CHECK([for linux sendfile support],samba_cv_HAVE_SENDFILE,[ AC_TRY_LINK([#include <sys/sendfile.h>], [\ @@ -5858,11 +5592,7 @@ ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); ], samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)]) - if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then - AC_DEFINE(HAVE_SENDFILE64,1,[Whether 64-bit sendfile() is available]) - AC_DEFINE(LINUX_SENDFILE_API,1,[Whether linux sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used]) - elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then + if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) AC_DEFINE(LINUX_SENDFILE_API,1,[Whether linux sendfile() API is available]) AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used]) @@ -5906,31 +5636,6 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) ;; *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,1,[Whether sendfile64() is available]) - AC_DEFINE(HPUX_SENDFILE_API,1,[Whether the hpux sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) - else - AC_MSG_RESULT(no); - fi - AC_CACHE_CHECK([for hpux sendfile support],samba_cv_HAVE_SENDFILE,[ AC_TRY_LINK([\ #include <sys/socket.h> @@ -5959,39 +5664,6 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) *solaris*) AC_CHECK_LIB(sendfile,sendfilev) - AC_CACHE_CHECK([for solaris sendfilev64 support],samba_cv_HAVE_SENDFILEV64,[ - AC_TRY_LINK([\ -#include <sys/sendfile.h>], -[\ - int sfvcnt; - size_t xferred; - struct sendfilevec vec[2]; - ssize_t nwritten; - int tofd; - - sfvcnt = 2; - - vec[0].sfv_fd = SFV_FD_SELF; - vec[0].sfv_flag = 0; - vec[0].sfv_off = 0; - vec[0].sfv_len = 0; - - vec[1].sfv_fd = 0; - vec[1].sfv_flag = 0; - vec[1].sfv_off = 0; - vec[1].sfv_len = 0; - nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred); -], -samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)]) - - if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then - AC_DEFINE(HAVE_SENDFILEV64,1,[Whether sendfilev64() is available]) - AC_DEFINE(SOLARIS_SENDFILE_API,1,[Whether the soloris sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) - else - AC_MSG_RESULT(no); - fi - AC_CACHE_CHECK([for solaris sendfilev support],samba_cv_HAVE_SENDFILEV,[ AC_TRY_LINK([\ #include <sys/sendfile.h>], diff --git a/source3/wscript b/source3/wscript index 1e703dd2b1..eb4e0ff51b 100644 --- a/source3/wscript +++ b/source3/wscript @@ -75,19 +75,18 @@ def configure(conf): conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h netdb.h') conf.CHECK_HEADERS('linux/falloc.h') - conf.CHECK_FUNCS('getcwd fchown chmod fchmod mknod mknod64') + conf.CHECK_FUNCS('getcwd fchown chmod fchmod mknod') conf.CHECK_FUNCS('strtol strchr strupr chflags') conf.CHECK_FUNCS('getrlimit fsync fdatasync setpgid') conf.CHECK_FUNCS('setsid glob strpbrk crypt16 getauthuid') conf.CHECK_FUNCS('sigprocmask sigblock sigaction sigset innetgr') conf.CHECK_FUNCS('initgroups select poll rdchk getgrnam getgrent pathconf') - conf.CHECK_FUNCS('setpriv setgidx setuidx setgroups sysconf stat64 fstat64') - conf.CHECK_FUNCS('lstat64 fopen64 atexit grantpt lseek64 ftruncate64 fallocate fallocate64 posix_fallocate posix_fallocate64') - conf.CHECK_FUNCS('fseeko fseek64 fseeko64 ftell64 ftello64 setluid') + conf.CHECK_FUNCS('setpriv setgidx setuidx setgroups sysconf') + conf.CHECK_FUNCS('atexit grantpt fallocate posix_fallocate') + conf.CHECK_FUNCS('fseeko setluid') conf.CHECK_FUNCS('getpwnam', headers='sys/types.h pwd.h') - conf.CHECK_FUNCS('opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64') - conf.CHECK_FUNCS('fdopendir fdopendir64') - conf.CHECK_FUNCS('getpwent_r getdents64 setenv strcasecmp fcvt fcvtl') + conf.CHECK_FUNCS('fdopendir') + conf.CHECK_FUNCS('getpwent_r setenv strcasecmp fcvt fcvtl') conf.CHECK_FUNCS('syslog vsyslog timegm setlocale') conf.CHECK_FUNCS_IN('nanosleep', 'rt') conf.CHECK_FUNCS('lutimes futimes utimensat futimens') @@ -229,36 +228,36 @@ if (0) { _acl __acl add_proplist_entry atexit attr_getf attr_list attr_listf attropen attr_remove attr_removef attr_set attr_setf bindtextdomain _chdir __chdir chflags chmod _close __close _closedir -__closedir closedir64 creat64 crypt16 delproplist devnm dgettext dirfd +__closedir crypt16 delproplist devnm dgettext dirfd DNSServiceRegister _dup __dup _dup2 __dup2 endmntent execl extattr_delete_fd extattr_delete_link extattr_get_fd extattr_get_file extattr_get_link extattr_list_fd extattr_list_file extattr_list_link extattr_set_fd extattr_set_file extattr_set_link _facl __facl _fchdir __fchdir fchmod fchown _fcntl __fcntl fcvt fcvtl fdatasync -fdelproplist fgetea fgetproplist fgetxattr flistea flistxattr fopen64 -_fork __fork fremoveea fremovexattr fseeko fseek64 fseeko64 fsetea -fsetproplist fsetxattr _fstat __fstat fstat64 _fstat64 __fstat64 fsync -ftell64 ftello64 ftruncate64 futimens futimes __fxstat getauthuid -getcwd _getcwd __getcwd getdents __getdents getdents64 getdirentries +fdelproplist fgetea fgetproplist fgetxattr flistea flistxattr +_fork __fork fremoveea fremovexattr fseeko fsetea +fsetproplist fsetxattr _fstat __fstat fsync +futimens futimes __fxstat getauthuid +getcwd _getcwd __getcwd getdents __getdents getdirentries getgrent getgrnam getgrouplist getgrset getmntent getpagesize getproplist get_proplist_entry getpwanam getpwent_r getrlimit gettext glob grantpt hstrerror initgroups innetgr inotify_init lgetea lgetxattr listea listxattr llistea llistxattr -llseek _llseek __llseek lremoveea lremovexattr _lseek __lseek lseek64 -lsetea lsetxattr _lstat __lstat lstat64 _lstat64 __lstat64 lutimes -__lxstat memalign mknod mknod64 mlock mlockall munlock munlockall -_open __open open64 _open64 __open64 _opendir __opendir -opendir64 pathconf poll posix_fallocate posix_fallocate64 -posix_memalign prctl pread _pread __pread pread64 _pread64 __pread64 -pwrite _pwrite __pwrite pwrite64 _pwrite64 -__pwrite64 rdchk _read __read _readdir __readdir readdir64 _readdir64 -__readdir64 removeea removexattr rewinddir64 _seekdir __seekdir -seekdir64 select setea setenv setgidx setgroups setlocale setluid +llseek _llseek __llseek lremoveea lremovexattr _lseek __lseek +lsetea lsetxattr _lstat __lstat lutimes +__lxstat memalign mknod mlock mlockall munlock munlockall +_open __open _opendir __opendir +pathconf poll posix_fallocate +posix_memalign prctl pread _pread __pread +pwrite _pwrite __pwrite +rdchk _read __read _readdir __readdir +removeea removexattr _seekdir __seekdir +select setea setenv setgidx setgroups setlocale setluid setmntent setpgid setpriv setproplist setsid setuidx setxattr shmget shm_open sigaction sigblock sigprocmask sigset -sizeof_proplist_entry _stat __stat stat64 _stat64 __stat64 statvfs +sizeof_proplist_entry _stat __stat statvfs strcasecmp strchr strpbrk strsignal strtol strupr sysconf sysctl sysctlbyname -__sys_llseek syslog _telldir __telldir telldir64 textdomain timegm +__sys_llseek syslog _telldir __telldir textdomain timegm utimensat vsyslog _write __write __xstat ''') @@ -343,12 +342,6 @@ return acl_get_perm_np(permset_d, perm); 'HAVE_LINUX_FALLOCATE', msg="Checking whether the Linux 'fallocate' function is available", headers='unistd.h sys/types.h fcntl.h linux/falloc.h') - if conf.CONFIG_SET('HAVE_FALLOCATE64'): - conf.CHECK_CODE(''' - int ret = fallocate64(0, FALLOC_FL_KEEP_SIZE, 0, 10);''', - 'HAVE_LINUX_FALLOCATE64', - msg="Checking whether the Linux 'fallocate64' function is available", - headers='unistd.h sys/types.h fcntl.h linux/falloc.h') conf.CHECK_CODE(''' ssize_t err = readahead(0,0,0x80000);''', 'HAVE_LINUX_READAHEAD', @@ -364,15 +357,7 @@ return acl_get_perm_np(permset_d, perm); msg='Checking for asynchronous io support', headers='sys/types.h aio.h', lib='aio rt') - conf.CHECK_CODE('struct aiocb64 a; return aio_read64(&a);', - 'HAVE_AIO64', - msg='Checking for 64-bit asynchronous io support', - headers='sys/types.h aio.h', - lib='aio rt') - if conf.CONFIG_SET('HAVE_AIO64'): - conf.DEFINE('HAVE_AIOCB64', '1') - conf.DEFINE('WITH_AIO', '1') - elif conf.CONFIG_SET('HAVE_AIO'): + if conf.CONFIG_SET('HAVE_AIO'): conf.DEFINE('WITH_AIO', '1') if conf.CONFIG_SET('HAVE_AIO'): conf.CHECK_CODE('struct aiocb a; return aio_read(&a);', 'HAVE_AIO_READ', msg='Checking for aio_read', headers='aio.h', lib='aio rt') @@ -382,14 +367,6 @@ return acl_get_perm_np(permset_d, perm); conf.CHECK_CODE('struct aiocb a; return aio_error(&a);', 'HAVE_AIO_ERROR', msg='Checking for aio_error', headers='aio.h', lib='aio rt') conf.CHECK_CODE('struct aiocb a; return aio_cancel(1, &a);', 'HAVE_AIO_CANCEL', msg='Checking for aio_cancel', headers='aio.h', lib='aio rt') conf.CHECK_CODE('struct aiocb a; return aio_suspend(&a, 1, NULL);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', lib='aio rt') - if conf.CONFIG_SET('HAVE_AIO64'): - conf.CHECK_CODE('struct aiocb a; return aio_read64(&a);', 'HAVE_AIO_READ64', msg='Checking for aio_read64', headers='aio.h', lib='aio rt') - conf.CHECK_CODE('struct aiocb a; return aio_write64(&a);', 'HAVE_AIO_WRITE64', msg='Checking for aio_write64', headers='aio.h', lib='aio rt') - conf.CHECK_CODE('struct aiocb a; return aio_fsync64(1, &a);', 'HAVE_AIO_FSYNC64', msg='Checking for aio_fsync64', headers='aio.h', lib='aio rt') - conf.CHECK_CODE('struct aiocb a; return aio_return64(&a);', 'HAVE_AIO_RETURN64', msg='Checking for aio_return64', headers='aio.h', lib='aio rt') - conf.CHECK_CODE('struct aiocb a; return aio_error64(&a);', 'HAVE_AIO_ERROR64', msg='Checking for aio_error64', headers='aio.h', lib='aio rt') - conf.CHECK_CODE('struct aiocb a; return aio_cancel64(1, &a);', 'HAVE_AIO_CANCEL64', msg='Checking for aio_cancel64', headers='aio.h', lib='aio rt') - conf.CHECK_CODE('struct aiocb a; return aio_suspend64(&a, 1, NULL);', 'HAVE_AIO_SUSPEND64', msg='Checking for aio_suspend64', headers='aio.h', lib='aio rt') if not conf.CONFIG_SET('HAVE_AIO'): conf.DEFINE('HAVE_NO_AIO', '1') else: @@ -982,11 +959,6 @@ int i; i = PAM_RADIO_TYPE; ''', 'HAVE_LINUX_RTNETLINK_H', msg='Checking whether Linux rtnetlink is available') - if conf.CHECK_TYPE('struct dirent64', headers='sys/types.h dirent.h') and conf.CONFIG_SET('HAVE_READDIR64'): - conf.DEFINE('HAVE_STRUCT_DIRENT64', '1') - else: - conf.undefine('HAVE_STRUCT_DIRENT64') - conf.CHECK_CODE(''' #include "../tests/fcntl_lock.c" ''', @@ -995,42 +967,6 @@ int i; i = PAM_RADIO_TYPE; execute=True, msg='Checking whether fcntl locking is available') - conf.CHECK_CODE(''' -#include "../tests/fcntl_lock64.c" -''', - 'HAVE_BROKEN_FCNTL64_LOCKS', - addmain=False, - execute=True, - msg='Checking whether fcntl64 locks are broken') - - if not conf.CONFIG_SET('HAVE_BROKEN_FCNTL64_LOCKS'): - conf.CHECK_CODE(''' -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif -#include <stdio.h> -#include <stdlib.h> - -#ifdef HAVE_FCNTL_H -#include <fcntl.h> -#endif - -#ifdef HAVE_SYS_FCNTL_H -#include <sys/fcntl.h> -#endif -main() { struct flock64 fl64; -#if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64) -exit(0); -#else -exit(1); -#endif -} -''', - 'HAVE_STRUCT_FLOCK64', - addmain=False, - execute=True, - msg="Checking whether the flock64 struct is available") - conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtim.tv_nsec', define='HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC') # Linux, Solaris conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtimensec', @@ -1170,15 +1106,6 @@ main() { if (host_os.rfind('linux') > -1) or (host_os.rfind('gnu') > -1) or (host_os.rfind('k*bsd*-gnu') > -1) or (host_os.rfind('kopensolaris*-gnu') > -1): conf.CHECK_CODE(''' int tofd, fromfd; - off64_t offset; - size_t total; - ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); - ''', - '_HAVE_SENDFILE64', - headers='sys/sendfile', - msg='Checking for linux sendfile64 support') - conf.CHECK_CODE(''' - int tofd, fromfd; off_t offset; size_t total; ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); @@ -1199,11 +1126,7 @@ main() { ''', '_HAVE_BROKEN_LINUX_SENDFILE', msg='Checking for broken linux sendfile support') - if conf.CONFIG_SET('_HAVE_SENDFILE64'): - conf.DEFINE('HAVE_SENDFILE64', '1') - conf.DEFINE('LINUX_SENDFILE_API', '1') - conf.DEFINE('WITH_SENDFILE', '1') - elif conf.CONFIG_SET('_HAVE_SENDFILE'): + if conf.CONFIG_SET('_HAVE_SENDFILE'): conf.DEFINE('HAVE_SENDFILE', '1') conf.DEFINE('LINUX_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') @@ -1242,20 +1165,6 @@ main() { 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; @@ -1263,37 +1172,13 @@ main() { ''', '_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'): + if conf.CONFIG_SET('_HAVE_SENDFILE'): conf.DEFINE('HAVE_SENDFILE', '1') conf.DEFINE('HPUX_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') elif (host_os.rfind('solaris') > -1): conf.CHECK_FUNCS_IN('sendfile', 'sendfilev') conf.CHECK_CODE(''' - #include <sys/sendfile.h> - int sfvcnt; - size_t xferred; - struct sendfilevec vec[2]; - ssize_t nwritten; - int tofd; - sfvcnt = 2; - vec[0].sfv_fd = SFV_FD_SELF; - vec[0].sfv_flag = 0; - vec[0].sfv_off = 0; - vec[0].sfv_len = 0; - vec[1].sfv_fd = 0; - vec[1].sfv_flag = 0; - vec[1].sfv_off = 0; - vec[1].sfv_len = 0; - nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred); - ''', - '_HAVE_SENDFILEV64', - msg='Checking for solaris sendfilev64 support') - conf.CHECK_CODE(''' #include <sys/sendfile.h>, int sfvcnt; size_t xferred; @@ -1313,11 +1198,7 @@ main() { ''', '_HAVE_SENDFILEV', msg='Checking for solaris sendfilev support') - if conf.CONFIG_SET('_HAVE_SENDFILEV64'): - conf.DEFINE('HAVE_SENDFILEV64', '1') - conf.DEFINE('SOLARIS_SENDFILE_API', '1') - conf.DEFINE('WITH_SENDFILE', '1') - elif conf.CONFIG_SET('_HAVE_SENDFILEV'): + if conf.CONFIG_SET('_HAVE_SENDFILEV'): conf.DEFINE('HAVE_SENDFILEV', '1') conf.DEFINE('SOLARIS_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') @@ -1328,7 +1209,6 @@ main() { 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; |