]> git.proxmox.com Git - qemu.git/commitdiff
move useful type definitons to osdep.h
authorJuan Quintela <quintela@redhat.com>
Thu, 20 Aug 2009 17:42:19 +0000 (19:42 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 28 Aug 2009 01:30:20 +0000 (20:30 -0500)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev.h
osdep.h

index 204c4e5d95c2fb661883b7de5ab3491f6b44baf3..a75de6fbc506e54110480fa63cac9a91fb57e164 100644 (file)
--- 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 2517b1a36885a4e23b14d50b86dba3358796f586..32ee94b5ad48892eced2158f4c5b3d3ff5d53cb7 100644 (file)
--- 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