[SCM] Samba Shared Repository - branch v3-6-test updated

Günther Deschner gd at samba.org
Wed Jan 12 02:17:35 MST 2011


The branch, v3-6-test has been updated
       via  4fc077c s3-waf: add check for SO_PEERCRED.
       via  7be9465 s3-waf: add checks for Linux readahead.
       via  ae3d500 s3-waf: more fallocate checks stolen from autoconf.
      from  2201ce0 s3-waf: add checks for fallocate fallocate64.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 4fc077c03a72843456a79f389c3311635a6c6f83
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jan 12 00:56:29 2011 +0100

    s3-waf: add check for SO_PEERCRED.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Wed Jan 12 02:29:48 CET 2011 on sn-devel-104
    (cherry picked from commit e2a3ff184e7e6133b3536c5a40c9f05849b1f196)

commit 7be94654940344c0c8ad29e4c30f3173cbe49ece
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jan 12 00:49:53 2011 +0100

    s3-waf: add checks for Linux readahead.
    
    Guenther
    (cherry picked from commit 4c8b9bee14ba9bcf4cc0a00985247fda3a29deef)

commit ae3d500abce44c5d12d40bd1b811c06d4b800908
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jan 12 00:43:26 2011 +0100

    s3-waf: more fallocate checks stolen from autoconf.
    
    Guenther
    (cherry picked from commit 4412eb9d008d259cebafa7062d4826d69e67d89c)

-----------------------------------------------------------------------

Summary of changes:
 source3/wscript |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript b/source3/wscript
index 3e83c12..3a31169 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -88,6 +88,7 @@ def configure(conf):
     conf.ADD_LDFLAGS("-Wl,--export-dynamic", testflags=True)
 
     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('strtol strchr strupr chflags')
@@ -335,6 +336,53 @@ return acl_get_perm_np(permset_d, perm);
                     headers='sys/types.h sys/statfs.h',
                     execute=True)
 
+    if conf.CONFIG_SET('HAVE_FALLOCATE'):
+        conf.CHECK_CODE('''
+		#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 = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);''',
+		'HAVE_LINUX_FALLOCATE',
+		msg="Checking whether the Linux 'fallocate' function is available")
+    if conf.CONFIG_SET('HAVE_FALLOCATE64'):
+        conf.CHECK_CODE('''
+		#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);''',
+		'HAVE_LINUX_FALLOCATE64',
+		msg="Checking whether the Linux 'fallocate64' function is available")
+    conf.CHECK_CODE('''
+		#if defined(HAVE_UNISTD_H)
+		#include <unistd.h>
+		#endif
+		#include <fcntl.h>
+		ssize_t err = readahead(0,0,0x80000);''',
+		'HAVE_LINUX_READAHEAD',
+		msg="Checking whether Linux readahead is available")
+    conf.CHECK_DECLS('readahead', headers='fcntl.h', always=True)
+
+    conf.CHECK_CODE('''
+		#include <sys/types.h>
+		#include <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")
+
     default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam pdb_ldap
                                       auth_sam auth_unix auth_winbind auth_wbc auth_server
                                       auth_domain auth_builtin auth_netlogond vfs_default


-- 
Samba Shared Repository


More information about the samba-cvs mailing list