From b1a6860feb37966a8a4419ad33d517bdeb773cd8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 4 May 2011 13:41:23 +0100 Subject: [PATCH 2/3] Include config.h in generated C files, and regenerate dbus-gmarshal.c --- dbus/Makefile.am | 3 ++- dbus/dbus-gmarshal.c | 7 +++++-- dbus/examples/statemachine/Makefile.am | 4 +++- test/core/Makefile.am | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dbus/Makefile.am b/dbus/Makefile.am index b9aa1c2..b79f870 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -91,7 +91,8 @@ dbus_binding_tool_LDADD= $(builddir)/libdbus-gtool.la $(builddir)/libdbus-glib-1 ## convincing automake/make to do this properly regenerate-built-sources: @GLIB_GENMARSHAL@ --prefix=_dbus_g_marshal dbus-gmarshal.list --header > dbus-gmarshal.h && \ - echo '#include "dbus-gmarshal.h"' > dbus-gmarshal.c && \ + echo '#include ' > dbus-gmarshal.c && \ + echo '#include "dbus-gmarshal.h"' >> dbus-gmarshal.c && \ @GLIB_GENMARSHAL@ --prefix=_dbus_g_marshal dbus-gmarshal.list --body >> dbus-gmarshal.c diff --git a/dbus/dbus-gmarshal.c b/dbus/dbus-gmarshal.c index 13e98b1..65f13c7 100644 --- a/dbus/dbus-gmarshal.c +++ b/dbus/dbus-gmarshal.c @@ -1,3 +1,4 @@ +#include #include "dbus-gmarshal.h" #include @@ -22,6 +23,7 @@ #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) +#define g_marshal_value_peek_variant(v) g_value_get_variant (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the @@ -45,16 +47,17 @@ #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ /* NONE:STRING,STRING,STRING (dbus-gmarshal.list:1) */ void _dbus_g_marshal_VOID__STRING_STRING_STRING (GClosure *closure, - GValue *return_value, + GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, - gpointer invocation_hint, + gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, diff --git a/dbus/examples/statemachine/Makefile.am b/dbus/examples/statemachine/Makefile.am index 2377621..a9b6237 100644 --- a/dbus/examples/statemachine/Makefile.am +++ b/dbus/examples/statemachine/Makefile.am @@ -34,7 +34,9 @@ statemachine-glue.h: statemachine.xml $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=sm_object --mode=glib-server --output=$@ $< sm-marshal.c: Makefile sm-marshal.list - @GLIB_GENMARSHAL@ --prefix=sm_marshal $(srcdir)/sm-marshal.list --header --body > $@.tmp && mv $@.tmp $@ + echo "#include " > $@.tmp + @GLIB_GENMARSHAL@ --prefix=sm_marshal $(srcdir)/sm-marshal.list --header --body >> $@.tmp + mv $@.tmp $@ sm-marshal.h: Makefile sm-marshal.list @GLIB_GENMARSHAL@ --prefix=sm_marshal $(srcdir)/sm-marshal.list --header > $@.tmp && mv $@.tmp $@ diff --git a/test/core/Makefile.am b/test/core/Makefile.am index ccb17f6..219eb16 100644 --- a/test/core/Makefile.am +++ b/test/core/Makefile.am @@ -108,7 +108,9 @@ test-service-glib-bindings.h: test-service-glib.xml $(top_builddir)/dbus/dbus-bi $(DEBUG) $(DBUS_BINDING_TOOL) --prefix=my_object --mode=glib-client --output=test-service-glib-bindings.h $(srcdir)/test-service-glib.xml my-object-marshal.c: Makefile my-object-marshal.list - @GLIB_GENMARSHAL@ --prefix=my_object_marshal $(srcdir)/my-object-marshal.list --header --body > my-object-marshal.c + echo "#include " > $@.tmp + @GLIB_GENMARSHAL@ --prefix=my_object_marshal $(srcdir)/my-object-marshal.list --header --body >> $@.tmp + mv $@.tmp $@ my-object-marshal.h: Makefile my-object-marshal.list @GLIB_GENMARSHAL@ --prefix=my_object_marshal $(srcdir)/my-object-marshal.list --header > my-object-marshal.h -- 1.7.5.1