diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-04-02 09:48:04 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-04-02 09:48:04 +0100 |
commit | 8adde1d0c5aa2783455226fec6cd1b679dcaecab (patch) | |
tree | 14927ce470caf0e03545644fc2f8cd3bba6f288b | |
parent | 9cf21925de2dee4365e83fd0c18b13aef621ae41 (diff) | |
download | xen-8adde1d0c5aa2783455226fec6cd1b679dcaecab.tar.gz xen-8adde1d0c5aa2783455226fec6cd1b679dcaecab.tar.bz2 xen-8adde1d0c5aa2783455226fec6cd1b679dcaecab.zip |
Define __XEN_INTERFACE_VERSION__ when building Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r-- | xen/include/public/xen-compat.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xen/include/public/xen-compat.h b/xen/include/public/xen-compat.h index 67af72b344..c4f235095d 100644 --- a/xen/include/public/xen-compat.h +++ b/xen/include/public/xen-compat.h @@ -9,10 +9,20 @@ #ifndef __XEN_PUBLIC_XEN_COMPAT_H__ #define __XEN_PUBLIC_XEN_COMPAT_H__ -#ifndef __XEN_INTERFACE_VERSION__ +#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030101 + +#if defined(__XEN__) +/* Xen is built with matching headers and implements the latest interface. */ +#define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__ +#elif !defined(__XEN_INTERFACE_VERSION__) +/* Guests which do not specify a version get the legacy interface. */ #define __XEN_INTERFACE_VERSION__ 0x00000000 #endif +#if __XEN_INTERFACE_VERSION__ > __XEN_LATEST_INTERFACE_VERSION__ +#error "These header files do not support the requested interface version." +#endif + #if __XEN_INTERFACE_VERSION__ < 0x00030101 #undef __HYPERVISOR_sched_op #define __HYPERVISOR_sched_op __HYPERVISOR_sched_op_compat |