aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-08-20 19:42:19 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-27 20:30:20 -0500
commitf0d99ad7116e9f6f62db6f7c7fa7b1fca8289b3c (patch)
tree4bde1019253f46efeb7e87535f80b94227ccf11a
parentqcow2: Metadata preallocation (diff)
downloadqemu-kvm-f0d99ad7116e9f6f62db6f7c7fa7b1fca8289b3c.tar.gz
qemu-kvm-f0d99ad7116e9f6f62db6f7c7fa7b1fca8289b3c.tar.bz2
qemu-kvm-f0d99ad7116e9f6f62db6f7c7fa7b1fca8289b3c.zip
move useful type definitons to osdep.h
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/qdev.h3
-rw-r--r--osdep.h3
2 files changed, 3 insertions, 3 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 204c4e5d9..a75de6fbc 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 2517b1a36..32ee94b5a 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