aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-12-21 09:46:55 +0000
committerJakub Jelinek <jakub@redhat.com>2005-12-21 09:46:55 +0000
commite3173d2c996d8e30dfe44e9bf530881da6df6aaa (patch)
tree88d7db2140348f9328c7250d20aecb7f8adcb79b
parentUpdated to fedora-glibc-20051221T0931 (diff)
downloadglibc-e3173d2c996d8e30dfe44e9bf530881da6df6aaa.tar.gz
glibc-e3173d2c996d8e30dfe44e9bf530881da6df6aaa.tar.bz2
glibc-e3173d2c996d8e30dfe44e9bf530881da6df6aaa.zip
Workaround for http://gcc.gnu.org/PR25240 * include/libc-symbols.h (weak_extern): Define using weak attribute. (_weak_extern): Remove. (weak_tls_extern): Define. * locale/uselocale.c (DEFINE_CATEGORY): Use weak_tls_extern for _nl_current_##category. * locale/setlocale.c (DEFINE_CATEGORY): Likewise.
-rw-r--r--ChangeLog8
-rw-r--r--include/libc-symbols.h4
-rw-r--r--locale/setlocale.c2
-rw-r--r--locale/uselocale.c2
4 files changed, 4 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 93c0f79b0b..f471b85859 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -117,14 +117,6 @@
(mcheck): Call __libc_malloc and __libc_free instead of
malloc and free.
- Workaround for http://gcc.gnu.org/PR25240
- * include/libc-symbols.h (weak_extern): Define using weak attribute.
- (_weak_extern): Remove.
- (weak_tls_extern): Define.
- * locale/uselocale.c (DEFINE_CATEGORY): Use weak_tls_extern for
- _nl_current_##category.
- * locale/setlocale.c (DEFINE_CATEGORY): Likewise.
-
2005-12-19 Ulrich Drepper <drepper@redhat.com>
[BZ #1955]
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index f69bf8350d..8ee940719e 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -114,8 +114,8 @@
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
-# define weak_extern(symbol) extern __typeof (symbol) symbol __attribute__ ((weak));
-# define weak_tls_extern(symbol) extern __thread __typeof (symbol) symbol __attribute__ ((weak));
+# define weak_extern(symbol) _weak_extern (weak symbol)
+# define _weak_extern(expr) _Pragma (#expr)
# else
diff --git a/locale/setlocale.c b/locale/setlocale.c
index dc65d93b30..50bf8e772f 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -39,7 +39,7 @@
# define DEFINE_CATEGORY(category, category_name, items, a) \
extern char _nl_current_##category##_used; \
weak_extern (_nl_current_##category##_used) \
- weak_tls_extern (_nl_current_##category)
+ weak_extern (_nl_current_##category)
# include "categories.def"
# undef DEFINE_CATEGORY
diff --git a/locale/uselocale.c b/locale/uselocale.c
index 671c519531..4e63dabd8e 100644
--- a/locale/uselocale.c
+++ b/locale/uselocale.c
@@ -54,7 +54,7 @@ __uselocale (locale_t newloc)
{ \
extern char _nl_current_##category##_used; \
weak_extern (_nl_current_##category##_used) \
- weak_tls_extern (_nl_current_##category) \
+ weak_extern (_nl_current_##category) \
if (&_nl_current_##category##_used != 0) \
_nl_current_##category = &locobj->__locales[category]; \
}