Patchwork [01/23] move useful type definitons to osdep.h

login
register
mail settings
Submitter Juan Quintela
Date Aug. 20, 2009, 5:42 p.m.
Message ID <3d46d2b4a5e43fafd1ed65a304923a17b50b8e17.1250788880.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/31750/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 20, 2009, 5:42 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/qdev.h |    3 ---
 osdep.h   |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/qdev.h b/hw/qdev.h
index 204c4e5..a75de6f 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 2517b1a..32ee94b 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