xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <ijackson@chiark.greenend.org.uk>
Subject: [PATCH 03/14] libxl: provide TOSTRING in libxl_internal.h and libxlu_internal.h
Date: Thu, 12 May 2011 15:36:33 +0100	[thread overview]
Message-ID: <1305211004-31687-4-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1305211004-31687-3-git-send-email-ian.jackson@eu.citrix.com>

From: Ian Jackson <ijackson@chiark.greenend.org.uk>

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>
---
 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

  reply	other threads:[~2011-05-12 14:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 14:36 [PATCH/RFC 00/14] libxl: disk configuration handling Ian Jackson
2011-05-12 14:36 ` [PATCH 01/14] libxl: add missing copyright notices to some files Ian Jackson
2011-05-12 14:36   ` [PATCH 02/14] libxl: add missing copyright notices to autogenerated files Ian Jackson
2011-05-12 14:36     ` Ian Jackson [this message]
2011-05-12 14:36       ` [PATCH 04/14] libxl: make libxl_ctx_free tolerate NULL ctx argument Ian Jackson
2011-05-12 14:36         ` [PATCH 05/14] libxl: disks: expose new "script" parameter for external block scripts Ian Jackson
2011-05-12 14:36           ` [PATCH 06/14] libxl: disks: rename disk param "unpluggable" to "removable" Ian Jackson
2011-05-12 14:36             ` [PATCH 07/14] libxl: disks: Make LIBXL_DISK_BACKEND_UNKNOWN work Ian Jackson
2011-05-12 14:36               ` [PATCH 08/14] libxl: disks: new xlu_disk_parse function Ian Jackson
2011-05-12 14:36                 ` [PATCH 09/14] libxl: disks: commit libxlu_disk_l.[ch] flex output Ian Jackson
2011-05-12 14:36                   ` [PATCH 10/14] docs: update xl-disk-configuration.txt to describe new syntax Ian Jackson
2011-05-12 14:36                     ` [PATCH 11/14] xl: disks: replace config file disk spec parser with call to xlu_disk_parse Ian Jackson
2011-05-12 14:36                       ` [PATCH 12/14] xl: disks: replace block-attach disk config parser with call to xlu_parse_disk Ian Jackson
2011-05-12 14:36                         ` [PATCH 13/14] libxl: disks: allow specification of "backendtype=phy|tap|qdisk" Ian Jackson
2011-05-12 14:36                           ` [PATCH 14/14] xl: xl block-attach -N (dry run) option Ian Jackson
2011-05-13 12:56                             ` Ian Campbell
2011-05-13 12:53                           ` [PATCH 13/14] libxl: disks: allow specification of "backendtype=phy|tap|qdisk" Ian Campbell
2011-06-02 16:57                             ` Ian Jackson
2011-05-12 14:42                         ` [PATCH 12/14] xl: disks: replace block-attach disk config parser with call to xlu_parse_disk Ian Jackson
2011-05-13 12:50                         ` Ian Campbell
2011-05-13 12:49                       ` [PATCH 11/14] xl: disks: replace config file disk spec parser with call to xlu_disk_parse Ian Campbell
2011-05-13 12:45                     ` [PATCH 10/14] docs: update xl-disk-configuration.txt to describe new syntax Ian Campbell
2011-05-18 10:31                       ` Ian Jackson
2011-05-20  9:27                         ` Ian Campbell
2011-05-20 10:21                           ` Ian Jackson
2011-05-20 10:26                             ` Ian Campbell
2011-05-13 10:49                   ` [PATCH 09/14] libxl: disks: commit libxlu_disk_l.[ch] flex output Ian Campbell
2011-05-13 10:48                 ` [PATCH 08/14] libxl: disks: new xlu_disk_parse function Ian Campbell
2011-06-02 16:50                   ` Ian Jackson
2011-05-13 10:38               ` [PATCH 07/14] libxl: disks: Make LIBXL_DISK_BACKEND_UNKNOWN work Ian Campbell
2011-06-02 16:48                 ` Ian Jackson
2011-05-13 10:36             ` [PATCH 06/14] libxl: disks: rename disk param "unpluggable" to "removable" Ian Campbell
2011-05-13 10:35           ` [PATCH 05/14] libxl: disks: expose new "script" parameter for external block scripts Ian Campbell
2011-06-02 16:48             ` Ian Jackson
2011-05-13 10:33 ` [PATCH/RFC 00/14] libxl: disk configuration handling Ian Campbell
2011-06-02 16:57   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305211004-31687-4-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=ijackson@chiark.greenend.org.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).