Fix gcc-4.1 x86_64 compability
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 13 Oct 2009 16:19:29 +0000 (12:19 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 13 Oct 2009 16:19:29 +0000 (12:19 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
urcu/arch_x86.h
urcu/uatomic_arch_x86.h

index 4ba08f7a288796186aeda16679d3fe8a7d558506..f137a16d841c48e3c663a645286137ffe2114a04 100644 (file)
 
 #define CACHE_LINE_SIZE        128
 
-#ifndef BITS_PER_LONG
-#define BITS_PER_LONG  (__SIZEOF_LONG__ * 8)
-#endif
-
 #ifdef CONFIG_URCU_HAVE_FENCE
 #define mb()    asm volatile("mfence":::"memory")
 #define rmb()   asm volatile("lfence":::"memory")
index dfb58763a37259b88a8962f9bd607767d5c59a3a..39ec407e58c0612458ffc82209e20fc711dec0fd 100644 (file)
 
 #include <urcu/compiler.h>
 
+#ifndef __SIZEOF_LONG__
+#if defined(__x86_64__) || defined(__amd64__)
+#define __SIZEOF_LONG__ 8
+#else
+#define __SIZEOF_LONG__ 4
+#endif
+#endif
+
 #ifndef BITS_PER_LONG
 #define BITS_PER_LONG  (__SIZEOF_LONG__ * 8)
 #endif
This page took 0.025049 seconds and 4 git commands to generate.