[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Tue Jan 11 18:30:01 MST 2011


The branch, master has been updated
       via  e2a3ff1 s3-waf: add check for SO_PEERCRED.
       via  4c8b9be s3-waf: add checks for Linux readahead.
       via  4412eb9 s3-waf: more fallocate checks stolen from autoconf.
      from  e723de8 Add some debug in s4's winbind server

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e2a3ff184e7e6133b3536c5a40c9f05849b1f196
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

commit 4c8b9bee14ba9bcf4cc0a00985247fda3a29deef
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

commit 4412eb9d008d259cebafa7062d4826d69e67d89c
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

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

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