libxl: provide TOSTRING in libxl_internal.h and libxlu_internal.h
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 2 Jun 2011 17:46:32 +0000 (18:46 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 2 Jun 2011 17:46:32 +0000 (18:46 +0100)
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@chiark.greenend.org.uk>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_internal.h
tools/libxl/libxlu_internal.h

index f4f65c698c5e238a9d1ccf889ee3dd2b2b1f6eb9..344eec3cdf7348688b94a33b1fb3887b58599093 100644 (file)
@@ -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)
 {
index 17d7e946e44996c0aa026bc9585b85c105976dbd..3d3bf52f0ccce2a1ad9e259045e1ec34bb5e9ae5 100644 (file)
@@ -370,4 +370,8 @@ _hidden int libxl__file_reference_map(libxl_file_reference *f);
 _hidden int libxl__file_reference_unmap(libxl_file_reference *f);
 
 _hidden int libxl__e820_alloc(libxl_ctx *ctx, uint32_t domid, libxl_domain_config *d_config);
+
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+
 #endif
index e251a639a88b24fafa60d30d0e68c018776b092b..9c609b14954703862177c7e8be78356f7fa11e9b 100644 (file)
@@ -45,4 +45,8 @@ typedef struct {
     void *scanner;
 } CfgParseContext;
 
+
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+
 #endif /*LIBXLU_INTERNAL_H*/