From: Juan Quintela Date: Thu, 20 Aug 2009 17:42:19 +0000 (+0200) Subject: move useful type definitons to osdep.h X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f0d99ad7116e9f6f62db6f7c7fa7b1fca8289b3c;p=qmiga%2Fqemu.git move useful type definitons to osdep.h Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- diff --git a/hw/qdev.h b/hw/qdev.h index 204c4e5d95..a75de6fbc5 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -163,9 +163,6 @@ extern PropertyInfo qdev_prop_macaddr; extern PropertyInfo qdev_prop_drive; extern PropertyInfo qdev_prop_pci_devfn; -#define typeof_field(type, field) typeof(((type *)0)->field) -#define type_check(t1,t2) ((t1*)0 - (t2*)0) - #define DEFINE_PROP(_name, _state, _field, _prop, _type) { \ .name = (_name), \ .info = &(_prop), \ diff --git a/osdep.h b/osdep.h index 2517b1a368..32ee94b5ad 100644 --- a/osdep.h +++ b/osdep.h @@ -36,6 +36,9 @@ (type *) ((char *) __mptr - offsetof(type, member));}) #endif +#define typeof_field(type, field) typeof(((type *)0)->field) +#define type_check(t1,t2) ((t1*)0 - (t2*)0) + #ifndef MIN #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif