diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-01-31 22:30:45 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-02-01 01:07:11 +0100 |
commit | 51e162df8bd364583e3af43066b7ea273d986e97 (patch) | |
tree | 1c74a92302b01d8ad3f6d696a5f17e4aeaeb22ba /source3/wscript | |
parent | 5931e1da87de591a2b4cb61c6c97cc60d4f01175 (diff) | |
download | samba-51e162df8bd364583e3af43066b7ea273d986e97.tar.gz samba-51e162df8bd364583e3af43066b7ea273d986e97.tar.bz2 samba-51e162df8bd364583e3af43066b7ea273d986e97.zip |
source3/wscript: Expand tabs, to prevent confusion (whitespace is significant in python/waf).
Diffstat (limited to 'source3/wscript')
-rw-r--r-- | source3/wscript | 642 |
1 files changed, 321 insertions, 321 deletions
diff --git a/source3/wscript b/source3/wscript index 912997ff4d..901d2b6fca 100644 --- a/source3/wscript +++ b/source3/wscript @@ -157,8 +157,8 @@ main() { #include <signal.h> #include <sys/file.h> #ifndef LOCK_MAND -#define LOCK_MAND 32 -#define LOCK_READ 64 +#define LOCK_MAND 32 +#define LOCK_READ 64 #endif main() { exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0); @@ -172,7 +172,7 @@ main() { conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_blksize', define='HAVE_STAT_ST_BLKSIZE', headers='sys/stat.h') conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_flags', define='HAVE_STAT_ST_FLAGS', - headers='sys/types.h sys/stat.h unistd.h') + headers='sys/types.h sys/stat.h unistd.h') # Check for POSIX capability support conf.CHECK_FUNCS_IN('cap_get_proc', 'cap', headers='sys/capability.h') @@ -301,8 +301,8 @@ utimensat vsyslog _write __write __xstat #FIXME: add more checks if Options.options.with_acl_support: if host_os.rfind('linux') > -1: - conf.CHECK_FUNCS_IN('acl_get_file', 'acl') - conf.CHECK_FUNCS_IN('getxattr', 'attr') + conf.CHECK_FUNCS_IN('acl_get_file', 'acl') + conf.CHECK_FUNCS_IN('getxattr', 'attr') if conf.CHECK_CODE(''' acl_t acl; int entry_id; @@ -311,7 +311,7 @@ return acl_get_entry(acl, entry_id, entry_p); ''', 'HAVE_POSIX_ACLS', headers='sys/types.h sys/acl.h', link=False, - msg="Checking for POSIX ACL support") : + msg="Checking for POSIX ACL support") : conf.CHECK_CODE(''' acl_permset_t permset_d; acl_perm_t perm; @@ -338,54 +338,54 @@ return acl_get_perm_np(permset_d, perm); if conf.CONFIG_SET('HAVE_FALLOCATE'): conf.CHECK_CODE(''' - int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);''', - 'HAVE_LINUX_FALLOCATE', - msg="Checking whether the Linux 'fallocate' function is available", - headers='unistd.h sys/types.h fcntl.h linux/falloc.h') + int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);''', + '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') + 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', - msg="Checking whether Linux readahead is available", - headers='unistd.h fcntl.h') + ssize_t err = readahead(0,0,0x80000);''', + 'HAVE_LINUX_READAHEAD', + msg="Checking whether Linux readahead is available", + headers='unistd.h fcntl.h') conf.CHECK_DECLS('readahead', headers='fcntl.h', always=True) conf.CHECK_CODE(''' - struct ucred cred; - socklen_t cred_len; - int ret = getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, &cred_len);''', - 'HAVE_PEERCRED', - msg="Checking whether we can use SO_PEERCRED to get socket credentials", - headers='sys/types.h sys/socket.h') + struct ucred cred; + socklen_t cred_len; + int ret = getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, &cred_len);''', + 'HAVE_PEERCRED', + msg="Checking whether we can use SO_PEERCRED to get socket credentials", + headers='sys/types.h sys/socket.h') conf.CHECK_CODE(''' - #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8))) - #include <sys/types.h> - #else - __COMPILE_ERROR_ - #endif - int i;''', - 'HAVE_EXPLICIT_LARGEFILE_SUPPORT', - msg="Checking whether large file support can be enabled") + #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8))) + #include <sys/types.h> + #else + __COMPILE_ERROR_ + #endif + int i;''', + 'HAVE_EXPLICIT_LARGEFILE_SUPPORT', + msg="Checking whether large file support can be enabled") if Options.options.with_aio_support: - conf.CHECK_FUNCS_IN('aio_read', 'aio') - conf.CHECK_FUNCS_IN('aio_read', 'rt') + conf.CHECK_FUNCS_IN('aio_read', 'aio') + conf.CHECK_FUNCS_IN('aio_read', 'rt') conf.CHECK_CODE('struct aiocb a; return aio_read(&a);', - 'HAVE_AIO', - msg='Checking for asynchronous io support', - headers='sys/types.h aio.h', - lib='aio rt') + 'HAVE_AIO', + 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') + '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') @@ -406,7 +406,7 @@ return acl_get_perm_np(permset_d, perm); 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') + 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: @@ -415,24 +415,24 @@ return acl_get_perm_np(permset_d, perm); conf.CHECK_CODE(''' struct msghdr msg; union { - struct cmsghdr cm; + struct cmsghdr cm; char control[CMSG_SPACE(sizeof(int))]; } control_un; msg.msg_control = control_un.control; msg.msg_controllen = sizeof(control_un.control); ''', - 'HAVE_MSGHDR_MSG_CONTROL', - msg='Checking if we can use msg_control for passing file descriptors', - headers='sys/types.h stdlib.h stddef.h sys/socket.h sys/un.h') + 'HAVE_MSGHDR_MSG_CONTROL', + msg='Checking if we can use msg_control for passing file descriptors', + headers='sys/types.h stdlib.h stddef.h sys/socket.h sys/un.h') conf.CHECK_CODE(''' struct msghdr msg; int fd; msg.msg_acctrights = (caddr_t) &fd; msg.msg_acctrightslen = sizeof(fd); ''', - 'HAVE_MSGHDR_MSG_ACCTRIGHTS', - msg='Checking if we can use msg_acctrights for passing file descriptors', - headers='sys/types.h stdlib.h stddef.h sys/socket.h sys/un.h') + 'HAVE_MSGHDR_MSG_ACCTRIGHTS', + msg='Checking if we can use msg_acctrights for passing file descriptors', + headers='sys/types.h stdlib.h stddef.h sys/socket.h sys/un.h') if Options.options.with_winbind: conf.env.build_winbind = True @@ -487,7 +487,7 @@ msg.msg_acctrightslen = sizeof(fd); # we would normally use --libs here, but cups-config incorrectly adds # gssapi_krb5 and other libraries to its --libs output. That breaks the use # of an in-tree heimdal kerberos - conf.check_cfg(path=conf.env.CUPS_CONFIG, args="--cflags --ldflags", + conf.check_cfg(path=conf.env.CUPS_CONFIG, args="--cflags --ldflags", package="", uselib_store="CUPS") conf.CHECK_HEADERS('cups/cups.h cups/language.h', lib='cups') conf.CHECK_FUNCS_IN('httpConnect httpConnectEncrypt', 'cups') @@ -501,7 +501,7 @@ msg.msg_acctrightslen = sizeof(fd); conf.SET_TARGET_TYPE('cups', 'EMPTY') if Options.options.with_iprint: - if conf.CONFIG_SET('HAVE_CUPS'): + if conf.CONFIG_SET('HAVE_CUPS'): conf.DEFINE('HAVE_IPRINT', '1') else: Logs.warn("--enable-iprint=yes but cups support not sufficient") @@ -564,7 +564,7 @@ msg.msg_acctrightslen = sizeof(fd); conf.CHECK_FUNCS_IN('_et_list', 'com_err') conf.CHECK_FUNCS_IN('krb5_encrypt_data', 'k5crypto') - conf.CHECK_FUNCS_IN('des_set_key','crypto') + conf.CHECK_FUNCS_IN('des_set_key','crypto') conf.CHECK_FUNCS_IN('copy_Authenticator', 'asn1') conf.CHECK_FUNCS_IN('roken_getaddrinfo_hostspec', 'roken') if conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi') or \ @@ -607,9 +607,9 @@ krb5_get_credentials_for_user krb5_get_host_realm krb5_free_host_realm''', conf.CHECK_VARIABLE('KV5M_KEYTAB', headers='krb5.h') conf.CHECK_VARIABLE('KRB5_KU_OTHER_CKSUM', headers='krb5.h') conf.CHECK_VARIABLE('KRB5_KEYUSAGE_APP_DATA_CKSUM', headers='krb5.h') - conf.CHECK_VARIABLE('ENCTYPE_AES128_CTS_HMAC_SHA1_96', headers='krb5.h') - conf.CHECK_VARIABLE('ENCTYPE_AES256_CTS_HMAC_SHA1_96', headers='krb5.h') - conf.CHECK_DECLS('KRB5_PDU_NONE', reverse=True, headers='krb5.h') + conf.CHECK_VARIABLE('ENCTYPE_AES128_CTS_HMAC_SHA1_96', headers='krb5.h') + conf.CHECK_VARIABLE('ENCTYPE_AES256_CTS_HMAC_SHA1_96', headers='krb5.h') + conf.CHECK_DECLS('KRB5_PDU_NONE', reverse=True, headers='krb5.h') conf.CHECK_STRUCTURE_MEMBER('krb5_keytab_entry', 'key', headers='krb5.h', define='HAVE_KRB5_KEYTAB_ENTRY_KEY') conf.CHECK_STRUCTURE_MEMBER('krb5_keytab_entry', 'keyblock', headers='krb5.h', @@ -706,24 +706,24 @@ int main(void) { headers='krb5.h', lib='krb5', addmain=False, msg="Checking whether krb5_principal_get_realm is defined") - conf.CHECK_CODE(''' + conf.CHECK_CODE(''' krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC_MD5; ''', '_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5', headers='krb5.h', lib='krb5', msg="Checking whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type definition is available"); - conf.CHECK_CODE(''' + conf.CHECK_CODE(''' krb5_keytype keytype; keytype = KEYTYPE_ARCFOUR_56; ''', '_HAVE_KEYTYPE_ARCFOUR_56', headers='krb5.h', lib='krb5', msg="Checking whether the HAVE_KEYTYPE_ARCFOUR_56 key type definition is available"); - if conf.CONFIG_SET('_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5') and conf.CONFIG_SET('_HAVE_KEYTYPE_ARCFOUR_56'): + if conf.CONFIG_SET('_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5') and conf.CONFIG_SET('_HAVE_KEYTYPE_ARCFOUR_56'): conf.DEFINE('HAVE_ENCTYPE_ARCFOUR_HMAC_MD5', '1') - conf.CHECK_CODE(''' + conf.CHECK_CODE(''' krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC; ''', @@ -731,7 +731,7 @@ enctype = ENCTYPE_ARCFOUR_HMAC; headers='krb5.h', lib='krb5', msg="Checking whether the ENCTYPE_ARCFOUR_HMAC key type definition is available"); - conf.CHECK_CODE(''' + conf.CHECK_CODE(''' krb5_context context; krb5_keytab keytab; krb5_init_context(&context); @@ -900,7 +900,7 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab); conf.CHECK_HEADERS('security/pam_ext.h security/_pam_macros.h') conf.CHECK_HEADERS('pam/pam_ext.h pam/_pam_macros.h') conf.CHECK_FUNCS_IN('pam_vsyslog', 'pam') - conf.CHECK_CODE(''' + conf.CHECK_CODE(''' #if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> #elif defined(HAVE_PAM_PAM_APPL_H) @@ -911,7 +911,7 @@ pam_set_item(0, PAM_RHOST, 0); 'HAVE_PAM_RHOST', lib='pam', msg="Checking whether PAM_RHOST is available"); - conf.CHECK_CODE(''' + conf.CHECK_CODE(''' #if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> #elif defined(HAVE_PAM_PAM_APPL_H) @@ -922,7 +922,7 @@ pam_set_item(0, PAM_TTY, 0); 'HAVE_PAM_TTY', lib='pam', msg="Checking whether PAM_TTY is available"); - conf.CHECK_CODE(''' + conf.CHECK_CODE(''' #if (!defined(LINUX)) #define PAM_EXTERN extern @@ -962,45 +962,45 @@ int i; i = PAM_RADIO_TYPE; seteuid = False if not seteuid: seteuid = conf.CHECK_CODE(''' - #define AUTOCONF_TEST 1 - #define USE_SETREUID 1 - #include "./lib/util_sec.c" - ''', - 'USE_SETREUID', - addmain=False, - execute=True, - msg="Checking whether setreuid is available") + #define AUTOCONF_TEST 1 + #define USE_SETREUID 1 + #include "./lib/util_sec.c" + ''', + 'USE_SETREUID', + addmain=False, + execute=True, + msg="Checking whether setreuid is available") if not seteuid: seteuid = conf.CHECK_CODE(''' - #define AUTOCONF_TEST 1 - #define USE_SETRESUID 1 - #include "./lib/util_sec.c" - ''', - 'USE_SETRESUID', - addmain=False, - execute=True, - msg="Checking whether setresuid is available") + #define AUTOCONF_TEST 1 + #define USE_SETRESUID 1 + #include "./lib/util_sec.c" + ''', + 'USE_SETRESUID', + addmain=False, + execute=True, + msg="Checking whether setresuid is available") if not seteuid: seteuid = conf.CHECK_CODE(''' - #define AUTOCONF_TEST 1 - #define USE_SETEUID 1 - #include "./lib/util_sec.c" - ''', - 'USE_SETEUID', - addmain=False, - execute=True, - msg="Checking whether seteuid is available") + #define AUTOCONF_TEST 1 + #define USE_SETEUID 1 + #include "./lib/util_sec.c" + ''', + 'USE_SETEUID', + addmain=False, + execute=True, + msg="Checking whether seteuid is available") if not seteuid: seteuid = conf.CHECK_CODE(''' - #define AUTOCONF_TEST 1 - #define USE_SETUIDX 1 - #include "./lib/util_sec.c" - ''', - 'USE_SETUIDX', - addmain=False, - execute=True, - mandatory=True, - msg="Checking whether setuidx is available") + #define AUTOCONF_TEST 1 + #define USE_SETUIDX 1 + #include "./lib/util_sec.c" + ''', + 'USE_SETUIDX', + addmain=False, + execute=True, + mandatory=True, + msg="Checking whether setuidx is available") if Options.options.with_dnsupdate: conf.CHECK_HEADERS('uuid/uuid.h') conf.CHECK_FUNCS_IN('uuid_generate', 'uuid') @@ -1021,15 +1021,15 @@ int i; i = PAM_RADIO_TYPE; #include <bits/sockaddr.h> #include <linux/netlink.h> ''', - 'HAVE_LINUX_NETLINK_H', + 'HAVE_LINUX_NETLINK_H', msg="Checking whether Linux netlink is available"): conf.CHECK_CODE(''' #include <bits/sockaddr.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> ''', - 'HAVE_LINUX_RTNETLINK_H', - msg='Checking whether Linux rtnetlink is available') + '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: @@ -1038,18 +1038,18 @@ int i; i = PAM_RADIO_TYPE; conf.CHECK_CODE(''' #include "../tests/fcntl_lock.c" ''', - 'HAVE_FCNTL_LOCK', - addmain=False, - execute=True, - msg='Checking whether fcntl locking is available') + 'HAVE_FCNTL_LOCK', + addmain=False, + 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') + '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(''' @@ -1074,21 +1074,21 @@ exit(1); #endif } ''', - 'HAVE_STRUCT_FLOCK64', - addmain=False, - execute=True, - msg="Checking whether the flock64 struct is available") + '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 + define='HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC') # Linux, Solaris conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtimensec', - define='HAVE_STRUCT_STAT_ST_MTIMENSEC') # BSD, if defined _POSIX_SOURCE + define='HAVE_STRUCT_STAT_ST_MTIMENSEC') # BSD, if defined _POSIX_SOURCE conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtimespec.tv_nsec', - define='HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC') # BSD, if not defined _POSIX_SOURCE + define='HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC') # BSD, if not defined _POSIX_SOURCE conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtime_n', - define='HAVE_STRUCT_STAT_ST_MTIME_N') # AIX + define='HAVE_STRUCT_STAT_ST_MTIME_N') # AIX conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_umtime', - define='HAVE_STRUCT_STAT_ST_UMTIME') # Tru64 + define='HAVE_STRUCT_STAT_ST_UMTIME') # Tru64 if conf.CONFIG_SET('HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC') or \ conf.CONFIG_SET('HAVE_STRUCT_STAT_ST_MTIMENSEC') or \ conf.CONFIG_SET('HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC') or \ @@ -1098,26 +1098,26 @@ exit(1); # recent FreeBSD, NetBSD have creation timestamps called birthtime: conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_birthtime', - define='HAVE_STRUCT_STAT_ST_BIRTHTIME') + define='HAVE_STRUCT_STAT_ST_BIRTHTIME') conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_birthtimespec.tv_nsec', - define='HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC') + define='HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC') conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_birthtimensec', - define='HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC') + define='HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC') conf.CHECK_CODE(''' ssize_t err = posix_fadvise(0,0,0x80000,POSIX_FADV_WILLNEED); ''', - 'HAVE_POSIX_FADVISE', - msg='Checking whether posix_fadvise is available', - headers='unistd.h fcntl.h') + 'HAVE_POSIX_FADVISE', + msg='Checking whether posix_fadvise is available', + headers='unistd.h fcntl.h') for v in ['_SC_NGROUPS_MAX', '_SC_NPROC_ONLN', '_SC_NPROCESSORS_ONLN', '_SC_PAGESIZE' ]: conf.CHECK_CODE(''' - #include <unistd.h> - return sysconf(%s) == -1 ? 1 : 0; - ''' % v, - 'SYSCONF%s' % v, - msg='Checking whether sysconf(%s) is available' % v) + #include <unistd.h> + return sysconf(%s) == -1 ? 1 : 0; + ''' % v, + 'SYSCONF%s' % v, + msg='Checking whether sysconf(%s) is available' % v) conf.CHECK_DECLS('__NR_inotify_init', reverse=True, headers='asm/unistd.h') @@ -1125,25 +1125,25 @@ ssize_t err = posix_fadvise(0,0,0x80000,POSIX_FADV_WILLNEED); #include <sys/syscall.h> #include <unistd.h> syscall(SYS_initgroups, 16, NULL, NULL, 0); - ''', - 'HAVE_DARWIN_INITGROUPS', - msg='Checking whether to use the Darwin-specific initgroups system call') + ''', + 'HAVE_DARWIN_INITGROUPS', + msg='Checking whether to use the Darwin-specific initgroups system call') conf.CHECK_CODE('''struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));''', - 'HAVE_UTIMBUF', - headers='sys/types.h utime.h', - msg='Checking whether struct utimbuf is available') + 'HAVE_UTIMBUF', + headers='sys/types.h utime.h', + msg='Checking whether struct utimbuf is available') if conf.CHECK_CODE('''struct sigevent s;''', - 'HAVE_STRUCT_SIGEVENT', - headers='sys/types.h stdlib.h stddef.h signal.h', - msg='Checking whether we have the struct sigevent'): + 'HAVE_STRUCT_SIGEVENT', + headers='sys/types.h stdlib.h stddef.h signal.h', + msg='Checking whether we have the struct sigevent'): conf.CHECK_STRUCTURE_MEMBER('struct sigevent', 'sigev_value.sival_ptr', - define='HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR', - headers='signal.h'); + define='HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR', + headers='signal.h'); conf.CHECK_STRUCTURE_MEMBER('struct sigevent', 'sigev_value.sigval_ptr', - define='HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR', - headers='signal.h'); + define='HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR', + headers='signal.h'); if os.path.exists('/proc/sys/kernel/core_pattern'): conf.DEFINE('HAVE_SYS_KERNEL_PROC_CORE_PATTERN', '1') @@ -1151,26 +1151,26 @@ syscall(SYS_initgroups, 16, NULL, NULL, 0); if conf.CHECK_CODE(''' #include <time.h> main() { - struct tm *tm; - if (sizeof(time_t) == 8) { - time_t max_time = 0x7fffffffffffffffll; - tm = gmtime(&max_time); - /* This should fail with 32-bit tm_year. */ - if (tm == NULL) { - /* Max time_t that works with 32-bit int tm_year in struct tm. */ - max_time = 67768036191676799ll; - tm = gmtime(&max_time); - if (tm) { - exit(0); - } - } - } - exit(1); + struct tm *tm; + if (sizeof(time_t) == 8) { + time_t max_time = 0x7fffffffffffffffll; + tm = gmtime(&max_time); + /* This should fail with 32-bit tm_year. */ + if (tm == NULL) { + /* Max time_t that works with 32-bit int tm_year in struct tm. */ + max_time = 67768036191676799ll; + tm = gmtime(&max_time); + if (tm) { + exit(0); + } + } + } + exit(1); }''', - '__TIME_T_MAX', - addmain=False, - execute=True, - msg="Checking for the maximum value of the 'time_t' type"): + '__TIME_T_MAX', + addmain=False, + execute=True, + msg="Checking for the maximum value of the 'time_t' type"): conf.DEFINE('TIME_T_MAX', '67768036191676799ll') conf.CHECK_CODE(''' @@ -1180,9 +1180,9 @@ main() { #include <sys/types.h> main() { dev_t dev = makedev(1,2); return 0; } ''', - 'HAVE_MAKEDEV', - addmain=False, - msg='Checking whether the macro for makedev is available') + 'HAVE_MAKEDEV', + addmain=False, + msg='Checking whether the macro for makedev is available') conf.CHECK_CODE(''' #include <stdio.h> @@ -1190,26 +1190,26 @@ main() { dev_t dev = makedev(1,2); return 0; } #include <signal.h> void exit_on_core(int ignored) { - exit(1); + exit(1); } main() { - char *newpath; - signal(SIGSEGV, exit_on_core); - newpath = realpath("/tmp", NULL); - exit((newpath != NULL) ? 0 : 1); + char *newpath; + signal(SIGSEGV, exit_on_core); + newpath = realpath("/tmp", NULL); + exit((newpath != NULL) ? 0 : 1); } ''', - 'REALPATH_TAKES_NULL', - addmain=False, - execute=True, - msg='Checking whether the realpath function allows a NULL argument') + 'REALPATH_TAKES_NULL', + addmain=False, + execute=True, + msg='Checking whether the realpath function allows a NULL argument') conf.CHECK_CODE('''#include "../tests/ftruncate.c"''', - 'HAVE_FTRUNCATE_EXTEND', - msg='Checking for ftruncate extend', - addmain=False, - execute=True) + 'HAVE_FTRUNCATE_EXTEND', + msg='Checking for ftruncate extend', + addmain=False, + execute=True) if os.getenv('RUN_FROM_BUILD_FARM'): Logs.info("enabling buildfarm hacks") conf.DEFINE('ENABLE_BUILD_FARM_HACKS', '1') @@ -1217,36 +1217,36 @@ main() { if Options.options.with_sendfile_support: 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') + 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); - ''', - '_HAVE_SENDFILE', - headers='sys/sendfile', - msg='Checking for linux sendfile support') + int tofd, fromfd; + off_t offset; + size_t total; + ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); + ''', + '_HAVE_SENDFILE', + headers='sys/sendfile', + msg='Checking for linux sendfile support') # Try and cope with broken Linux sendfile.... conf.CHECK_CODE('''#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) - #undef _FILE_OFFSET_BITS - #endif - #include <sys/sendfile.h> - int tofd, fromfd; - off_t offset; - size_t total; - ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); - ''', - '_HAVE_BROKEN_LINUX_SENDFILE', - msg='Checking for broken linux sendfile support') + #undef _FILE_OFFSET_BITS + #endif + #include <sys/sendfile.h> + int tofd, fromfd; + off_t offset; + size_t total; + ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); + ''', + '_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') @@ -1258,59 +1258,59 @@ main() { elif conf.CONFIG_SET('_HAVE_BROKEN_LINUX_SENDFILE'): conf.DEFINE('LINUX_BROKEN_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') - elif (host_os.rfind('freebsd') > -1) or (host_os.rfind('dragonfly') > -1): + elif (host_os.rfind('freebsd') > -1) or (host_os.rfind('dragonfly') > -1): conf.CHECK_CODE(''' - #include <sys/types.h> - #include <unistd.h> - #include <sys/socket.h> - #include <sys/uio.h> - int fromfd, tofd, ret, total=0; - off_t offset, nwritten; - struct sf_hdtr hdr; - struct iovec hdtrl; - hdr.headers = &hdtrl; - hdr.hdr_cnt = 1; - hdr.trailers = NULL; - hdr.trl_cnt = 0; - hdtrl.iov_base = NULL; - hdtrl.iov_len = 0; - ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0) - ''', - '_HAVE_SENDFILE', - msg='Checking for freebsd sendfile support') + #include <sys/types.h> + #include <unistd.h> + #include <sys/socket.h> + #include <sys/uio.h> + int fromfd, tofd, ret, total=0; + off_t offset, nwritten; + struct sf_hdtr hdr; + struct iovec hdtrl; + hdr.headers = &hdtrl; + hdr.hdr_cnt = 1; + hdr.trailers = NULL; + hdr.trl_cnt = 0; + hdtrl.iov_base = NULL; + hdtrl.iov_len = 0; + ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0) + ''', + '_HAVE_SENDFILE', + msg='Checking for freebsd sendfile support') if conf.CONFIG_SET('_HAVE_SENDFILE'): conf.DEFINE('HAVE_SENDFILE', '1') conf.DEFINE('FREEBSD_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') - elif (host_os.rfind('hpux') > -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') + #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') + #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') @@ -1319,48 +1319,48 @@ main() { conf.DEFINE('HAVE_SENDFILE', '1') conf.DEFINE('HPUX_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') - elif (host_os.rfind('solaris') > -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') + #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; - 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 = sendfilev(tofd, vec, sfvcnt, &xferred); - ''', - '_HAVE_SENDFILEV', - msg='Checking for solaris sendfilev support') + #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 = sendfilev(tofd, vec, sfvcnt, &xferred); + ''', + '_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') @@ -1369,25 +1369,25 @@ main() { conf.DEFINE('HAVE_SENDFILEV', '1') conf.DEFINE('SOLARIS_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') - elif (host_os.rfind('aix') > -1): + elif (host_os.rfind('aix') > -1): conf.CHECK_CODE(''' - #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); - ''', - '_HAVE_SENDFILE', - msg='Checking for AIX send_file support') + #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); + ''', + '_HAVE_SENDFILE', + msg='Checking for AIX send_file support') if conf.CONFIG_SET('_HAVE_SENDFILE'): conf.DEFINE('HAVE_SENDFILE', '1') conf.DEFINE('AIX_SENDFILE_API', '1') @@ -1397,7 +1397,7 @@ main() { conf.CHECK_CODE(''' #include <unistd.h> main() { - char *s = getcwd(NULL,0); + char *s = getcwd(NULL,0); exit(s != NULL ? 0 : 1); }''', 'GETCWD_TAKES_NULL', addmain=False, execute=True, msg="getcwd takes a NULL argument") @@ -1610,7 +1610,7 @@ main() { 'HAVE_CTDB_CONTROL_CHECK_SRVIDS_DECL', addmain=False, includes=includes, - msg='Checking for CHECK_SRVIDS control') + msg='Checking for CHECK_SRVIDS control') if not conf.CONFIG_SET('HAVE_CTDB_CONTROL_CHECK_SRVIDS_DECL'): if not Options.options.enable_old_ctdb: @@ -1632,15 +1632,15 @@ main() { conf.CHECK_CODE('__attribute__((destructor)) static void cleanup(void) { }', - 'HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR', - addmain=False, - link=False, - msg='Checking whether we can compile with __attribute__((destructor))') + 'HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR', + addmain=False, + link=False, + msg='Checking whether we can compile with __attribute__((destructor))') conf.CHECK_CODE('void seekdir(DIR *d, long loc) { return; }', - 'SEEKDIR_RETURNS_VOID', - headers='sys/types.h dirent.h', - msg='Checking whether seekdir returns void') + 'SEEKDIR_RETURNS_VOID', + headers='sys/types.h dirent.h', + msg='Checking whether seekdir returns void') if Options.options.with_profiling_data: conf.DEFINE('WITH_PROFILE', 1); @@ -1717,28 +1717,28 @@ main() { default_static_modules.extend(TO_LIST('vfs_posixacl')) if conf.CONFIG_SET('HAVE_FREEBSD_SUNACL_H'): - default_shared_modules.extend(TO_LIST('vfs_zfsacl')) + default_shared_modules.extend(TO_LIST('vfs_zfsacl')) if conf.CONFIG_SET('HAVE_DIRFD_DECL'): - default_shared_modules.extend(TO_LIST('vfs_syncops vfs_dirsort')) + default_shared_modules.extend(TO_LIST('vfs_syncops vfs_dirsort')) if conf.CONFIG_SET('HAVE_STATFS_F_FSID'): - default_shared_modules.extend(TO_LIST('vfs_fileid')) + default_shared_modules.extend(TO_LIST('vfs_fileid')) if conf.CONFIG_SET('HAVE_AIO') and (conf.CONFIG_SET('HAVE_MSGHDR_MSG_CONTROL') or conf.CONFIG_SET('HAVE_MSGHDR_MSG_ACCTRIGHTS')): - default_shared_modules.extend(TO_LIST('vfs_aio_fork')) + default_shared_modules.extend(TO_LIST('vfs_aio_fork')) if conf.CONFIG_SET('HAVE_AIO') and Options.options.with_pthreadpool: - default_shared_modules.extend(TO_LIST('vfs_aio_pthread')) + default_shared_modules.extend(TO_LIST('vfs_aio_pthread')) if conf.CONFIG_SET('HAVE_LDAP'): default_static_modules.extend(TO_LIST('pdb_ldap idmap_ldap')) if conf.CONFIG_SET('DARWINOS'): - default_static_modules.extend(TO_LIST('charset_macosxfs')) + default_static_modules.extend(TO_LIST('charset_macosxfs')) if conf.CONFIG_SET('HAVE_GPFS'): - default_shared_modules.extend(TO_LIST('vfs_gpfs vfs_gpfs_hsm_notify')) + default_shared_modules.extend(TO_LIST('vfs_gpfs vfs_gpfs_hsm_notify')) explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=',') explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=',') |