From: Ian Jackson <ijackson@xxxxxxxxxxxxxxxxxxxxxx>
Provide a copy of the standard TOSTRING macro in libxlu_internal.h,
for the benefit of patches later in this series.
Also, move TOSTRING to libxl_internal.h from a .c file for the
benefit of future other callers in libxl proper.
(These cannot be combined because libxlu cannot include
libxl_internal.h and libxl should not include libxlu_internal.h.)
Signed-off-by: Ian Jackson <ijackson@xxxxxxxxxxxxxxxxxxxxxx>
---
tools/libxl/libxl.c | 2 --
tools/libxl/libxl_internal.h | 3 +++
tools/libxl/libxlu_internal.h | 4 ++++
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index ccf6518..fabad4a 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -38,8 +38,6 @@
#define PAGE_TO_MEMKB(pages) ((pages) * 4)
#define BACKEND_STRING_SIZE 5
-#define STRINGIFY(x) #x
-#define TOSTRING(x) STRINGIFY(x)
int libxl_ctx_alloc(libxl_ctx **pctx, int version, xentoollog_logger * lg)
{
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 64e1d56..5b97583 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -362,4 +362,7 @@ _hidden int libxl__error_set(libxl__gc *gc, int code);
_hidden int libxl__file_reference_map(libxl_file_reference *f);
_hidden int libxl__file_reference_unmap(libxl_file_reference *f);
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+
#endif
diff --git a/tools/libxl/libxlu_internal.h b/tools/libxl/libxlu_internal.h
index e251a63..9c609b1 100644
--- a/tools/libxl/libxlu_internal.h
+++ b/tools/libxl/libxlu_internal.h
@@ -45,4 +45,8 @@ typedef struct {
void *scanner;
} CfgParseContext;
+
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+
#endif /*LIBXLU_INTERNAL_H*/
--
1.7.2.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|