commit | f0d99ad7116e9f6f62db6f7c7fa7b1fca8289b3c | [log] [tgz] |
---|---|---|
author | Juan Quintela <quintela@redhat.com> | Thu Aug 20 19:42:19 2009 +0200 |
committer | Anthony Liguori <aliguori@us.ibm.com> | Thu Aug 27 20:30:20 2009 -0500 |
tree | 4bde1019253f46efeb7e87535f80b94227ccf11a | |
parent | a35e1c177debb01240243bd656caca302410d38c [diff] [blame] |
move useful type definitons to osdep.h Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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