Add offsetof to compiler.h
[urcu.git] / tests / api_x86.h
index f48fce939453b5922113a74f34d0959709bf1af5..d64eb8d4a6a2d89a17c4f4636697d303d778811e 100644 (file)
@@ -346,7 +346,6 @@ __asm__ __volatile__(LOCK_PREFIX "orl %0,%1" \
 /*
  * Compiler magic.
  */
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 #define container_of(ptr, type, member) ({                     \
        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
        (type *)( (char *)__mptr - offsetof(type,member) );})
@@ -693,7 +692,6 @@ static void smp_init(void)
 #define LIST_POISON1  ((void *) 0x00100100)
 #define LIST_POISON2  ((void *) 0x00200200)
 
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 #define container_of(ptr, type, member) ({                     \
        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
        (type *)( (char *)__mptr - offsetof(type,member) );})
This page took 0.022237 seconds and 4 git commands to generate.