ia64/xen-unstable

changeset 9876:15788ab9fce2

Define __XEN_TOOLS__ when building tools. Use this to
automatically build against latest Xen interface version,
and to specifically define GET_XEN_GUEST_HANDLE().

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Apr 27 14:06:41 2006 +0100 (2006-04-27)
parents 4e0f2272fbcd
children 4e909143218c
files tools/Rules.mk xen/include/public/arch-ia64.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/xen-compat.h
line diff
     1.1 --- a/tools/Rules.mk	Thu Apr 27 14:03:22 2006 +0100
     1.2 +++ b/tools/Rules.mk	Thu Apr 27 14:06:41 2006 +0100
     1.3 @@ -12,7 +12,7 @@ XEN_LIBXENSTAT     = $(XEN_ROOT)/tools/x
     1.4  
     1.5  X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
     1.6  
     1.7 -CFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030201
     1.8 +CFLAGS += -D__XEN_TOOLS__
     1.9  
    1.10  %.opic: %.c
    1.11  	$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
     2.1 --- a/xen/include/public/arch-ia64.h	Thu Apr 27 14:03:22 2006 +0100
     2.2 +++ b/xen/include/public/arch-ia64.h	Thu Apr 27 14:06:41 2006 +0100
     2.3 @@ -13,7 +13,9 @@
     2.4  #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
     2.5  #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
     2.6  #define SET_XEN_GUEST_HANDLE(hnd, val)  do { (hnd).p = val; } while (0)
     2.7 +#ifdef __XEN_TOOLS__
     2.8  #define GET_XEN_GUEST_HANDLE(val, hnd)  do { val = (hnd).p; } while (0)
     2.9 +#endif
    2.10  
    2.11  #ifndef __ASSEMBLY__
    2.12  /* Guest handles for primitive C types. */
     3.1 --- a/xen/include/public/arch-x86_32.h	Thu Apr 27 14:03:22 2006 +0100
     3.2 +++ b/xen/include/public/arch-x86_32.h	Thu Apr 27 14:06:41 2006 +0100
     3.3 @@ -15,7 +15,9 @@
     3.4  #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
     3.5  #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
     3.6  #define SET_XEN_GUEST_HANDLE(hnd, val)  do { (hnd).p = val; } while (0)
     3.7 +#ifdef __XEN_TOOLS__
     3.8  #define GET_XEN_GUEST_HANDLE(val, hnd)  do { val = (hnd).p; } while (0)
     3.9 +#endif
    3.10  
    3.11  #ifndef __ASSEMBLY__
    3.12  /* Guest handles for primitive C types. */
     4.1 --- a/xen/include/public/arch-x86_64.h	Thu Apr 27 14:03:22 2006 +0100
     4.2 +++ b/xen/include/public/arch-x86_64.h	Thu Apr 27 14:06:41 2006 +0100
     4.3 @@ -15,7 +15,9 @@
     4.4  #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
     4.5  #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
     4.6  #define SET_XEN_GUEST_HANDLE(hnd, val)  do { (hnd).p = val; } while (0)
     4.7 +#ifdef __XEN_TOOLS__
     4.8  #define GET_XEN_GUEST_HANDLE(val, hnd)  do { val = (hnd).p; } while (0)
     4.9 +#endif
    4.10  
    4.11  #ifndef __ASSEMBLY__
    4.12  /* Guest handles for primitive C types. */
     5.1 --- a/xen/include/public/xen-compat.h	Thu Apr 27 14:03:22 2006 +0100
     5.2 +++ b/xen/include/public/xen-compat.h	Thu Apr 27 14:06:41 2006 +0100
     5.3 @@ -11,7 +11,7 @@
     5.4  
     5.5  #define __XEN_LATEST_INTERFACE_VERSION__ 0x00030201
     5.6  
     5.7 -#if defined(__XEN__)
     5.8 +#if defined(__XEN__) || defined(__XEN_TOOLS__)
     5.9  /* Xen is built with matching headers and implements the latest interface. */
    5.10  #define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__
    5.11  #elif !defined(__XEN_INTERFACE_VERSION__)