summaryrefslogtreecommitdiff
path: root/gcc/gthr-posix.h
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-03 13:41:00 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-03 13:41:00 +0000
commit7f3859647dfe27e49aa7dbf729893afa774f8b71 (patch)
tree7153437e4ecdd43dc569a82f8f49c43b725e4e5b /gcc/gthr-posix.h
parent6effd6dae55aad08586fceb28b3b787d0a0bb1b9 (diff)
downloadgcc-7f3859647dfe27e49aa7dbf729893afa774f8b71.tar.gz
PR target/28307
* gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK] (__gthrw_pragma): Provide default definition. (__gthrw2): Use it. * gthr-posix.c (__gthrw_pragma): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126253 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gthr-posix.h')
-rw-r--r--gcc/gthr-posix.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h
index 837bc1a9820..47d38a320ba 100644
--- a/gcc/gthr-posix.h
+++ b/gcc/gthr-posix.h
@@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GCC.
@@ -59,8 +59,12 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t;
#endif
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+# define __gthrw_pragma(pragma)
+# endif
# define __gthrw2(name,name2,type) \
- static __typeof(type) name __attribute__ ((__weakref__(#name2)));
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
# define __gthrw_(name) __gthrw_ ## name
#else
# define __gthrw2(name,name2,type)