[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Mon Aug 30 13:02:25 MDT 2010


The branch, master has been updated
       via  b4610cd s4:lib/messaging: add some const to messaging_send()
       via  7346772 Disable gccdeps if -MD is not supported
      from  a8d8cf0 vfs_smb_traffic_analyzer: fix off by a second bug

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


- Log -----------------------------------------------------------------
commit b4610cdb3b1d8e20bafd6d2d563360a59ef33ba3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Aug 30 13:42:20 2010 +0200

    s4:lib/messaging: add some const to messaging_send()
    
    metze

commit 734677292fb6fb4f7cccc7ab1c6fd04ad2203aed
Author: Thomas Nagy <tnagy2pow10 at gmail.com>
Date:   Mon Aug 30 15:02:26 2010 +0200

    Disable gccdeps if -MD is not supported
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

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

Summary of changes:
 buildtools/wafsamba/wscript       |   26 +++++++++++++++++++++++---
 source4/lib/messaging/irpc.h      |    2 +-
 source4/lib/messaging/messaging.c |    2 +-
 3 files changed, 25 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index bad65ca..e2b1a27 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -82,7 +82,7 @@ def set_options(opt):
                    action="store_true", dest='fatal_errors', default=False)
     gr.add_option('--enable-gccdeps',
                    help=("Enable use of gcc -MD dependency module"),
-                   action="store_true", dest='enable_gccdeps', default=False)
+                   action="store_true", dest='enable_gccdeps', default=True)
     gr.add_option('--timestamp-dependencies',
                    help=("use file timestamps instead of content for build dependencies (BROKEN)"),
                    action="store_true", dest='timestamp_dependencies', default=False)
@@ -160,9 +160,29 @@ def configure(conf):
     # we need git for 'waf dist'
     conf.find_program('git', var='GIT')
 
+    # older gcc versions (< 4.4) does not work with gccdeps, so we have to see if the .d file is generated
     if Options.options.enable_gccdeps:
-        # don't enable gccdeps by default as it needs a very recent version gcc
-        conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba")
+        from TaskGen import feature, after
+        @feature('testd')
+        @after('apply_core')
+        def check_d(self):
+            tsk = self.compiled_tasks[0]
+            tsk.outputs.append(tsk.outputs[0].change_ext('.d'))
+
+        import Task
+        cc = Task.TaskBase.classes['cc']
+        oldmeth = cc.run
+
+        cc.run = Task.compile_fun_noshell('cc', '${CC} ${CCFLAGS} ${CPPFLAGS} ${_CCINCFLAGS} ${_CCDEFFLAGS} ${CC_SRC_F}${SRC} ${CC_TGT_F}${TGT[0].abspath(env)}')[0]
+        try:
+            try:
+                conf.check(features='cc testd', fragment='int main() {return 0;}\n', ccflags=['-MD'], mandatory=True, msg='Check for -MD')
+            except:
+                pass
+            else:
+                conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba")
+        finally:
+            cc.run = oldmeth
 
     # make the install paths available in environment
     conf.env.LIBDIR = Options.options.LIBDIR or '${PREFIX}/lib'
diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h
index e7c0b87..6607eb4 100644
--- a/source4/lib/messaging/irpc.h
+++ b/source4/lib/messaging/irpc.h
@@ -88,7 +88,7 @@ typedef void (*msg_callback_t)(struct messaging_context *msg, void *private_data
 			       struct server_id server_id, DATA_BLOB *data);
 
 NTSTATUS messaging_send(struct messaging_context *msg, struct server_id server, 
-			uint32_t msg_type, DATA_BLOB *data);
+			uint32_t msg_type, const DATA_BLOB *data);
 NTSTATUS messaging_register(struct messaging_context *msg, void *private_data,
 			    uint32_t msg_type, 
 			    msg_callback_t fn);
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 19d6971..290210e 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -448,7 +448,7 @@ void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void
   Send a message to a particular server
 */
 NTSTATUS messaging_send(struct messaging_context *msg, struct server_id server, 
-			uint32_t msg_type, DATA_BLOB *data)
+			uint32_t msg_type, const DATA_BLOB *data)
 {
 	struct messaging_rec *rec;
 	NTSTATUS status;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list