[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Mon Nov 10 00:30:04 MST 2014


The branch, master has been updated
       via  2afc5b7 Don't use a nested function when testing for visibility attribute support.
       via  e2b5ae1 data_blob.h: Add space between literal and string constant.
       via  6bc62af Use tevent_req_simple_recv_unix in a few places
       via  f5c17d4 lib: Add tevent_req_simple_recv_unix
      from  5f68f72 vfs_snapper: check for <linux/ioctl.h>

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


- Log -----------------------------------------------------------------
commit 2afc5b797826780c07e04ed153edc82f410668a2
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 8 16:22:30 2014 +0000

    Don't use a nested function when testing for visibility attribute support.
    
    Some compilers support __attribute__((visibility)), but not nested
    functions (e.g. http://www.cprover.org/goto-cc/)
    
    Change-Id: I01a5dd6f5f913664621c4090e2dca177527436bb
    Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749983
    Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749985
    Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749986
    Signed-Off-By: Jelmer Vernooij <jelmer at debian.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Mon Nov 10 08:29:19 CET 2014 on sn-devel-104

commit e2b5ae135b740c7a6d04c2ef8137ce4064d83dff
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 8 14:15:41 2014 +0000

    data_blob.h: Add space between literal and string constant.
    
    C++11 compilers warn if there is a missing space:
    
    invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
    
    Change-Id: Ib7e11c72c09de588ec558cfbf9dded8c625bf49b
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6bc62af42ea5cc2eba90c73fb73188b57a59a347
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Nov 8 09:05:23 2014 +0000

    Use tevent_req_simple_recv_unix in a few places
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit f5c17d41e085e083ef970692ff7f50f7a6642ea3
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Nov 8 09:00:31 2014 +0000

    lib: Add tevent_req_simple_recv_unix
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 lib/replace/wscript            |  4 ++--
 lib/util/data_blob.h           |  6 +++---
 lib/util/tevent_unix.c         | 13 +++++++++++++
 lib/util/tevent_unix.h         |  1 +
 source3/lib/ctdb_conn.c        |  6 +-----
 source3/lib/tevent_barrier.c   |  7 +------
 source3/lib/tevent_wait.c      |  7 +------
 source3/smbd/notify_internal.c |  7 +------
 8 files changed, 23 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/wscript b/lib/replace/wscript
index 16fd50b..7bbe1d6 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -639,10 +639,10 @@ removeea setea
 
     if conf.CHECK_CFLAGS('-fvisibility=hidden'):
         conf.env.VISIBILITY_CFLAGS = '-fvisibility=hidden'
-        conf.CHECK_CODE('''void vis_foo1(void) {}
+        conf.CHECK_CODE('''int main(void) { return 0; }
                            __attribute__((visibility("default"))) void vis_foo2(void) {}''',
                         cflags=conf.env.VISIBILITY_CFLAGS,
-                        define='HAVE_VISIBILITY_ATTR')
+                        define='HAVE_VISIBILITY_ATTR', addmain=False)
 
     # look for a method of finding the list of network interfaces
     for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
diff --git a/lib/util/data_blob.h b/lib/util/data_blob.h
index a5caa92..94af767 100644
--- a/lib/util/data_blob.h
+++ b/lib/util/data_blob.h
@@ -49,9 +49,9 @@ struct data_blob_list_item {
    a fair bit of code */
 #define ldb_val datablob
 
-#define data_blob(ptr, size) data_blob_named(ptr, size, "DATA_BLOB: "__location__)
-#define data_blob_talloc(ctx, ptr, size) data_blob_talloc_named(ctx, ptr, size, "DATA_BLOB: "__location__)
-#define data_blob_dup_talloc(ctx, blob) data_blob_talloc_named(ctx, (blob).data, (blob).length, "DATA_BLOB: "__location__)
+#define data_blob(ptr, size) data_blob_named(ptr, size, "DATA_BLOB: " __location__)
+#define data_blob_talloc(ctx, ptr, size) data_blob_talloc_named(ctx, ptr, size, "DATA_BLOB: " __location__)
+#define data_blob_dup_talloc(ctx, blob) data_blob_talloc_named(ctx, (blob).data, (blob).length, "DATA_BLOB: " __location__)
 
 /**
  construct a data blob, must be freed with data_blob_free()
diff --git a/lib/util/tevent_unix.c b/lib/util/tevent_unix.c
index e4c960e..ee7ec8a 100644
--- a/lib/util/tevent_unix.c
+++ b/lib/util/tevent_unix.c
@@ -48,3 +48,16 @@ bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno)
 	}
 	return true;
 }
+
+int tevent_req_simple_recv_unix(struct tevent_req *req)
+{
+	int err = 0;
+
+	/*
+	 * Ignore result of tevent_req_is_unix_error, we're only interested in
+	 * the status
+	 */
+	tevent_req_is_unix_error(req, &err);
+	tevent_req_received(req);
+	return err;
+}
diff --git a/lib/util/tevent_unix.h b/lib/util/tevent_unix.h
index 377e976..c1b0eb4 100644
--- a/lib/util/tevent_unix.h
+++ b/lib/util/tevent_unix.h
@@ -27,5 +27,6 @@
 #include <tevent.h>
 
 bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno);
+int tevent_req_simple_recv_unix(struct tevent_req *req);
 
 #endif
diff --git a/source3/lib/ctdb_conn.c b/source3/lib/ctdb_conn.c
index c705c21..a54e83d 100644
--- a/source3/lib/ctdb_conn.c
+++ b/source3/lib/ctdb_conn.c
@@ -347,11 +347,7 @@ static void ctdb_conn_msg_write_done(struct tevent_req *subreq)
 
 int ctdb_conn_msg_write_recv(struct tevent_req *req)
 {
-	int err;
-	if (tevent_req_is_unix_error(req, &err)) {
-		return err;
-	}
-	return 0;
+	return tevent_req_simple_recv_unix(req);
 }
 
 struct ctdb_msg_channel {
diff --git a/source3/lib/tevent_barrier.c b/source3/lib/tevent_barrier.c
index d699b5f..318c896 100644
--- a/source3/lib/tevent_barrier.c
+++ b/source3/lib/tevent_barrier.c
@@ -188,10 +188,5 @@ static void tevent_barrier_release_trigger(struct tevent_context *ctx,
 
 int tevent_barrier_wait_recv(struct tevent_req *req)
 {
-	int err;
-
-	if (tevent_req_is_unix_error(req, &err)) {
-		return err;
-	}
-	return 0;
+	return tevent_req_simple_recv_unix(req);
 }
diff --git a/source3/lib/tevent_wait.c b/source3/lib/tevent_wait.c
index ec7c8cb..81fb213 100644
--- a/source3/lib/tevent_wait.c
+++ b/source3/lib/tevent_wait.c
@@ -74,10 +74,5 @@ static void tevent_wait_trigger(struct tevent_context *ctx,
 
 int tevent_wait_recv(struct tevent_req *req)
 {
-	int err;
-
-	if (tevent_req_is_unix_error(req, &err)) {
-		return err;
-	}
-	return 0;
+	return tevent_req_simple_recv_unix(req);
 }
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index 4e9862a..9d54891 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -1251,10 +1251,5 @@ static void notify_cluster_proxy_trigger(struct notify_context *notify,
 
 int notify_cluster_proxy_recv(struct tevent_req *req)
 {
-	int err;
-
-	if (tevent_req_is_unix_error(req, &err)) {
-		return err;
-	}
-	return 0;
+	return tevent_req_simple_recv_unix(req);
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list