Take __weak out of the compiler namespace
With Xcode 4 on OS X shipping LLVM by default, I tried building fio with
clang and found that the definition of __weak conflicts with something
clang defines. I've attached a patch which replaces the double
underscores with a single underscore, removing it from the
compiler-dependant namespace.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/compiler/compiler.h b/compiler/compiler.h
index 33500a9..8dec350 100644
--- a/compiler/compiler.h
+++ b/compiler/compiler.h
@@ -15,11 +15,11 @@
#define uninitialized_var(x) x = x
-#ifndef __weak
+#ifndef _weak
#ifndef __CYGWIN__
-#define __weak __attribute__((weak))
+#define _weak __attribute__((weak))
#else
-#define __weak
+#define _weak
#endif
#endif