[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r2189 - in /fsf/trunk/libc: ./ localedata/ localedata/locales/ malloc/ nptl/ nptl/sysdeps/unix/sysv/linux/ string/ sysdeps/a...
- To: commits@xxxxxxxxxx
- Subject: [commits] r2189 - in /fsf/trunk/libc: ./ localedata/ localedata/locales/ malloc/ nptl/ nptl/sysdeps/unix/sysv/linux/ string/ sysdeps/a...
- From: eglibc@xxxxxxxxxx
- Date: Tue, 08 May 2007 07:02:29 -0000
Author: eglibc
Date: Tue May 8 00:02:29 2007
New Revision: 2189
Log:
Import glibc-mainline for 2007-05-08
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/localedata/ChangeLog
fsf/trunk/libc/localedata/locales/as_IN
fsf/trunk/libc/malloc/Makefile
fsf/trunk/libc/malloc/arena.c
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/allocatestack.c
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c
fsf/trunk/libc/nptl/tst-align2.c
fsf/trunk/libc/nptl/tst-getpid1.c
fsf/trunk/libc/string/strfry.c
fsf/trunk/libc/sysdeps/alpha/fpu/bits/mathinline.h
fsf/trunk/libc/sysdeps/alpha/fpu/s_fmax.S
fsf/trunk/libc/sysdeps/alpha/fpu/s_fmin.S
fsf/trunk/libc/sysdeps/alpha/fpu/s_isnan.c
fsf/trunk/libc/sysdeps/alpha/fpu/s_lrint.c
fsf/trunk/libc/sysdeps/alpha/fpu/s_lround.c
fsf/trunk/libc/sysdeps/alpha/fpu/s_nearbyint.c
fsf/trunk/libc/sysdeps/alpha/fpu/s_round.c
fsf/trunk/libc/sysdeps/alpha/fpu/s_trunc.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/alpha/ioperm.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue May 8 00:02:29 2007
@@ -1,5 +1,40 @@
+2007-05-07 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #4403]
+ * string/strfry.c (strfry): Make result more random.
+
+2007-05-07 Richard Henderson <rth@xxxxxxxxxx>
+
+ * sysdeps/alpha/fpu/bits/mathinline.h (__isnanl): Don't define
+ if __NO_LONG_DOUBLE_MATH.
+ * sysdeps/unix/sysv/linux/alpha/ioperm.c: If BWX insns not
+ available in the compiler, add .arch directive to the assembly.
+
+2007-05-07 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/alpha/fpu/s_nearbyint.c (nearbyintl): Fix version on
+ compat_symbol to GLIBC_2_1.
+ * sysdeps/alpha/fpu/s_fmin.S (fminl): Likewise.
+ * sysdeps/alpha/fpu/s_trunc.c (truncl): Likewise.
+ * sysdeps/alpha/fpu/s_fmax.S (fmaxl): Likewise.
+ * sysdeps/alpha/fpu/s_lrint.c (lrintl, llrintl): Likewise.
+ * sysdeps/alpha/fpu/s_lround.c (lroundl, llroundl): Likewise.
+ * sysdeps/alpha/fpu/s_round.c (roundl): Likewise.
+ * sysdeps/alpha/fpu/s_isnan.c (isnanl): Provide compat_symbol in
+ libc, not libm.
+ (__isnanl): New compat_symbol.
+
+2007-05-07 Ulrich Drepper <drepper@xxxxxxxxxx>
+ Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * malloc/arena.c (heap_info): Add mprotect_size field, adjust pad.
+ (new_heap): Initialize mprotect_size.
+ (grow_heap): When growing, only mprotect from mprotect_size till
+ new_size if mprotect_size is smaller. When shrinking, use PROT_NONE
+ MMAP for __libc_enable_secure only, otherwise use MADV_DONTNEED.
+
2007-04-30 Steven Munroe <sjmunroe@xxxxxxxxxx>
- Peter Bergner <bergner@xxxxxxxxxx>
+ Peter Bergner <bergner@xxxxxxxxxx>
* sysdeps/powerpc/bits/fenv.h: Declare __fe_mask_env extern.
Define FE_NOMASK_ENV as FE_EANBLED_ENV. Define FE_MASK_ENV.
@@ -757,7 +792,7 @@
2007-03-13 Richard Henderson <rth@xxxxxxxxxx>
- * elf/dl-support.c (_dl_aux_init): Honor DL_PLATFORM_AUXV.
+ * elf/dl-support.c (_dl_aux_init): Honor DL_PLATFORM_AUXV.
* sysdeps/unix/sysv/linux/alpha/dl-auxv.h: New file.
* sysdeps/unix/sysv/linux/alpha/dl-support.c: New file.
* sysdeps/unix/sysv/linux/alpha/dl-sysdep.c (__libc_alpha_cache_shape):
Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Tue May 8 00:02:29 2007
@@ -1,3 +1,10 @@
+2007-05-07 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * locales/as_IN: Fix currency_symbol, abday for Sunday, abmon for
+ January, February, and September to December, mon for January,
+ February, September, and December, am_pm, and name_*.
+ Patch by Amitakhya Phukan <aphukan@xxxxxxxxxx>.
+
2007-05-04 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #4114]
Modified: fsf/trunk/libc/localedata/locales/as_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/as_IN (original)
+++ fsf/trunk/libc/localedata/locales/as_IN Tue May 8 00:02:29 2007
@@ -610,7 +610,7 @@
%%%%%%%%%%%%%
LC_MONETARY
int_curr_symbol "<U0049><U004E><U0052><U0020>"
-currency_symbol "<U0052><U0073><U002E>"
+currency_symbol "<U099F><U0995><U09BE>"
mon_decimal_point "<U002E>"
mon_thousands_sep "<U002C>"
mon_grouping 3;2
@@ -634,7 +634,7 @@
%%%%%%%%%%%%%
LC_TIME
-abday "<U09F0><U09AC><U09BF>";/
+abday "<U09A6><U09C7><U0993>";/
"<U09B8><U09CB><U09AE>";/
"<U09AE><U0999><U09CD><U0997><U09B2>";/
"<U09AC><U09C1><U09A7>";/
@@ -648,37 +648,37 @@
"<U09AC><U09C3><U09B9><U09B7><U09CD><U09AA><U09A4><U09BF><U09AC><U09BE><U09F0>";/
"<U09B6><U09C1><U0995><U09CD><U09F0><U09AC><U09BE><U09F0>";/
"<U09B6><U09A8><U09BF><U09AC><U09BE><U09F0>"
-abmon "<U099C><U09BE><U09A8><U09C1>";/
- "<U09AB><U09C7><U09AC><U09CD><U09F0><U09C1>";/
+abmon "<U099C><U09BE><U09A8><U09C1><U09F1><U09BE><U09F0><U09C0>";/
+ "<U09AB><U09C7><U09AC><U09CD><U09F0><U09C1><U09F1><U09BE><U09F0><U09C0>";/
"<U09AE><U09BE><U09F0><U09CD><U099A>";/
"<U098F><U09AA><U09CD><U09F0><U09BF><U09B2>";/
"<U09AE><U09C7>";/
"<U099C><U09C1><U09A8>";/
"<U099C><U09C1><U09B2><U09BE><U0987>";/
"<U0986><U0997>";/
- "<U09B8><U09C7><U09AA><U09CD><U099F>";/
- "<U0985><U0995><U09CD><U099F><U09CB>";/
- "<U09A8><U09AD><U09C7>";/
- "<U09A1><U09BF><U09B8><U09C7>"
-mon "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09F0><U09C0>";/
- "<U09AB><U09C7><U09AC><U09CD><U09F0><U09C1><U09DF><U09BE><U09F0><U09C0>";/
+ "<U099A><U09C7><U09AA><U09CD><U09A4><U09C7><U09AE><U09CD><U09AC><U09F0>";/
+ "<U0985><U0995><U09CD><U099F><U09CB><U09AC><U09F0>";/
+ "<U09A8><U09AD><U09C7><U09AE><U09CD><U09AC><U09F0>";/
+ "<U09A1><U09BF><U099A><U09C7><U09AE><U09CD><U09AC><U09F0>"
+mon "<U099C><U09BE><U09A8><U09C1><U09F1><U09BE><U09F0><U09C0>";/
+ "<U09AB><U09C7><U09AC><U09CD><U09F0><U09C1><U09F1><U09BE><U09F0><U09C0>";/
"<U09AE><U09BE><U09F0><U09CD><U099A>";/
"<U098F><U09AA><U09CD><U09F0><U09BF><U09B2>";/
"<U09AE><U09C7>";/
"<U099C><U09C1><U09A8>";/
"<U099C><U09C1><U09B2><U09BE><U0987>";/
"<U0986><U0997><U09B7><U09CD><U099F>";/
- "<U09B8><U09C7><U09AA><U09CD><U099F><U09C7><U09AE><U09CD><U09AC><U09F0>";/
+ "<U099A><U09C7><U09AA><U09CD><U09A4><U09C7><U09AE><U09CD><U09AC><U09F0>";/
"<U0985><U0995><U09CD><U099F><U09CB><U09AC><U09F0>";/
"<U09A8><U09AD><U09C7><U09AE><U09CD><U09AC><U09F0>";/
- "<U09A1><U09BF><U09B8><U09C7><U09AE><U09CD><U09AC><U09F0>"
+ "<U09A1><U09BF><U099A><U09C7><U09AE><U09CD><U09AC><U09F0>"
% d_fmt "%e-%m-%Y"
d_fmt "<U0025><U0065><U002D><U0025><U006D><U002D><U0025><U0059>"
% t_fmt "%I.%M.%S %p"
t_fmt "<U0025><U0049><U002E><U0025><U004D><U002E><U0025><U0053><U0020><U0025><U0070>"
% d_t_fmt"%e %B, %Y %I.%M.%S %p %Z"
d_t_fmt "<U0025><U0065><U0020><U0025><U0042><U002C><U0020><U0025><U0059><U0020><U0025><U0049><U002E><U0025><U004D><U002E><U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
-am_pm "<U09AA><U09C2><U09F0><U09CD><U09AC><U09BE>";"<U0985><U09AA>"
+am_pm "<U09AA><U09C2><U09F0><U09CD><U09AC><U09CD><U09AC><U09BE><U09B9><U09CD><U09A8>";"<U0985><U09AA><U09F0><U09BE><U09B9><U09CD><U09A8>"
% t_fmt_ampm "%I.%M.%S %p"
t_fmt_ampm "<U0025><U0049><U002E><U0025><U004D><U002E><U0025><U0053><U0020><U0025><U0070>"
END LC_TIME
@@ -704,10 +704,10 @@
name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
<U0025><U0067>"
name_gen ""
-name_mr "<U004D><U0072><U002E>"
-name_mrs "<U004D><U0072><U0073><U002E>"
-name_miss "<U004D><U0069><U0073><U0073><U002E>"
-name_ms "<U004D><U0073><U002E>"
+name_mr "<U09B6><U09CD><U09F0><U09C0>"
+name_mrs "<U09B6><U09CD><U09F0><U09C0><U09AE><U09A4><U09C0>"
+name_miss "<U0995><U09C1><U09AE><U09BE><U09F0><U09C0>"
+name_ms "<U0995><U09C1><U09AE><U09BE><U09F0><U09C0>"
END LC_NAME
%%%%%%%%%%%%%
Modified: fsf/trunk/libc/malloc/Makefile
==============================================================================
--- fsf/trunk/libc/malloc/Makefile (original)
+++ fsf/trunk/libc/malloc/Makefile Tue May 8 00:02:29 2007
@@ -104,6 +104,7 @@
include ../Rules
CFLAGS-mcheck-init.c = $(PIC-ccflag)
+CFLAGS-malloc.c += -DMALLOC_DEBUG
$(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
-rm -f $@
Modified: fsf/trunk/libc/malloc/arena.c
==============================================================================
--- fsf/trunk/libc/malloc/arena.c (original)
+++ fsf/trunk/libc/malloc/arena.c Tue May 8 00:02:29 2007
@@ -1,5 +1,6 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 2001,2002,2003,2004,2005,2006,2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@xxxxxxxxx>, 2001.
@@ -59,10 +60,12 @@
mstate ar_ptr; /* Arena for this heap. */
struct _heap_info *prev; /* Previous heap. */
size_t size; /* Current size in bytes. */
+ size_t mprotect_size; /* Size in bytes that has been mprotected
+ PROT_READ|PROT_WRITE. */
/* Make sure the following data is properly aligned, particularly
that sizeof (heap_info) + 2 * SIZE_SZ is a multiple of
- MALLOG_ALIGNMENT. */
- char pad[-5 * SIZE_SZ & MALLOC_ALIGN_MASK];
+ MALLOC_ALIGNMENT. */
+ char pad[-6 * SIZE_SZ & MALLOC_ALIGN_MASK];
} heap_info;
/* Get a compile-time error if the heap_info padding is not correct
@@ -692,6 +695,7 @@
}
h = (heap_info *)p2;
h->size = size;
+ h->mprotect_size = size;
THREAD_STAT(stat_n_heaps++);
return h;
}
@@ -714,17 +718,34 @@
new_size = (long)h->size + diff;
if((unsigned long) new_size > (unsigned long) HEAP_MAX_SIZE)
return -1;
- if(mprotect((char *)h + h->size, diff, PROT_READ|PROT_WRITE) != 0)
- return -2;
+ if((unsigned long) new_size > h->mprotect_size) {
+ if (mprotect((char *)h + h->mprotect_size,
+ (unsigned long) new_size - h->mprotect_size,
+ PROT_READ|PROT_WRITE) != 0)
+ return -2;
+ h->mprotect_size = new_size;
+ }
} else {
new_size = (long)h->size + diff;
if(new_size < (long)sizeof(*h))
return -1;
/* Try to re-map the extra heap space freshly to save memory, and
make it inaccessible. */
- if((char *)MMAP((char *)h + new_size, -diff, PROT_NONE,
- MAP_PRIVATE|MAP_FIXED) == (char *) MAP_FAILED)
- return -2;
+#ifdef _LIBC
+ if (__builtin_expect (__libc_enable_secure, 0))
+#else
+ if (1)
+#endif
+ {
+ if((char *)MMAP((char *)h + new_size, -diff, PROT_NONE,
+ MAP_PRIVATE|MAP_FIXED) == (char *) MAP_FAILED)
+ return -2;
+ h->mprotect_size = new_size;
+ }
+#ifdef _LIBC
+ else
+ madvise ((char *)h + new_size, -diff, MADV_DONTNEED);
+#endif
/*fprintf(stderr, "shrink %p %08lx\n", h, new_size);*/
}
h->size = new_size;
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Tue May 8 00:02:29 2007
@@ -1,3 +1,20 @@
+2007-05-02 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
+
+ [BZ #4455]
+ * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
+ * tst-getpid1.c (do_test): Likewise.
+
+ [BZ #4456]
+ * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
+ (allocate_stack): Likewise.
+
+2007-05-07 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
+ (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
+ (__lll_robust_timedlock_wait): Likewise.
+ Reported by Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>.
+
2007-05-06 Mike Frysinger <vapier@xxxxxxxxxx>
[BZ #4465]
Modified: fsf/trunk/libc/nptl/allocatestack.c
==============================================================================
--- fsf/trunk/libc/nptl/allocatestack.c (original)
+++ fsf/trunk/libc/nptl/allocatestack.c Tue May 8 00:02:29 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -288,9 +288,14 @@
+ (((((pd->stackblock_size - pd->guardsize) / 2)
& pagemask) + pd->guardsize) & pagemask));
size_t len = pd->stackblock + pd->stackblock_size - stack;
-#else
+#elif _STACK_GROWS_DOWN
void *stack = pd->stackblock + pd->guardsize;
size_t len = pd->stackblock_size - pd->guardsize;
+#elif _STACK_GROWS_UP
+ void *stack = pd->stackblock;
+ size_t len = (uintptr_t) pd - pd->guardsize - (uintptr_t) pd->stackblock;
+#else
+# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
#endif
if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
return errno;
@@ -570,8 +575,10 @@
{
#ifdef NEED_SEPARATE_REGISTER_STACK
char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
-#else
+#elif _STACK_GROWS_DOWN
char *guard = mem;
+# elif _STACK_GROWS_UP
+ char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
#endif
if (mprotect (guard, guardsize, PROT_NONE) != 0)
{
@@ -618,9 +625,13 @@
oldguard + pd->guardsize - guard - guardsize,
prot) != 0)
goto mprot_error;
-#else
+#elif _STACK_GROWS_DOWN
if (mprotect ((char *) mem + guardsize, pd->guardsize - guardsize,
prot) != 0)
+ goto mprot_error;
+#elif _STACK_GROWS_UP
+ if (mprotect ((char *) pd - pd->guardsize,
+ pd->guardsize - guardsize, prot) != 0)
goto mprot_error;
#endif
@@ -661,8 +672,11 @@
#ifdef NEED_SEPARATE_REGISTER_STACK
*stack = pd->stackblock;
*stacksize = stacktop - *stack;
-#else
+#elif _STACK_GROWS_DOWN
*stack = stacktop;
+#elif _STACK_GROWS_UP
+ *stack = pd->stackblock;
+ assert (*stack > 0);
#endif
return 0;
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c Tue May 8 00:02:29 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 2006.
@@ -30,6 +30,10 @@
int oldval = *futex;
int tid = THREAD_GETMEM (THREAD_SELF, tid);
+ /* If the futex changed meanwhile try locking again. */
+ if (oldval == 0)
+ goto try;
+
do
{
if (__builtin_expect (oldval & FUTEX_OWNER_DIED, 0))
@@ -41,6 +45,9 @@
continue;
lll_futex_wait (futex, newval);
+
+ try:
+ ;
}
while ((oldval = atomic_compare_and_exchange_val_acq (futex,
tid | FUTEX_WAITERS,
@@ -57,6 +64,11 @@
return EINVAL;
int tid = THREAD_GETMEM (THREAD_SELF, tid);
+ int oldval = *futex;
+
+ /* If the futex changed meanwhile try locking again. */
+ if (oldval == 0)
+ goto try;
do
{
@@ -80,7 +92,6 @@
return ETIMEDOUT;
/* Wait. */
- int oldval = *futex;
if (__builtin_expect (oldval & FUTEX_OWNER_DIED, 0))
return oldval;
@@ -90,8 +101,13 @@
continue;
lll_futex_timed_wait (futex, newval, &rt);
+
+ try:
+ ;
}
- while (atomic_compare_and_exchange_bool_acq (futex, tid | FUTEX_WAITERS, 0));
+ while ((oldval = atomic_compare_and_exchange_val_acq (futex,
+ tid | FUTEX_WAITERS,
+ 0)) != 0);
return 0;
}
Modified: fsf/trunk/libc/nptl/tst-align2.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-align2.c (original)
+++ fsf/trunk/libc/nptl/tst-align2.c Tue May 8 00:02:29 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 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
@@ -53,8 +53,14 @@
char st[256 * 1024];
pid_t p = __clone2 (f, st, sizeof (st), 0, 0);
#else
- char st[128 * 1024];
+ char st[128 * 1024] __attribute__ ((aligned));
+# if _STACK_GROWS_DOWN
pid_t p = clone (f, st + sizeof (st), 0, 0);
+# elif _STACK_GROWS_UP
+ pid_t p = clone (f, st, 0, 0);
+# else
+# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
+# endif
#endif
if (p == -1)
{
Modified: fsf/trunk/libc/nptl/tst-getpid1.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-getpid1.c (original)
+++ fsf/trunk/libc/nptl/tst-getpid1.c Tue May 8 00:02:29 2007
@@ -48,7 +48,13 @@
pid_t p = __clone2 (f, st, sizeof (st), TEST_CLONE_FLAGS, 0);
#else
char st[128 * 1024] __attribute__ ((aligned));
+# if _STACK_GROWS_DOWN
pid_t p = clone (f, st + sizeof (st), TEST_CLONE_FLAGS, 0);
+# elif _STACK_GROWS_UP
+ pid_t p = clone (f, st, TEST_CLONE_FLAGS, 0);
+# else
+# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
+# endif
#endif
if (p == -1)
{
Modified: fsf/trunk/libc/string/strfry.c
==============================================================================
--- fsf/trunk/libc/string/strfry.c (original)
+++ fsf/trunk/libc/string/strfry.c Tue May 8 00:02:29 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1999, 2002, 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,16 +37,14 @@
init = 1;
}
- len = strlen (string);
+ len = strlen (string) - 1;
for (i = 0; i < len; ++i)
{
int32_t j;
- char c;
+ __random_r (&rdata, &j);
+ j = j % len + 1;
- __random_r (&rdata, &j);
- j %= len;
-
- c = string[i];
+ char c = string[i];
string[i] = string[j];
string[j] = c;
}
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/bits/mathinline.h
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/bits/mathinline.h (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/bits/mathinline.h Tue May 8 00:02:29 2007
@@ -137,11 +137,14 @@
return isunordered (__x, __x);
}
+#ifndef __NO_LONG_DOUBLE_MATH
__MATH_INLINE int
__NTH (__isnanl (long double __x))
{
return isunordered (__x, __x);
}
+#endif
+
#endif /* C99 */
#endif /* __NO_MATH_INLINES */
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/s_fmax.S
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/s_fmax.S (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/s_fmax.S Tue May 8 00:02:29 2007
@@ -53,6 +53,6 @@
strong_alias (__fmax, __fmaxl)
weak_alias (__fmaxl, fmaxl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __fmax, fmaxl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
#endif
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/s_fmin.S
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/s_fmin.S (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/s_fmin.S Tue May 8 00:02:29 2007
@@ -53,6 +53,6 @@
strong_alias (__fmin, __fminl)
weak_alias (__fminl, fminl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __fmin, fminl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
#endif
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/s_isnan.c
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/s_isnan.c (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/s_isnan.c Tue May 8 00:02:29 2007
@@ -53,6 +53,7 @@
strong_alias (__isnan, __isnanl)
weak_alias (__isnan, isnanl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __isnan, isnanl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
#endif
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/s_lrint.c
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/s_lrint.c (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/s_lrint.c Tue May 8 00:02:29 2007
@@ -42,7 +42,7 @@
weak_alias (__lrintl, lrintl)
weak_alias (__llrintl, llrintl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_0);
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
+compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
#endif
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/s_lround.c
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/s_lround.c (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/s_lround.c Tue May 8 00:02:29 2007
@@ -42,7 +42,7 @@
weak_alias (__lroundl, lroundl)
weak_alias (__llroundl, llroundl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_0);
-compat_symbol (libm, __llround, llroundl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
+compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
#endif
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/s_nearbyint.c
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/s_nearbyint.c (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/s_nearbyint.c Tue May 8 00:02:29 2007
@@ -43,6 +43,6 @@
strong_alias (__nearbyint, __nearbyintl)
weak_alias (__nearbyint, nearbyintl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1);
#endif
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/s_round.c
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/s_round.c (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/s_round.c Tue May 8 00:02:29 2007
@@ -44,6 +44,6 @@
strong_alias (__round, __roundl)
weak_alias (__roundl, roundl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __round, roundl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __round, roundl, GLIBC_2_1);
#endif
Modified: fsf/trunk/libc/sysdeps/alpha/fpu/s_trunc.c
==============================================================================
--- fsf/trunk/libc/sysdeps/alpha/fpu/s_trunc.c (original)
+++ fsf/trunk/libc/sysdeps/alpha/fpu/s_trunc.c Tue May 8 00:02:29 2007
@@ -48,6 +48,6 @@
strong_alias (__trunc, __truncl)
weak_alias (__trunc, truncl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __trunc, truncl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __trunc, truncl, GLIBC_2_1);
#endif
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/alpha/ioperm.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/alpha/ioperm.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/alpha/ioperm.c Tue May 8 00:02:29 2007
@@ -31,6 +31,11 @@
space. It is therefore unreasonable to expect mmap'ing the entire
sparse address space would work (e.g., the Low Cost Alpha chip has an
I/O address space that's 512MB large!). */
+
+/* Make sure the ldbu/stb asms below are not expaneded to macros. */
+#ifndef __alpha_bwx__
+asm(".arch ev56");
+#endif
#include <errno.h>
#include <fcntl.h>