[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r7832 - in /fsf/trunk/libc: ./ elf/ malloc/ misc/ string/ sysdeps/generic/ sysdeps/powerpc/fpu/ sysdeps/powerpc/powerpc32/fp...
- To: commits@xxxxxxxxxx
- Subject: [commits] r7832 - in /fsf/trunk/libc: ./ elf/ malloc/ misc/ string/ sysdeps/generic/ sysdeps/powerpc/fpu/ sysdeps/powerpc/powerpc32/fp...
- From: eglibc@xxxxxxxxxx
- Date: Sat, 31 Jan 2009 08:03:00 -0000
Author: eglibc
Date: Sat Jan 31 00:03:00 2009
New Revision: 7832
Log:
Import glibc-mainline for 2009-01-31
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/elf/Makefile
fsf/trunk/libc/malloc/malloc.c
fsf/trunk/libc/misc/sbrk.c
fsf/trunk/libc/string/string.h
fsf/trunk/libc/string/strings.h
fsf/trunk/libc/sysdeps/generic/dl-osinfo.h
fsf/trunk/libc/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c
fsf/trunk/libc/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/__longjmp-common.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/shm.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/shm.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/shm.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/inotify.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Jan 31 00:03:00 2009
@@ -1,3 +1,65 @@
+2009-01-29 Andrew Stubbs <ams@xxxxxxxxxxxxxxxx>
+
+ * elf/Makefile (ld.so): Adjust the sed script to insert _begin in to
+ newer linker scripts.
+
+2009-01-30 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #7040]
+ * sysdeps/unix/sysv/linux/sys/inotify.h: Second parameter of
+ inotify_rm_watch should have type int.
+
+2009-01-06 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (__longjmp):
+ Make aligned_restore_vmx a local symbol.
+ * sysdeps/powerpc/powerpc64/__longjmp-common.S (__longjmp):
+ Likewise.
+
+2009-01-30 Andreas Jaeger <aj@xxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/shm.h (SHM_EXEC): Define.
+ * sysdeps/unix/sysv/linux/ia64/bits/shm.h (SHM_EXEC): Define.
+ * sysdeps/unix/sysv/linux/powerpc/bits/shm.h (SHM_EXEC): Define.
+ * sysdeps/unix/sysv/linux/s390/bits/shm.h (SHM_EXEC): Define.
+ * sysdeps/unix/sysv/linux/sh/bits/shm.h (SHM_EXEC): Define.
+ * sysdeps/unix/sysv/linux/sparc/bits/shm.h (SHM_EXEC): Define.
+ * sysdeps/unix/sysv/linux/x86_64/bits/shm.h (SHM_EXEC): Define.
+
+2009-01-11 Ryan S. Arnold <rsa@xxxxxxxxxx>
+
+ [BZ #9726]
+ * sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (_SET_DI_FPSCR,
+ _SET_SI_FPSCR): Clobber fp0 to prevent erroneous test-case passes.
+
+2009-01-08 Ryan S. Arnold <rsa@xxxxxxxxxx>
+
+ [BZ #9726]
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
+ (__CONTEXT_FUNC_NAME): Fix mtfsf to use fp31 instead of fp0.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
+ (__CONTEXT_FUNC_NAME): Fix mtfsf to use fp31 instead of fp0.
+
+2009-01-11 Thomas Schwinge <tschwinge@xxxxxxx>
+
+ * sysdeps/generic/dl-osinfo.h (_dl_setup_stack_chk_guard): Use
+ memcpy instead of memcmp.
+ (_dl_setup_pointer_guard): Likewise.
+
+2009-01-30 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * malloc/malloc.c (sYSMALLOc): Don't use assert when detecting
+ manipulated brk, use malloc_printerr.
+ * misc/sbrk.c (__sbrk): Better error handling for nonsense
+ requests.
+
+2009-01-30 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * string/string.h (memchr, strchr, strrchr, strpbrk, strstr, index,
+ rindex): For C++ add inlines so that they can be recognized as
+ builtins.
+ * string/strings.h: Define correct C++ prototypes for gcc 4.4.
+
2009-01-29 Ulrich Drepper <drepper@xxxxxxxxxx>
Jakub Jelinek <jakub@xxxxxxxxxx>
@@ -17,9 +79,9 @@
* sysdeps/x86_64/stackinfo.h (stackinfo_get_sp): Define.
(stackinfo_sub_sp): Define.
- * nscd/connections.c (nscd_init): If database file access be
- opened check whether this is due to permission problems and bail
- in that case.
+ * nscd/connections.c (nscd_init): If database file access fails
+ check whether this is due to permission problems and bail in that
+ case.
[BZ #9741]
* nscd/mem.c (gc): Fix assignment of he_data in case malloc is used.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat Jan 31 00:03:00 2009
@@ -1,5 +1,5 @@
-GNU C Library NEWS -- history of user-visible changes. 2008-12-2
-Copyright (C) 1992-2007, 2008 Free Software Foundation, Inc.
+GNU C Library NEWS -- history of user-visible changes. 2009-1-30
+Copyright (C) 1992-2008, 2009 Free Software Foundation, Inc.
See the end for copying conditions.
Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
@@ -8,6 +8,9 @@
Version 2.10
* New Linux interface: accept4
+
+* Correct declarations of string function when used in C++ code. This
+ could lead to compile error for invalid C++ code.
Version 2.9
Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1995-2007, 2008, 2009 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
@@ -304,7 +304,7 @@
$(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \
LC_ALL=C \
sed -e '/^=========/,/^=========/!d;/^=========/d' \
- -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
+ -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
> $@.lds
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
$(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \
Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Sat Jan 31 00:03:00 2009
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 1996-2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1996-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@xxxxxxxxx>
and Doug Lea <dl@xxxxxxxxxxxxx>, 2001.
@@ -3189,7 +3189,7 @@
else if (contiguous(av) && old_size && brk < old_end) {
/* Oops! Someone else killed our space.. Can't touch anything. */
- assert(0);
+ malloc_printerr (3, "break adjusted to free malloc space", brk);
}
/*
Modified: fsf/trunk/libc/misc/sbrk.c
==============================================================================
--- fsf/trunk/libc/misc/sbrk.c (original)
+++ fsf/trunk/libc/misc/sbrk.c Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1995,1996,1997,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995-1997,2000,2002,2009 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
@@ -16,8 +16,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
+#include <stdint.h>
#include <unistd.h>
-#include <errno.h>
/* Defined in brk.c. */
extern void *__curbrk;
@@ -47,7 +48,10 @@
return __curbrk;
oldbrk = __curbrk;
- if (__brk (oldbrk + increment) < 0)
+ if ((increment > 0
+ ? ((uintptr_t) oldbrk + (uintptr_t) increment < (uintptr_t) oldbrk)
+ : ((uintptr_t) oldbrk < (uintptr_t) -increment))
+ || __brk (oldbrk + increment) < 0)
return (void *) -1;
return oldbrk;
Modified: fsf/trunk/libc/string/string.h
==============================================================================
--- fsf/trunk/libc/string/string.h (original)
+++ fsf/trunk/libc/string/string.h Sat Jan 31 00:03:00 2009
@@ -69,10 +69,27 @@
/* Search N bytes of S for C. */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-extern "C++" void *memchr (void *__s, int __c, size_t __n)
+extern "C++"
+{
+extern void *memchr (void *__s, int __c, size_t __n)
__THROW __asm ("memchr") __attribute_pure__ __nonnull ((1));
-extern "C++" __const void *memchr (__const void *__s, int __c, size_t __n)
+extern __const void *memchr (__const void *__s, int __c, size_t __n)
__THROW __asm ("memchr") __attribute_pure__ __nonnull ((1));
+
+# ifdef __OPTIMIZE__
+__extern_always_inline void *
+memchr (void *__s, int __c, size_t __n) __THROW
+{
+ return __builtin_memchr (__s, __c, __n);
+}
+
+__extern_always_inline __const void *
+memchr (__const void *__s, int __c, size_t __n) __THROW
+{
+ return __builtin_memchr (__s, __c, __n);
+}
+# endif
+}
#else
extern void *memchr (__const void *__s, int __c, size_t __n)
__THROW __attribute_pure__ __nonnull ((1));
@@ -191,20 +208,54 @@
__BEGIN_NAMESPACE_STD
/* Find the first occurrence of C in S. */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-extern "C++" char *strchr (char *__s, int __c)
+extern "C++"
+{
+extern char *strchr (char *__s, int __c)
__THROW __asm ("strchr") __attribute_pure__ __nonnull ((1));
-extern "C++" __const char *strchr (__const char *__s, int __c)
+extern __const char *strchr (__const char *__s, int __c)
__THROW __asm ("strchr") __attribute_pure__ __nonnull ((1));
+
+# ifdef __OPTIMIZE__
+__extern_always_inline char *
+strchr (char *__s, int __c) __THROW
+{
+ return __builtin_strchr (__s, __c);
+}
+
+__extern_always_inline __const char *
+strchr (__const char *__s, int __c) __THROW
+{
+ return __builtin_strchr (__s, __c);
+}
+# endif
+}
#else
extern char *strchr (__const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));
#endif
/* Find the last occurrence of C in S. */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-extern "C++" char *strrchr (char *__s, int __c)
+extern "C++"
+{
+extern char *strrchr (char *__s, int __c)
__THROW __asm ("strrchr") __attribute_pure__ __nonnull ((1));
-extern "C++" __const char *strrchr (__const char *__s, int __c)
+extern __const char *strrchr (__const char *__s, int __c)
__THROW __asm ("strrchr") __attribute_pure__ __nonnull ((1));
+
+# ifdef __OPTIMIZE__
+__extern_always_inline char *
+strrchr (char *__s, int __c) __THROW
+{
+ return __builtin_strrchr (__s, __c);
+}
+
+__extern_always_inline __const char *
+strrchr (__const char *__s, int __c) __THROW
+{
+ return __builtin_strrchr (__s, __c);
+}
+# endif
+}
#else
extern char *strrchr (__const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));
@@ -236,21 +287,55 @@
__THROW __attribute_pure__ __nonnull ((1, 2));
/* Find the first occurrence in S of any character in ACCEPT. */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-extern "C++" char *strpbrk (char *__s, __const char *__accept)
+extern "C++"
+{
+extern char *strpbrk (char *__s, __const char *__accept)
__THROW __asm ("strpbrk") __attribute_pure__ __nonnull ((1, 2));
-extern "C++" __const char *strpbrk (__const char *__s, __const char *__accept)
+extern __const char *strpbrk (__const char *__s, __const char *__accept)
__THROW __asm ("strpbrk") __attribute_pure__ __nonnull ((1, 2));
+
+# ifdef __OPTIMIZE__
+__extern_always_inline char *
+strpbrk (char *__s, __const char *__accept) __THROW
+{
+ return __builtin_strpbrk (__s, __accept);
+}
+
+__extern_always_inline __const char *
+strpbrk (__const char *__s, __const char *__accept) __THROW
+{
+ return __builtin_strpbrk (__s, __accept);
+}
+# endif
+}
#else
extern char *strpbrk (__const char *__s, __const char *__accept)
__THROW __attribute_pure__ __nonnull ((1, 2));
#endif
/* Find the first occurrence of NEEDLE in HAYSTACK. */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-extern "C++" char *strstr (char *__haystack, __const char *__needle)
+extern "C++"
+{
+extern char *strstr (char *__haystack, __const char *__needle)
__THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2));
-extern "C++" __const char *strstr (__const char *__haystack,
- __const char *__needle)
+extern __const char *strstr (__const char *__haystack,
+ __const char *__needle)
__THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2));
+
+# ifdef __OPTIMIZE__
+__extern_always_inline char *
+strstr (char *__haystack, __const char *__needle) __THROW
+{
+ return __builtin_strstr (__haystack, __needle);
+}
+
+__extern_always_inline __const char *
+strstr (__const char *__haystack, __const char *__needle) __THROW
+{
+ return __builtin_strstr (__haystack, __needle);
+}
+# endif
+}
#else
extern char *strstr (__const char *__haystack, __const char *__needle)
__THROW __attribute_pure__ __nonnull ((1, 2));
@@ -377,10 +462,27 @@
/* Find the first occurrence of C in S (same as strchr). */
# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-extern "C++" char *index (char *__s, int __c)
+extern "C++"
+{
+extern char *index (char *__s, int __c)
__THROW __asm ("index") __attribute_pure__ __nonnull ((1));
-extern "C++" __const char *index (__const char *__s, int __c)
+extern __const char *index (__const char *__s, int __c)
__THROW __asm ("index") __attribute_pure__ __nonnull ((1));
+
+# if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRINGS_H_PROTO
+__extern_always_inline char *
+index (char *__s, int __c) __THROW
+{
+ return __builtin_index (__s, __c);
+}
+
+__extern_always_inline __const char *
+index (__const char *__s, int __c) __THROW
+{
+ return __builtin_index (__s, __c);
+}
+# endif
+}
# else
extern char *index (__const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));
@@ -388,10 +490,27 @@
/* Find the last occurrence of C in S (same as strrchr). */
# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-extern "C++" char *rindex (char *__s, int __c)
+extern "C++"
+{
+extern char *rindex (char *__s, int __c)
__THROW __asm ("rindex") __attribute_pure__ __nonnull ((1));
-extern "C++" __const char *rindex (__const char *__s, int __c)
+extern __const char *rindex (__const char *__s, int __c)
__THROW __asm ("rindex") __attribute_pure__ __nonnull ((1));
+
+# if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRINGS_H_PROTO
+__extern_always_inline char *
+rindex (char *__s, int __c) __THROW
+{
+ return __builtin_rindex (__s, __c);
+}
+
+__extern_always_inline __const char *
+rindex (__const char *__s, int __c) __THROW
+{
+ return __builtin_rindex (__s, __c);
+}
+#endif
+}
# else
extern char *rindex (__const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));
Modified: fsf/trunk/libc/string/strings.h
==============================================================================
--- fsf/trunk/libc/string/strings.h (original)
+++ fsf/trunk/libc/string/strings.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,96,97,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,96,97,99,2000,2001,2009 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
@@ -28,6 +28,11 @@
# define __need_size_t
# include <stddef.h>
+/* Tell the caller that we provide correct C++ prototypes. */
+# if defined __cplusplus && __GNUC_PREREQ (4, 4)
+# define __CORRECT_ISO_CPP_STRINGS_H_PROTO
+# endif
+
__BEGIN_DECLS
/* Compare N bytes of S1 and S2 (same as memcmp). */
@@ -45,10 +50,60 @@
extern int ffs (int __i) __THROW __attribute__ ((const));
/* Find the first occurrence of C in S (same as strchr). */
-extern char *index (__const char *__s, int __c) __THROW __attribute_pure__;
+# ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO
+extern "C++"
+{
+extern char *index (char *__s, int __c)
+ __THROW __asm ("index") __attribute_pure__ __nonnull ((1));
+extern __const char *index (__const char *__s, int __c)
+ __THROW __asm ("index") __attribute_pure__ __nonnull ((1));
+
+# if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRING_H_PROTO
+__extern_always_inline char *
+index (char *__s, int __c) __THROW
+{
+ return __builtin_index (__s, __c);
+}
+
+__extern_always_inline __const char *
+index (__const char *__s, int __c) __THROW
+{
+ return __builtin_index (__s, __c);
+}
+# endif
+}
+# else
+extern char *index (__const char *__s, int __c)
+ __THROW __attribute_pure__ __nonnull ((1));
+# endif
/* Find the last occurrence of C in S (same as strrchr). */
-extern char *rindex (__const char *__s, int __c) __THROW __attribute_pure__;
+# ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO
+extern "C++"
+{
+extern char *rindex (char *__s, int __c)
+ __THROW __asm ("rindex") __attribute_pure__ __nonnull ((1));
+extern __const char *rindex (__const char *__s, int __c)
+ __THROW __asm ("rindex") __attribute_pure__ __nonnull ((1));
+
+# if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRING_H_PROTO
+__extern_always_inline char *
+rindex (char *__s, int __c) __THROW
+{
+ return __builtin_rindex (__s, __c);
+}
+
+__extern_always_inline __const char *
+rindex (__const char *__s, int __c) __THROW
+{
+ return __builtin_rindex (__s, __c);
+}
+#endif
+}
+# else
+extern char *rindex (__const char *__s, int __c)
+ __THROW __attribute_pure__ __nonnull ((1));
+# endif
/* Compare S1 and S2, ignoring case. */
extern int strcasecmp (__const char *__s1, __const char *__s2)
Modified: fsf/trunk/libc/sysdeps/generic/dl-osinfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/dl-osinfo.h (original)
+++ fsf/trunk/libc/sysdeps/generic/dl-osinfo.h Sat Jan 31 00:03:00 2009
@@ -1,3 +1,22 @@
+/* Operating system specific code for generic dynamic loader functions.
+ Copyright (C) 2009 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
#include <stdint.h>
static inline uintptr_t __attribute__ ((always_inline))
@@ -13,7 +32,7 @@
p[0] = 0;
}
else
- memcmp (&ret, dl_random, sizeof (ret));
+ memcpy (&ret, dl_random, sizeof (ret));
return ret;
}
@@ -24,6 +43,6 @@
if (dl_random == NULL)
ret = stack_chk_guard;
else
- memcmp (&ret, (char *) dl_random + sizeof (ret), sizeof (ret));
+ memcpy (&ret, (char *) dl_random + sizeof (ret), sizeof (ret));
return ret;
}
Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2002,2004,2006,2007,2008 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2002,2004,2006-2008,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ryan S. Arnold <rsa@xxxxxxxxxx>
Sean Curry <spcurry@xxxxxxxxxx>
@@ -104,12 +104,16 @@
(__fpscr)=tmp.fpscr; \
tmp.fpscr; })
+/* We make sure to zero fp0 after we use it in order to prevent stale data
+ in an fp register from making a test-case pass erroneously. */
# define _SET_DI_FPSCR(__fpscr) { \
union { double d; di_fpscr_t fpscr; } \
tmp __attribute__ ((__aligned__(8))); \
tmp.fpscr = __fpscr; \
/* Set the entire 64-bit FPSCR. */ \
__asm__ ("lfd%U0 0,%0; mtfsf 255,0,1,0" : : "m" (tmp.d) : "fr0"); \
+ tmp.d = 0; \
+ __asm__("lfd%U0 0,%0" : : "m" (tmp.d) : "fr0"); \
}
# define _GET_SI_FPSCR(__fpscr) ({ \
@@ -120,6 +124,8 @@
(__fpscr)=tmp.cw[1]; \
tmp.cw[0]; })
+/* We make sure to zero fp0 after we use it in order to prevent stale data
+ in an fp register from making a test-case pass erroneously. */
# define _SET_SI_FPSCR(__fpscr) { \
union { double d; si_fpscr_t fpscr[2]; } \
tmp __attribute__ ((__aligned__(8))); \
@@ -127,6 +133,8 @@
tmp.fpscr[0] = 0xFFF80000; \
tmp.fpscr[1] = __fpscr; \
__asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
+ tmp.d = 0; \
+ __asm__("lfd%U0 0,%0" : : "m" (tmp.d) : "fr0"); \
}
void prime_special_regs(int which)
Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S Sat Jan 31 00:03:00 2009
@@ -1,5 +1,5 @@
/* longjmp for PowerPC.
- Copyright (C) 1995-99, 2000, 2003-2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-99, 2000, 2003-2006, 2009 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
@@ -64,7 +64,7 @@
andi. r6,r5,0xf
lwz r0,((JB_VRSAVE)*4)(3)
mtspr VRSAVE,r0
- beq+ aligned_restore_vmx
+ beq+ L(aligned_restore_vmx)
addi r6,r5,16
lvsl v0,0,r5
lvx v1,0,r5
@@ -88,7 +88,7 @@
lvx v1,0,r5
vperm v31,v31,v1,v0
b L(no_vmx)
-aligned_restore_vmx:
+L(aligned_restore_vmx):
addi r6,r5,16
lvx v20,0,r5
addi r5,r5,32
Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/__longjmp-common.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/__longjmp-common.S (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/__longjmp-common.S Sat Jan 31 00:03:00 2009
@@ -1,6 +1,5 @@
/* longjmp for PowerPC64.
- Copyright (C) 1995, 1996,1997,1999,2000,2001,2002,2003,2004,2005,2006
- Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996,1997,1999-2006,2009 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
@@ -58,7 +57,7 @@
andi. r6,r5,0xf
lwz r0,((JB_VRSAVE)*8)(3)
mtspr VRSAVE,r0
- beq+ aligned_restore_vmx
+ beq+ L(aligned_restore_vmx)
addi r6,r5,16
lvsl v0,0,r5
lvx v1,0,r5
@@ -82,7 +81,7 @@
lvx v1,0,r5
vperm v31,v31,v1,v0
b L(no_vmx)
-aligned_restore_vmx:
+L(aligned_restore_vmx):
addi r6,r5,16
lvx v20,0,r5
addi r5,r5,32
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/shm.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2002,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,2000,2002,2004,2009 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
@@ -30,6 +30,7 @@
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2005, 2009 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
@@ -30,6 +30,7 @@
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -28,9 +28,10 @@
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
/* Flags for `shmat'. */
-#define SHM_RDONLY 010000 /* attach read-only else read-write */
-#define SHM_RND 020000 /* round attach address to SHMLBA */
-#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_RDONLY 010000 /* attach read-only else read-write */
+#define SHM_RND 020000 /* round attach address to SHMLBA */
+#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S Sat Jan 31 00:03:00 2009
@@ -1,5 +1,5 @@
/* Jump to a new context powerpc32 common.
- Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009 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
@@ -18,13 +18,13 @@
02110-1301 USA. */
/* This is the common implementation of setcontext for powerpc32.
- It not complete in itself should be included in to a framework that
+ It not complete in itself should be included in to a framework that
defines:
__CONTEXT_FUNC_NAME
and if appropriate:
__CONTEXT_ENABLE_FPRS
__CONTEXT_ENABLE_VRS
- Any archecture that implements the Vector unit is assumed to also
+ Any archecture that implements the Vector unit is assumed to also
implement the floating unit. */
/* Stack frame offsets. */
@@ -202,7 +202,7 @@
lfd fp0,_UC_FREGS+(0*8)(r31)
# ifdef _ARCH_PWR6
/* Use the extended four-operand version of the mtfsf insn. */
- mtfsf 0xff,fp0,1,0
+ mtfsf 0xff,fp31,1,0
# else
/* Availability of DFP indicates a 64-bit FPSCR. */
andi. r6,r7,PPC_FEATURE_HAS_DFP
@@ -304,4 +304,3 @@
/* NOTREACHED */
END (__CONTEXT_FUNC_NAME)
-
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S Sat Jan 31 00:03:00 2009
@@ -1,5 +1,5 @@
/* Save current context and jump to a new context.
- Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009 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
@@ -18,13 +18,13 @@
02110-1301 USA. */
/* This is the common implementation of setcontext for powerpc32.
- It not complete in itself should be included in to a framework that
+ It not complete in itself should be included in to a framework that
defines:
__CONTEXT_FUNC_NAME
and if appropriate:
__CONTEXT_ENABLE_FPRS
__CONTEXT_ENABLE_VRS
- Any archecture that implements the Vector unit is assumed to also
+ Any archecture that implements the Vector unit is assumed to also
implement the floating unit. */
/* Stack frame offsets. */
@@ -51,7 +51,7 @@
stw r0,_UC_GREGS+(PT_R0*4)(r3)
mflr r0
stw r2,_UC_GREGS+(PT_R2*4)(r3)
- stw r4,_UC_GREGS+(PT_R4*4)(r3)
+ stw r4,_UC_GREGS+(PT_R4*4)(r3)
/* Set the callers LR_SAVE, and the ucontext LR and NIP to the callers
return address. */
stw r0,_UC_GREGS+(PT_LNK*4)(r3)
@@ -85,7 +85,7 @@
stw r29,_UC_GREGS+(PT_R29*4)(r3)
stw r30,_UC_GREGS+(PT_R30*4)(r3)
stw r31,_UC_GREGS+(PT_R31*4)(r3)
-
+
/* Save the value of R1. We had to push the stack before we
had the address of uc_reg_space. So compute the address of
the callers stack pointer and save it as R1. */
@@ -174,10 +174,10 @@
la r10,(_UC_VREGS)(r3)
la r9,(_UC_VREGS+16)(r3)
-
+
/* beq L(no_vec)*/
beq 2f
-/* address of the combined VSCR/VSAVE quadword. */
+/* address of the combined VSCR/VSAVE quadword. */
la r8,(_UC_VREGS+512)(r3)
/* Save the vector registers */
@@ -194,7 +194,7 @@
stvx v3,0,r9
addi r10,r10,32
addi r9,r9,32
-
+
stvx v0,0,r8
stvx v4,0,r10
@@ -266,7 +266,7 @@
stvx v30,0,r10
stvx v31,0,r9
stw r0,0(r8)
-
+
2: /*L(no_vec):*/
# endif /* __CONTEXT_ENABLE_VRS */
#endif /* __CONTEXT_ENABLE_FPRS */
@@ -428,7 +428,7 @@
lfd fp0,_UC_FREGS+(0*8)(r31)
# ifdef _ARCH_PWR6
/* Use the extended four-operand version of the mtfsf insn. */
- mtfsf 0xff,fp0,1,0
+ mtfsf 0xff,fp31,1,0
# else
/* Availability of DFP indicates a 64-bit FPSCR. */
andi. r6,r7,PPC_FEATURE_HAS_DFP
@@ -514,13 +514,13 @@
lwz r31,_UC_GREGS+(PT_R31*4)(r31)
bctr
-
+
3:/*L(error_exit):*/
lwz r0,_FRAME_LR_SAVE+16(r1)
addi r1,r1,16
mtlr r0
blr
-
+
4:/*L(do_sigret):*/
addi r1,r4,-0xd0
li r0,SYS_ify(rt_sigreturn)
@@ -528,4 +528,3 @@
/* NOTREACHED */
END(__CONTEXT_FUNC_NAME)
-
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/shm.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2004, 2009 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
@@ -31,6 +31,7 @@
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/shm.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2002,2004,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,2000,2002,2004,2006,2009 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
@@ -30,6 +30,7 @@
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -32,6 +32,7 @@
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/inotify.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/inotify.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/inotify.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2008, 2009 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
@@ -98,7 +98,7 @@
__THROW;
/* Remove the watch specified by WD from the inotify instance FD. */
-extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
+extern int inotify_rm_watch (int __fd, int __wd) __THROW;
__END_DECLS
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h Sat Jan 31 00:03:00 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -31,6 +31,7 @@
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */