[Spice-devel] [PATCH 5/8] add config.h to autogenerated files too
Christophe Fergeau
cfergeau at redhat.com
Thu Apr 21 05:00:19 PDT 2011
Modify the python (de)marshaller generator to add #include
<config.h> at the beginning of the C files it generates
---
spice_codegen.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/spice_codegen.py b/spice_codegen.py
index 3a9989d..4dad06c 100755
--- a/spice_codegen.py
+++ b/spice_codegen.py
@@ -142,6 +142,10 @@ writer.set_option("source", os.path.basename(proto_file))
writer.public_prefix = options.prefix
+writer.writeln("#ifdef HAVE_CONFIG_H")
+writer.writeln("#include <config.h>")
+writer.writeln("#endif")
+
if options.assert_on_error:
writer.set_option("assert_on_error")
--
1.7.4.4
More information about the Spice-devel
mailing list