[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8464 - in /trunk: libc/ libc/nptl/ libc/nptl/sysdeps/pthread/ libc/nscd/ libc/posix/sys/ libc/stdlib/ libc/sunrpc/ ports/ p...
- To: commits@xxxxxxxxxx
- Subject: [commits] r8464 - in /trunk: libc/ libc/nptl/ libc/nptl/sysdeps/pthread/ libc/nscd/ libc/posix/sys/ libc/stdlib/ libc/sunrpc/ ports/ p...
- From: joseph@xxxxxxxxxx
- Date: Sat, 16 May 2009 22:38:23 -0000
Author: joseph
Date: Sat May 16 15:38:22 2009
New Revision: 8464
Log:
Merge changes between r8459 and r8463 from /fsf/trunk.
Added:
trunk/libc/nptl/libc-cleanup.c
- copied unchanged from r8463, fsf/trunk/libc/nptl/libc-cleanup.c
trunk/libc/nptl/nptl-init.c
- copied unchanged from r8463, fsf/trunk/libc/nptl/nptl-init.c
trunk/ports/sysdeps/arm/____longjmp_chk.S
- copied unchanged from r8463, fsf/trunk/ports/sysdeps/arm/____longjmp_chk.S
trunk/ports/sysdeps/mips/____longjmp_chk.c
- copied unchanged from r8463, fsf/trunk/ports/sysdeps/mips/____longjmp_chk.c
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
- copied unchanged from r8463, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
- copied unchanged from r8463, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
- copied unchanged from r8463, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
- copied unchanged from r8463, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
Removed:
trunk/libc/nptl/init.c
trunk/libc/sunrpc/.gitignore
Modified:
trunk/libc/ChangeLog
trunk/libc/nptl/ChangeLog
trunk/libc/nptl/Makefile
trunk/libc/nptl/cancellation.c
trunk/libc/nptl/libc-cancellation.c
trunk/libc/nptl/sysdeps/pthread/librt-cancellation.c
trunk/libc/nscd/nscd-client.h
trunk/libc/nscd/nscd.h
trunk/libc/nscd/nscd_helper.c
trunk/libc/posix/sys/wait.h
trunk/libc/stdlib/stdlib.h
trunk/ports/ChangeLog.arm
trunk/ports/ChangeLog.m68k
trunk/ports/ChangeLog.mips
trunk/ports/sysdeps/arm/__longjmp.S
trunk/ports/sysdeps/arm/eabi/__longjmp.S
trunk/ports/sysdeps/mips/__longjmp.c
trunk/ports/sysdeps/mips/mips64/__longjmp.c
trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
trunk/ports/sysdeps/unix/sysv/linux/m68k/Versions
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Sat May 16 15:38:22 2009
@@ -1,8 +1,16 @@
+2009-05-16 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * posix/sys/wait.h: Fix typos. Pretty printing.
+ * stdlib/stdlib.h: Likewise. Correct comments.
+
+ [BZ #10159]
+ * stdlib/stdlib.h (__WAIT_INT): Match the definition in <sys/wait.h>.
+
+ * nscd/nscd_helper.c (__nscd_cache_search): Fix exit condition in last
+ patch.
+
2009-05-15 Ulrich Drepper <drepper@xxxxxxxxxx>
- * nscd/nscd.h: Move Definition for BLOCK_ALIGN_LOG, BLOCK_ALIGN, and
- BLOCK_ALIGN_M1 to ...
- * nscd/nscd-client.h: ...here.
* nscd/nscd_helper.c (__nscd_cache_search): Introduce loop counter.
Use it if we absolutely cannot reach any more correct list elements
because that many do not fit into the currently mapped database.
Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Sat May 16 15:38:22 2009
@@ -1,3 +1,18 @@
+2009-05-16 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * libc-cancellation.c: Move __libc_cleanup_routine to...
+ * libc-cleanup.c: ...here. New file.
+ * Makefile (routines): Add libc-cleanup.
+
+ * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
+ test.
+ * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
+ * sysdeps/pthread/librt-cancellation.c: Likewise.
+
+ [BZ #9924]
+ * nptl-init.c: Renamed from init.c.
+ * Makefile: Change all occurences of init.c to nptl-init.c.
+
2009-05-15 Ulrich Drepper <drepper@xxxxxxxxxx>
* cancellation.c (__pthread_disable_asynccancel): Correct the bits
Modified: trunk/libc/nptl/Makefile
==============================================================================
--- trunk/libc/nptl/Makefile (original)
+++ trunk/libc/nptl/Makefile Sat May 16 15:38:22 2009
@@ -1,5 +1,4 @@
-# Copyright (C) 2002,2003,2004,2005,2006,2007,2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2002-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
@@ -30,10 +29,11 @@
extra-libs-others := $(extra-libs)
install-lib-ldscripts := libpthread.so
-routines = alloca_cutoff forward libc-lowlevellock libc-cancellation
+routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
+ libc-cleanup
shared-only-routines = forward
-libpthread-routines = init vars events version \
+libpthread-routines = nptl-init vars events version \
pthread_create pthread_exit pthread_detach \
pthread_join pthread_tryjoin pthread_timedjoin \
pthread_self pthread_equal pthread_yield \
@@ -143,8 +143,8 @@
# we have to compile some files with exception handling enabled, some
# even with asynchronous unwind tables.
-# init.c contains sigcancel_handler().
-CFLAGS-init.c = -fexceptions -fasynchronous-unwind-tables
+# nptl-init.c contains sigcancel_handler().
+CFLAGS-nptl-init.c = -fexceptions -fasynchronous-unwind-tables
# The unwind code itself,
CFLAGS-unwind.c = -fexceptions
CFLAGS-unwind-forcedunwind.c = -fexceptions -fasynchronous-unwind-tables
Modified: trunk/libc/nptl/cancellation.c
==============================================================================
--- trunk/libc/nptl/cancellation.c (original)
+++ trunk/libc/nptl/cancellation.c Sat May 16 15:38:22 2009
@@ -78,9 +78,6 @@
{
newval = oldval & ~CANCELTYPE_BITMASK;
- if (newval == oldval)
- break;
-
int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval,
oldval);
if (__builtin_expect (curval == oldval, 1))
Modified: trunk/libc/nptl/libc-cancellation.c
==============================================================================
--- trunk/libc/nptl/libc-cancellation.c (original)
+++ trunk/libc/nptl/libc-cancellation.c Sat May 16 15:38:22 2009
@@ -17,113 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <setjmp.h>
-#include <stdlib.h>
#include "pthreadP.h"
-#include <atomic.h>
-#include <bits/libc-lock.h>
-#ifndef NOT_IN_libc
-
-/* The next two functions are similar to pthread_setcanceltype() but
- more specialized for the use in the cancelable functions like write().
- They do not need to check parameters etc. */
-int
-attribute_hidden
-__libc_enable_asynccancel (void)
-{
- struct pthread *self = THREAD_SELF;
- int oldval = THREAD_GETMEM (self, cancelhandling);
-
- while (1)
- {
- int newval = oldval | CANCELTYPE_BITMASK;
-
- if (__builtin_expect ((oldval & CANCELED_BITMASK) != 0, 0))
- {
- /* If we are already exiting or if PTHREAD_CANCEL_DISABLED,
- stop right here. */
- if ((oldval & (EXITING_BITMASK | CANCELSTATE_BITMASK)) != 0)
- break;
-
- int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling,
- newval, oldval);
- if (__builtin_expect (curval != oldval, 0))
- {
- /* Somebody else modified the word, try again. */
- oldval = curval;
- continue;
- }
-
- THREAD_SETMEM (self, result, PTHREAD_CANCELED);
-
- __do_cancel ();
-
- /* NOTREACHED */
- }
-
- int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval,
- oldval);
- if (__builtin_expect (curval == oldval, 1))
- break;
-
- /* Prepare the next round. */
- oldval = curval;
- }
-
- return oldval;
-}
-
-
-void
-internal_function attribute_hidden
-__libc_disable_asynccancel (int oldtype)
-{
- /* If asynchronous cancellation was enabled before we do not have
- anything to do. */
- if (oldtype & CANCELTYPE_BITMASK)
- return;
-
- struct pthread *self = THREAD_SELF;
- int newval;
-
- int oldval = THREAD_GETMEM (self, cancelhandling);
-
- while (1)
- {
- newval = oldval & ~CANCELTYPE_BITMASK;
-
- if (newval == oldval)
- break;
-
- int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval,
- oldval);
- if (__builtin_expect (curval == oldval, 1))
- break;
-
- /* Prepare the next round. */
- oldval = curval;
- }
-
- /* We cannot return when we are being canceled. Upon return the
- thread might be things which would have to be undone. The
- following loop should loop until the cancellation signal is
- delivered. */
- while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK))
- == CANCELING_BITMASK, 0))
- {
- lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE);
- newval = THREAD_GETMEM (self, cancelhandling);
- }
-}
-
-
-void
-__libc_cleanup_routine (struct __pthread_cleanup_frame *f)
-{
- if (f->__do_it)
- f->__cancel_routine (f->__cancel_arg);
-}
-
-#endif
+#define __pthread_enable_asynccancel __libc_enable_asynccancel
+#define __pthread_disable_asynccancel __libc_disable_asynccancel
+#include <nptl/cancellation.c>
Modified: trunk/libc/nptl/sysdeps/pthread/librt-cancellation.c
==============================================================================
--- trunk/libc/nptl/sysdeps/pthread/librt-cancellation.c (original)
+++ trunk/libc/nptl/sysdeps/pthread/librt-cancellation.c Sat May 16 15:38:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -17,92 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <setjmp.h>
-#include <signal.h>
-#include <stdlib.h>
#include "pthreadP.h"
-#include "atomic.h"
-#ifdef IS_IN_librt
-/* The next two functions are similar to pthread_setcanceltype() but
- more specialized for the use in the cancelable functions like write().
- They do not need to check parameters etc. */
-int
-attribute_hidden
-__librt_enable_asynccancel (void)
-{
- struct pthread *self = THREAD_SELF;
- int oldval = THREAD_GETMEM (self, cancelhandling);
-
- while (1)
- {
- int newval = oldval | CANCELTYPE_BITMASK;
-
- if (__builtin_expect ((oldval & CANCELED_BITMASK) != 0, 0))
- {
- /* If we are already exiting or if PTHREAD_CANCEL_DISABLED,
- stop right here. */
- if ((oldval & (EXITING_BITMASK | CANCELSTATE_BITMASK)) != 0)
- break;
-
- int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling,
- newval, oldval);
- if (__builtin_expect (curval != oldval, 0))
- {
- /* Somebody else modified the word, try again. */
- oldval = curval;
- continue;
- }
-
- THREAD_SETMEM (self, result, PTHREAD_CANCELED);
-
- __do_cancel ();
-
- /* NOTREACHED */
- }
-
- int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval,
- oldval);
- if (__builtin_expect (curval == oldval, 1))
- break;
-
- /* Prepare the next round. */
- oldval = curval;
- }
-
- return oldval;
-}
-
-
-void
-internal_function attribute_hidden
-__librt_disable_asynccancel (int oldtype)
-{
- /* If asynchronous cancellation was enabled before we do not have
- anything to do. */
- if (oldtype & CANCELTYPE_BITMASK)
- return;
-
- struct pthread *self = THREAD_SELF;
- int oldval = THREAD_GETMEM (self, cancelhandling);
-
- while (1)
- {
- int newval = oldval & ~CANCELTYPE_BITMASK;
-
- if (newval == oldval)
- break;
-
- int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval,
- oldval);
- if (__builtin_expect (curval == oldval, 1))
- break;
-
- /* Prepare the next round. */
- oldval = curval;
- }
-}
-
-
-#endif
+#define __pthread_enable_asynccancel __librt_enable_asynccancel
+#define __pthread_disable_asynccancel __librt_disable_asynccancel
+#include <nptl/cancellation.c>
Modified: trunk/libc/nscd/nscd-client.h
==============================================================================
--- trunk/libc/nscd/nscd-client.h (original)
+++ trunk/libc/nscd/nscd-client.h Sat May 16 15:38:22 2009
@@ -46,11 +46,6 @@
/* Maximum allowed length for the key. */
#define MAXKEYLEN 1024
-
-/* Maximum alignment requirement we will encounter. */
-#define BLOCK_ALIGN_LOG 3
-#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG)
-#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1)
/* Available services. */
Modified: trunk/libc/nscd/nscd.h
==============================================================================
--- trunk/libc/nscd/nscd.h (original)
+++ trunk/libc/nscd/nscd.h Sat May 16 15:38:22 2009
@@ -110,6 +110,11 @@
/* Path used when not using persistent storage. */
#define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
+
+/* Maximum alignment requirement we will encounter. */
+#define BLOCK_ALIGN_LOG 3
+#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG)
+#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1)
/* Default value for the maximum size of the database files. */
#define DEFAULT_MAX_DB_SIZE (32 * 1024 * 1024)
Modified: trunk/libc/nscd/nscd_helper.c
==============================================================================
--- trunk/libc/nscd/nscd_helper.c (original)
+++ trunk/libc/nscd/nscd_helper.c Sat May 16 15:38:22 2009
@@ -528,7 +528,7 @@
work = atomic_forced_read (here->next);
/* Prevent endless loops. This should never happen but perhaps
the database got corrupted, accidentally or deliberately. */
- if (work == trail || loop_cnt-- > 0)
+ if (work == trail || loop_cnt-- == 0)
break;
if (tick)
{
Modified: trunk/libc/posix/sys/wait.h
==============================================================================
--- trunk/libc/posix/sys/wait.h (original)
+++ trunk/libc/posix/sys/wait.h Sat May 16 15:38:22 2009
@@ -1,5 +1,5 @@
-/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005,2007
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005,2007,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
@@ -51,7 +51,7 @@
# endif
/* This is the type of the argument to `wait'. The funky union
- causes redeclarations with ether `int *' or `union wait *' to be
+ causes redeclarations with either `int *' or `union wait *' to be
allowed without complaint. __WAIT_STATUS_DEFN is the type used in
the actual function definitions. */
@@ -79,22 +79,22 @@
/* This will define all the `__W*' macros. */
# include <bits/waitstatus.h>
-# define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status))
-# define WTERMSIG(status) __WTERMSIG(__WAIT_INT(status))
-# define WSTOPSIG(status) __WSTOPSIG(__WAIT_INT(status))
-# define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status))
-# define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status))
-# define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status))
+# define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status))
+# define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status))
+# define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status))
+# define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status))
+# define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status))
+# define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status))
# ifdef __WIFCONTINUED
-# define WIFCONTINUED(status) __WIFCONTINUED(__WAIT_INT(status))
+# define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status))
# endif
#endif /* <stdlib.h> not included. */
#ifdef __USE_BSD
# define WCOREFLAG __WCOREFLAG
-# define WCOREDUMP(status) __WCOREDUMP(__WAIT_INT(status))
-# define W_EXITCODE(ret, sig) __W_EXITCODE(ret, sig)
-# define W_STOPCODE(sig) __W_STOPCODE(sig)
+# define WCOREDUMP(status) __WCOREDUMP (__WAIT_INT (status))
+# define W_EXITCODE(ret, sig) __W_EXITCODE (ret, sig)
+# define W_STOPCODE(sig) __W_STOPCODE (sig)
#endif
/* The following values are used by the `waitid' function. */
Modified: trunk/libc/stdlib/stdlib.h
==============================================================================
--- trunk/libc/stdlib/stdlib.h (original)
+++ trunk/libc/stdlib/stdlib.h Sat May 16 15:38:22 2009
@@ -48,15 +48,15 @@
as well as POSIX.1 use of `int' for the status word. */
# if defined __GNUC__ && !defined __cplusplus
-# define __WAIT_INT(status) \
- (__extension__ ({ union { __typeof(status) __in; int __i; } __u; \
- __u.__in = (status); __u.__i; }))
+# define __WAIT_INT(status) \
+ (__extension__ (((union { __typeof(status) __in; int __i; }) \
+ { .__in = (status) }).__i))
# else
# define __WAIT_INT(status) (*(int *) &(status))
# endif
/* This is the type of the argument to `wait'. The funky union
- causes redeclarations with ether `int *' or `union wait *' to be
+ causes redeclarations with either `int *' or `union wait *' to be
allowed without complaint. __WAIT_STATUS_DEFN is the type used in
the actual function definitions. */
@@ -82,14 +82,14 @@
# endif /* Use BSD. */
/* Define the macros <sys/wait.h> also would define this way. */
-# define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status))
-# define WTERMSIG(status) __WTERMSIG(__WAIT_INT(status))
-# define WSTOPSIG(status) __WSTOPSIG(__WAIT_INT(status))
-# define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status))
-# define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status))
-# define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status))
+# define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status))
+# define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status))
+# define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status))
+# define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status))
+# define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status))
+# define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status))
# ifdef __WIFCONTINUED
-# define WIFCONTINUED(status) __WIFCONTINUED(__WAIT_INT(status))
+# define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status))
# endif
#endif /* X/Open and <sys/wait.h> not included. */
@@ -222,14 +222,14 @@
#ifdef __USE_GNU
/* The concept of one static locale per category is not very well
thought out. Many applications will need to process its data using
- information from several different locales. Another application is
+ information from several different locales. Another problem is
the implementation of the internationalization handling in the
- upcoming ISO C++ standard library. To support this another set of
- the functions using locale data exist which have an additional
+ ISO C++ standard library. To support this another set of
+ the functions using locale data exist which take an additional
argument.
- Attention: all these functions are *not* standardized in any form.
- This is a proof-of-concept implementation. */
+ Attention: even though several *_l interfaces are part of POSIX:2008,
+ these are not. */
/* Structure for reentrant locale using functions. This is an
(almost) opaque type for the user level programs. */
Modified: trunk/ports/ChangeLog.arm
==============================================================================
--- trunk/ports/ChangeLog.arm (original)
+++ trunk/ports/ChangeLog.arm Sat May 16 15:38:22 2009
@@ -1,3 +1,14 @@
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/arm/____longjmp_chk.S: New file.
+ * sysdeps/arm/__longjmp.S: If CHECK_SP is defined, use it.
+ * sysdeps/arm/eabi/__longjmp.S: Likewise.
+
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV,
+ __ASSUME_PWRITEV): Don't undefine.
+
2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/arm/Versions (libc): Add
Modified: trunk/ports/ChangeLog.m68k
==============================================================================
--- trunk/ports/ChangeLog.m68k (original)
+++ trunk/ports/ChangeLog.m68k Sat May 16 15:38:22 2009
@@ -1,3 +1,8 @@
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/m68k/Versions (libc): Add
+ fallocate64@@GLIBC_2.11.
+
2009-04-25 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/m68k/kernel-features.h: Revert last
Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Sat May 16 15:38:22 2009
@@ -1,3 +1,17 @@
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/____longjmp_chk.c: New file.
+ * sysdeps/mips/__longjmp.c: If CHECK_SP is defined, use it. Don't
+ undefine __longjmp.
+ * sysdeps/mips64/__longjmp.c: Likewise.
+
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: New.
+
2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/Versions (libc): Add
Modified: trunk/ports/sysdeps/arm/__longjmp.S
==============================================================================
--- trunk/ports/sysdeps/arm/__longjmp.S (original)
+++ trunk/ports/sysdeps/arm/__longjmp.S Sat May 16 15:38:22 2009
@@ -1,5 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 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
@@ -29,5 +29,9 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+#ifdef CHECK_SP
+ ldr r1, [ip, #32]
+ CHECK_SP (r1)
+#endif
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
Modified: trunk/ports/sysdeps/arm/eabi/__longjmp.S
==============================================================================
--- trunk/ports/sysdeps/arm/eabi/__longjmp.S (original)
+++ trunk/ports/sysdeps/arm/eabi/__longjmp.S Sat May 16 15:38:22 2009
@@ -1,5 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 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,10 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+#ifdef CHECK_SP
+ ldr r1, [ip, #32]
+ CHECK_SP (r1)
+#endif
LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
#ifdef IS_IN_rtld
Modified: trunk/ports/sysdeps/mips/__longjmp.c
==============================================================================
--- trunk/ports/sysdeps/mips/__longjmp.c (original)
+++ trunk/ports/sysdeps/mips/__longjmp.c Sat May 16 15:38:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@xxxxxxx).
@@ -20,8 +20,6 @@
#include <setjmp.h>
#include <stdlib.h>
-#undef __longjmp
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -36,6 +34,11 @@
Without this it saves $a1 in a register which gets clobbered
along the way. */
register int val asm ("a1");
+#ifdef CHECK_SP
+ register long sp asm ("$29");
+ if ((long) (env[0].__sp) < sp)
+ __fortify_fail ("longjmp causes uninitialized stack frame");
+#endif
#ifdef __mips_hard_float
/* Pull back the floating point callee-saved registers. */
Modified: trunk/ports/sysdeps/mips/mips64/__longjmp.c
==============================================================================
--- trunk/ports/sysdeps/mips/mips64/__longjmp.c (original)
+++ trunk/ports/sysdeps/mips/mips64/__longjmp.c Sat May 16 15:38:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004
+/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@xxxxxxx).
@@ -22,8 +22,6 @@
#include <sgidefs.h>
#include <stdlib.h>
-#undef __longjmp
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -38,6 +36,11 @@
Without this it saves $a1 in a register which gets clobbered
along the way. */
register int val asm ("a1");
+#ifdef CHECK_SP
+ register long long sp asm ("$29");
+ if ((long long) (env[0].__sp) < sp)
+ __fortify_fail ("longjmp causes uninitialized stack frame");
+#endif
#ifdef __mips_hard_float
/* Pull back the floating point callee-saved registers. */
Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h Sat May 16 15:38:22 2009
@@ -56,5 +56,3 @@
/* These syscalls are not implemented yet for ARM. */
#undef __ASSUME_PSELECT
#undef __ASSUME_PPOLL
-#undef __ASSUME_PREADV
-#undef __ASSUME_PWRITEV
Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/Versions
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/Versions (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/Versions Sat May 16 15:38:22 2009
@@ -29,4 +29,7 @@
# v*
versionsort64;
}
+ GLIBC_2.11 {
+ fallocate64;
+ }
}