[SCM] Samba Shared Repository - branch master updated

Rusty Russell rusty at samba.org
Tue Aug 30 23:59:02 MDT 2011


The branch, master has been updated
       via  cdce324 MAINTAINERS.txt: ping me about CCAN changes
       via  b88e0c4 ccan: fix likely redefinition warnings with --enable-tdb2
       via  b10ad70 tdb2: fix build with --enable-tdb2
      from  480a031 smb2_constants: add SMB2_HDR_CREDIT_CHARGE

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


- Log -----------------------------------------------------------------
commit cdce32470a9e6f16da5149c91989382390012663
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Wed Aug 31 13:58:14 2011 +0930

    MAINTAINERS.txt: ping me about CCAN changes
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    Autobuild-User: Rusty Russell <rusty at rustcorp.com.au>
    Autobuild-Date: Wed Aug 31 07:58:34 CEST 2011 on sn-devel-104

commit b88e0c40b777480e101a7524697656d6a03fb563
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Wed Aug 31 13:57:14 2011 +0930

    ccan: fix likely redefinition warnings with --enable-tdb2
    
    When we do --enable-tdb2, we start clashing with the replace.h
    version:
    
    In file included from ../lib/tdb2/tools/../private.h:25:0,
                     from ../lib/tdb2/tools/tdb2torture.c:60:
    ../lib/ccan/likely/likely.h:32:0: warning: "likely" redefined
    ../lib/replace/replace.h:762:0: note: this is the location of the previous definition
    ../lib/ccan/likely/likely.h:53:0: warning: "unlikely" redefined
    ../lib/replace/replace.h:765:0: note: this is the location of the previous definition
    
    I don't like to #ifndef-protect them in general, since you don't want
    different parts of the code to silently have different definitions,
    but it's the simplest fix for now.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit b10ad70f8fd5ee359b4409b373ba93ff050c82d4
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Wed Aug 31 13:56:40 2011 +0930

    tdb2: fix build with --enable-tdb2
    
    tdb2 doesn't expost tdb_jenkins_hash; go straight to the source in
    ccan/hash.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

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

Summary of changes:
 MAINTAINERS.txt                    |    5 +++++
 lib/ccan/likely/likely.h           |    8 ++++++++
 source3/modules/vfs_shadow_copy2.c |    5 ++---
 3 files changed, 15 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/MAINTAINERS.txt b/MAINTAINERS.txt
index 36e1840..9e40103 100644
--- a/MAINTAINERS.txt
+++ b/MAINTAINERS.txt
@@ -72,6 +72,11 @@ policy:
          Other non-trivial (typo, etc) commits require pre- or post-push review by the
          maintainer or one of the maintainers of the containing subsystem.
 
+files: lib/ccan
+maintainers:
+         Rusty Russell <rusty at samba.org>
+policy:
+         Please ping me when changes made, so I can sync with CCAN project.
 
 =======================================================================
 
diff --git a/lib/ccan/likely/likely.h b/lib/ccan/likely/likely.h
index c43d276..3a9c6d4 100644
--- a/lib/ccan/likely/likely.h
+++ b/lib/ccan/likely/likely.h
@@ -30,7 +30,9 @@
  *		return false;
  *	}
  */
+#ifndef likely
 #define likely(cond) __builtin_expect(!!(cond), 1)
+#endif
 
 /**
  * unlikely - indicate that a condition is unlikely to be true.
@@ -51,11 +53,17 @@
  *			fprintf(stderr, "Overflow!");
  *	}
  */
+#ifndef unlikely
 #define unlikely(cond) __builtin_expect(!!(cond), 0)
+#endif
 #else
+#ifndef likely
 #define likely(cond) (!!(cond))
+#endif
+#ifndef unlikely
 #define unlikely(cond) (!!(cond))
 #endif
+#endif
 #else /* CCAN_LIKELY_DEBUG versions */
 #define likely(cond) \
 	(_likely_trace(!!(cond), 1, stringify(cond), __FILE__, __LINE__))
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index ca33b6d..4ac9e84 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -99,7 +99,7 @@
 #include "system/filesys.h"
 #include "include/ntioctl.h"
 #include "smbd/proto.h"
-#include <tdb.h>
+#include <ccan/hash/hash.h>
 #include "util_tdb.h"
 
 #define GMT_NAME_LEN 24 /* length of a @GMT- name */
@@ -438,9 +438,8 @@ static void convert_sbuf(vfs_handle_struct *handle, const char *fname,
 		   without significant VFS changes
 		*/
 		uint32_t shash;
-		TDB_DATA data = string_tdb_data(fname);
 
-		shash = tdb_jenkins_hash(&data) & 0xFF000000;
+		shash = hash(fname, strlen(fname), 0) & 0xFF000000;
 		if (shash == 0) {
 			shash = 1;
 		}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list