From 90a0991a65186a68adc8caeec97da7678434040c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Oct 2006 21:52:54 +0000 Subject: [PATCH] [BZ #3352] 2006-10-12 Richard Sandiford [BZ #3352] * elf/dl-minimal.c (realloc): Let malloc() return a new pointer, and use memcpy() if it does. --- ChangeLog | 6 ++++++ elf/dl-minimal.c | 7 ++++--- localedata/ChangeLog | 5 +++++ localedata/locales/es_ES | 5 +++-- nptl/ChangeLog | 17 +++++++++++++++++ .../unix/sysv/linux/alpha/bits/semaphore.h | 3 --- .../unix/sysv/linux/i386/bits/semaphore.h | 3 --- .../unix/sysv/linux/ia64/bits/semaphore.h | 3 --- .../unix/sysv/linux/powerpc/bits/semaphore.h | 3 --- .../unix/sysv/linux/s390/bits/semaphore.h | 3 --- .../sysdeps/unix/sysv/linux/sh/bits/semaphore.h | 3 --- .../unix/sysv/linux/sparc/bits/semaphore.h | 3 --- .../unix/sysv/linux/x86_64/bits/semaphore.h | 3 --- 13 files changed, 35 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe887b95ee..ffb3296a26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-12 Richard Sandiford + + [BZ #3352] + * elf/dl-minimal.c (realloc): Let malloc() return a new pointer, + and use memcpy() if it does. + 2006-11-12 Andreas Jaeger [BZ #2510] diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c index 868d3bd2ed..44b8c3718b 100644 --- a/elf/dl-minimal.c +++ b/elf/dl-minimal.c @@ -128,13 +128,14 @@ free (void *ptr) void * weak_function realloc (void *ptr, size_t n) { - void *new; if (ptr == NULL) return malloc (n); assert (ptr == alloc_last_block); + size_t old_size = alloc_ptr - alloc_last_block; alloc_ptr = alloc_last_block; - new = malloc (n); - assert (new == ptr); + void *new = malloc (n); + if (new != ptr) + memcpy (new, ptr, old_size); return new; } diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 7930f1399d..f805ee8c01 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2006-10-12 Ulrich Drepper + + [BZ #3320] + * locales/es_ES (LC_TIME): Add week, first_weekday, and first_workday. + 2006-10-05 Dmitry V. Levin * locales/tt_RU: Fix territory, title and descriptive comment. diff --git a/localedata/locales/es_ES b/localedata/locales/es_ES index c710d58947..feefeec788 100644 --- a/localedata/locales/es_ES +++ b/localedata/locales/es_ES @@ -2187,12 +2187,13 @@ t_fmt_ampm "" date_fmt "/ / " +week 7;19971130;5 +first_weekday 2 +first_workday 2 END LC_TIME LC_PAPER -% FIXME height 297 -% FIXME width 210 END LC_PAPER diff --git a/nptl/ChangeLog b/nptl/ChangeLog index f00f066479..a1e64928ae 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,20 @@ +2006-10-12 Ulrich Drepper + + [BZ #3285] + * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX. + * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX. + * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise. + 2006-10-11 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h index 6dadfda206..be4469c69d 100644 --- a/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h +++ b/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h @@ -26,9 +26,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h index e6c5d845ce..934493c308 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h @@ -28,9 +28,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h index 2329e98667..0684aebe24 100644 --- a/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h +++ b/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h @@ -28,9 +28,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h index 8123b418b5..c7f121ba5b 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h @@ -33,9 +33,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/semaphore.h index ead2663047..111462f0fb 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/bits/semaphore.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/semaphore.h @@ -32,9 +32,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { diff --git a/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h index e6c5d845ce..934493c308 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h +++ b/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h @@ -28,9 +28,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h index 7f3a328326..8fd7d344ea 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h +++ b/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h @@ -33,9 +33,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h index 57edbbbfb3..e973bc5bfb 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h @@ -33,9 +33,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { -- 2.43.5