aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/gentypes.py
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2011-09-29 16:28:22 +0100
committerAnthony PERARD <anthony.perard@citrix.com>2011-09-29 16:28:22 +0100
commit7b3574cd562b8cdfc59f047a18f2d610e4b0715b (patch)
tree18a2a050883182f424089e45e88abb47e46ca3ec /tools/libxl/gentypes.py
parent6cde0b9c4e61ffdb06920e3eefee42f4f40d2738 (diff)
downloadxen-7b3574cd562b8cdfc59f047a18f2d610e4b0715b.tar.gz
xen-7b3574cd562b8cdfc59f047a18f2d610e4b0715b.tar.bz2
xen-7b3574cd562b8cdfc59f047a18f2d610e4b0715b.zip
libxl: Introduce libxl_internal_types.idl.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/gentypes.py')
-rw-r--r--tools/libxl/gentypes.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index c66a33c25e..ecf5f152c4 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -150,8 +150,9 @@ if __name__ == '__main__':
f = open(header, "w")
- f.write("""#ifndef __LIBXL_TYPES_H
-#define __LIBXL_TYPES_H
+ header_define = header.upper().replace('.','_')
+ f.write("""#ifndef %s
+#define %s
/*
* DO NOT EDIT.
@@ -160,7 +161,7 @@ if __name__ == '__main__':
* "%s"
*/
-""" % " ".join(sys.argv))
+""" % (header_define, header_define, " ".join(sys.argv)))
for ty in types:
f.write(libxl_C_type_define(ty) + ";\n")
@@ -172,7 +173,7 @@ if __name__ == '__main__':
f.write("extern libxl_enum_string_table %s_string_table[];\n" % (ty.typename))
f.write("\n")
- f.write("""#endif /* __LIBXL_TYPES_H */\n""")
+ f.write("""#endif /* %s */\n""" % (header_define))
f.close()
print "outputting libxl type implementations to %s" % impl