Module Name: src
Committed By: drochner
Date: Thu May 6 10:01:20 UTC 2010
Modified Files:
src/gnu/dist/gcc4/gcc: gthr-posix.h
Log Message:
make the stdc++ headers usable for clang++. clang wants that __weakref__
declarations are "static", gcc-4.1 uses "extern" here.
(gcc-4.2 uses "static" as well, so this looks like a bug in gcc.)
approved by mrg
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/gnu/dist/gcc4/gcc/gthr-posix.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/gnu/dist/gcc4/gcc/gthr-posix.h
diff -u src/gnu/dist/gcc4/gcc/gthr-posix.h:1.1.1.3 src/gnu/dist/gcc4/gcc/gthr-posix.h:1.2
--- src/gnu/dist/gcc4/gcc/gthr-posix.h:1.1.1.3 Sat Feb 2 22:48:13 2008
+++ src/gnu/dist/gcc4/gcc/gthr-posix.h Thu May 6 10:01:20 2010
@@ -62,9 +62,15 @@
# ifndef __gthrw_pragma
# define __gthrw_pragma(pragma)
# endif
+# ifdef __clang__
+# define __gthrw2(name,name2,type) \
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
+# else
# define __gthrw2(name,name2,type) \
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
__gthrw_pragma(weak type)
+# endif
# define __gthrw_(name) __gthrw_ ## name
#else
# define __gthrw2(name,name2,type)