* sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
authorJakub Jelinek <jakub@redhat.com>
Tue, 14 Aug 2007 19:37:50 +0000 (19:37 +0000)
committerJakub Jelinek <jakub@redhat.com>
Tue, 14 Aug 2007 19:37:50 +0000 (19:37 +0000)
Add libc_hidden_proto.
(STRTOF): Add libc_hidden_proto.
(___new_strtold_l, ___new_wcstold_l): New weak aliases.
(strtold_l, wcstold_l): Use them as second argument for
long_double_symbol. nptl/
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
__lll_robust_unlock): Rewrite as macros instead of inline functions.
* sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
__lll_robust_unlock, __lll_wait_tid): Likewise.
2007-08-14  Jakub Jelinek  <jakub@redhat.com>

* sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
Add libc_hidden_proto.
(STRTOF): Add libc_hidden_proto.
(___new_strtold_l, ___new_wcstold_l): New weak aliases.
(strtold_l, wcstold_l): Use them as second argument for
long_double_symbol.

ChangeLog
nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
sysdeps/ieee754/ldbl-64-128/strtold_l.c

index 51037ed..4477baf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-08-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
+       Add libc_hidden_proto.
+       (STRTOF): Add libc_hidden_proto.
+       (___new_strtold_l, ___new_wcstold_l): New weak aliases.
+       (strtold_l, wcstold_l): Use them as second argument for
+       long_double_symbol.
+
 2007-08-14  Ulrich Drepper  <drepper@redhat.com>
 
        * elf/dl-misc.c: Undo last change.  The kernel won't allow it.
index e56ece0..43d97f6 100644 (file)
@@ -1,3 +1,10 @@
+2007-08-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
+       __lll_robust_unlock): Rewrite as macros instead of inline functions.
+       * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
+       __lll_robust_unlock, __lll_wait_tid): Likewise.
+
 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
 
        * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
index 4f67964..4487607 100644 (file)
@@ -226,23 +226,23 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
   __lll_robust_timedlock (&(futex), abstime, id, private)
 
 
