diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2011-06-02 18:46:32 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2011-06-02 18:46:32 +0100 |
commit | d72ede734de97c250c440f18d8f056f666bf5448 (patch) | |
tree | 1a4aa55fbb4352ba03fe76a6fc97d650c62a5e45 /tools | |
parent | dc7f5bd00c5a1f2db5fc55e4d2c99c637c9093ef (diff) | |
download | xen-d72ede734de97c250c440f18d8f056f666bf5448.tar.gz xen-d72ede734de97c250c440f18d8f056f666bf5448.tar.bz2 xen-d72ede734de97c250c440f18d8f056f666bf5448.zip |
libxl: provide TOSTRING in libxl_internal.h and libxlu_internal.h
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxl/libxl.c | 2 | ||||
-rw-r--r-- | tools/libxl/libxl_internal.h | 4 | ||||
-rw-r--r-- | tools/libxl/libxlu_internal.h | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index f4f65c698c..344eec3cdf 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 17d7e946e4..3d3bf52f0c 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -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 diff --git a/tools/libxl/libxlu_internal.h b/tools/libxl/libxlu_internal.h index e251a639a8..9c609b1495 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*/ |