-static inline void __attribute__ ((always_inline))
-__lll_unlock (int *futex, int private)
-{
-  int val = atomic_exchange_rel (futex, 0);
-  if (__builtin_expect (val > 1, 0))
-    lll_futex_wake (futex, 1, private);
-}
+#define __lll_unlock(futex, private) \
+  (void)                                                       \
+    ({ int *__futex = (futex);                                 \
+    ({ int __oldval = atomic_exchange_rel (__futex, 0);                \
+       if (__builtin_expect (__oldval > 1, 0))                 \
+        lll_futex_wake (__futex, 1, private);                  \
+    })
 #define lll_unlock(futex, private) __lll_unlock(&(futex), private)
 
 
-static inline void __attribute__ ((always_inline))
-__lll_robust_unlock (int *futex, int private)
-{
-  int val = atomic_exchange_rel (futex, 0);
-  if (__builtin_expect (val & FUTEX_WAITERS, 0))
-    lll_futex_wake (futex, 1, private);
-}
+#define __lll_robust_unlock(futex, private) \
+  (void)                                                       \
+    ({ int *__futex = (futex);                                 \
+       int __oldval = atomic_exchange_rel (__futex, 0);                \
+       if (__builtin_expect (__oldval & FUTEX_WAITERS, 0))     \
+        lll_futex_wake (__futex, 1, private);                  \
+    })
 #define lll_robust_unlock(futex, private) \
   __lll_robust_unlock(&(futex), private)
 
index 7fee435..c9347e9 100644 (file)
@@ -291,31 +291,29 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
   __lll_robust_timedlock (&(futex), abstime, id, private)
 
 
-static inline void
-__attribute__ ((always_inline))
-__lll_unlock (int *futex, int private)
-{
-  int oldval;
-  int newval = 0;
-
-  lll_compare_and_swap (futex, oldval, newval, "slr %2,%2");
-  if (__builtin_expect (oldval > 1, 0))
-    lll_futex_wake (futex, 1, private);
-}
+#define __lll_unlock(futex, private) \
+  (void)                                                                     \
+    ({ int __oldval;                                                         \
+       int __newval = 0;                                                     \
+       int *__futexp = (futex);                                                      \
+                                                                             \
+       lll_compare_and_swap (__futexp, __oldval, __newval, "slr %2,%2");      \
+       if (__builtin_expect (__oldval > 1, 0))                               \
+        lll_futex_wake (__futexp, 1, private);                               \
+    })
 #define lll_unlock(futex, private) __lll_unlock(&(futex), private)
 
 
-static inline void
-__attribute__ ((always_inline))
-__lll_robust_unlock (int *futex, int private)
-{
-  int oldval;
-  int newval = 0;
-
-  lll_compare_and_swap (futex, oldval, newval, "slr %2,%2");
-  if (__builtin_expect (oldval & FUTEX_WAITERS, 0))
-    lll_futex_wake (futex, 1, private);
-}
+#define __lll_robust_unlock(futex, private) \
+  (void)                                                                     \
+    ({ int __oldval;                                                         \
+       int __newval = 0;                                                     \
+       int *__futexp = (futex);                                                      \
+                                                                             \
+       lll_compare_and_swap (__futexp, __oldval, __newval, "slr %2,%2");      \
+       if (__builtin_expect (__oldval & FUTEX_WAITERS, 0))                   \
+        lll_futex_wake (__futexp, 1, private);                               \
+    })
 #define lll_robust_unlock(futex, private) \
   __lll_robust_unlock(&(futex), private)
 
@@ -331,15 +329,15 @@ __lll_robust_unlock (int *futex, int private)
    wakeup when the clone terminates.  The memory location contains the
    thread ID while the clone is running and is reset to zero
    afterwards. */
-static inline void
-__attribute__ ((always_inline))
-__lll_wait_tid (int *ptid)
-{
-  int tid;
-
-  while ((tid = *ptid) != 0)
-    lll_futex_wait (ptid, tid, LLL_SHARED);
-}
+#define __lll_wait_tid(ptid) \
+  do                                                                         \
+    {                                                                        \
+      int __tid;                                                             \
+                                                                             \
+      while ((__tid = *ptid) != 0)                                           \
+       lll_futex_wait (ptid, __tid, LLL_SHARED);                             \
+    }                                                                        \
+  while (0)
 #define lll_wait_tid(tid) __lll_wait_tid(&(tid))
 
 extern int __lll_timedwait_tid (int *, const struct timespec *)
index ef8fe05..cdc3098 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2006, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,6 +37,9 @@ extern long double ____new_strtold_l (const char *, char **, __locale_t);
 # define __STRTOF      ____new_strtold_l
 # define ____STRTOF_INTERNAL ____strtold_l_internal
 #endif
+extern __typeof (__STRTOF) STRTOF;
+libc_hidden_proto (__STRTOF)
+libc_hidden_proto (STRTOF)
 #define MPN2FLOAT      __mpn_construct_long_double
 #define FLOAT_HUGE_VAL HUGE_VALL
 #define SET_MANTISSA(flt, mant) \
@@ -54,10 +57,12 @@ extern long double ____new_strtold_l (const char *, char **, __locale_t);
 #ifdef __LONG_DOUBLE_MATH_OPTIONAL
 # include <math_ldbl_opt.h>
 # ifdef USE_WIDE_CHAR
-long_double_symbol (libc, __new_wcstold_l, wcstold_l);
+weak_alias (____new_wcstold_l, ___new_wcstold_l);
+long_double_symbol (libc, ___new_wcstold_l, wcstold_l);
 long_double_symbol (libc, ____new_wcstold_l, __wcstold_l);
 # else
-long_double_symbol (libc, __new_strtold_l, strtold_l);
+weak_alias (____new_strtold_l, ___new_strtold_l);
+long_double_symbol (libc, ___new_strtold_l, strtold_l);
 long_double_symbol (libc, ____new_strtold_l, __strtold_l);
 # endif
 #endif