[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r10808 - in /trunk: libc/ libc/dlfcn/ libc/elf/ libc/libio/ libc/manual/ libc/nis/nss_nis/ libc/nptl/ libc/nptl/sysdeps/unix...



Author: joseph
Date: Thu Jun 24 08:01:34 2010
New Revision: 10808

Log:
Merge changes between r10687 and r10807 from /fsf/trunk.

Added:
    trunk/libc/sysdeps/powerpc/powerpc32/power7/memcmp.S
      - copied unchanged from r10807, fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/memcmp.S
    trunk/libc/sysdeps/powerpc/powerpc32/power7/strncmp.S
      - copied unchanged from r10807, fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/strncmp.S
    trunk/libc/sysdeps/powerpc/powerpc64/power7/memcmp.S
      - copied unchanged from r10807, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/memcmp.S
    trunk/libc/sysdeps/powerpc/powerpc64/power7/strncmp.S
      - copied unchanged from r10807, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/strncmp.S
Modified:
    trunk/libc/ChangeLog
    trunk/libc/NEWS
    trunk/libc/dlfcn/Makefile
    trunk/libc/elf/dl-reloc.c
    trunk/libc/libio/stdio.h
    trunk/libc/manual/libc.texinfo
    trunk/libc/nis/nss_nis/nis-initgroups.c
    trunk/libc/nptl/ChangeLog
    trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
    trunk/libc/posix/getopt.h
    trunk/libc/posix/group_member.c
    trunk/libc/sysdeps/unix/sysv/linux/getlogin.c
    trunk/libc/sysdeps/unix/sysv/linux/getlogin_r.c
    trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
    trunk/libc/wcsmbs/wchar.h
    trunk/ports/ChangeLog.arm
    trunk/ports/ChangeLog.hppa
    trunk/ports/ChangeLog.m68k
    trunk/ports/ChangeLog.mips
    trunk/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
    trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
    trunk/ports/sysdeps/unix/sysv/linux/hppa/getcontext.S
    trunk/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c
    trunk/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S
    trunk/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
    trunk/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
    trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Thu Jun 24 08:01:34 2010
@@ -1,3 +1,63 @@
+2010-06-21  Andreas Schwab <schwab@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
+	Restore proper fallback handling.
+
+2010-06-19  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	[BZ #11701]
+	* posix/group_member.c (__group_member): Correct checking loop.
+
+	* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): Handle
+	OOM in getpwuid_r correctly.  Return error number when the caller
+	should return, otherwise -1.
+	(getlogin_r): Adjust to return also for result of __getlogin_r_loginuid
+	call returning > 0 value.
+	* sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
+
+2010-06-07  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* dlfcn/Makefile: Remove explicit dependencies on libc.so and
+	libc_nonshared.a from targets in modules-names.
+
+2010-06-02  Kirill A. Shutemov  <kirill@xxxxxxxxxxxxx>
+
+	* elf/dl-reloc.c: Flush cache after solving TEXTRELs if arch
+	requires it.
+
+2010-06-10  Luis Machado  <luisgpm@xxxxxxxxxx>
+
+	* sysdeps/powerpc/powerpc32/power7/memcmp.S: New file
+	* sysdeps/powerpc/powerpc64/power7/memcmp.S: New file.
+	* sysdeps/powerpc/powerpc32/power7/strncmp.S: New file.
+	* sysdeps/powerpc/powerpc64/power7/strncmp.S: New file.
+
+2010-06-02  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* nis/nss_nis/nis-initgroups.c (get_uid): Properly resize buffer.
+
+2010-06-14  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Define F_SETPIPE_SZ
+	and F_GETPIPE_SZ.
+	* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise
+
+2010-06-14  Roland McGrath  <roland@xxxxxxxxxx>
+
+	* manual/libc.texinfo (@copying): Change to GFDL v1.3.
+
+2010-06-07  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* libio/stdio.h (sscanf, vsscanf): Use __REDIRECT_NTH instead of
+	__REDIRECT followed by __THROW.
+	* wcsmbs/wchar.h (swscanf, vswscanf): Likewise.
+	* posix/getopt.h (getopt): Likewise.
+
 2010-06-02  Emilio Pozuelo Monfort  <pochu27@xxxxxxxxx>
 
 	* hurd/lookup-at.c (__file_name_lookup_at): Accept

Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Thu Jun 24 08:01:34 2010
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2010-5-19
+GNU C Library NEWS -- history of user-visible changes.  2010-6-19
 Copyright (C) 1992-2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -7,7 +7,11 @@
 
 Version 2.13
 
-* POWER7 optimizations: memset
+* The following bugs are resolved with this release:
+
+  11640, 11701
+
+* POWER7 optimizations: memset, memcmp, strncmp
 
 Version 2.12
 

Modified: trunk/libc/dlfcn/Makefile
==============================================================================
--- trunk/libc/dlfcn/Makefile (original)
+++ trunk/libc/dlfcn/Makefile Thu Jun 24 08:01:34 2010
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1995-2006, 2010 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
@@ -95,9 +95,9 @@
 
 LDFLAGS-default = $(LDFLAGS-rdynamic)
 $(objpfx)default: $(libdl) $(objpfx)defaultmod1.so $(objpfx)defaultmod2.so
-$(objpfx)defaultmod1.so: $(libdl) $(common-objpfx)libc_nonshared.a
+$(objpfx)defaultmod1.so: $(libdl)
 LDFLAGS-defaultmod2.so = $(LDFLAGS-Bsymbolic)
-$(objpfx)defaultmod2.so: $(libdl) $(common-objpfx)libc_nonshared.a
+$(objpfx)defaultmod2.so: $(libdl)
 
 $(objpfx)errmsg1: $(libdl)
 $(objpfx)errmsg1.out: $(objpfx)errmsg1 $(objpfx)errmsg1mod.so
@@ -108,8 +108,6 @@
 $(objpfx)tstcxaatexit: $(libdl)
 $(objpfx)tstcxaatexit.out: $(objpfx)tstcxaatexit $(objpfx)modcxaatexit.so
 
-$(objpfx)modatexit.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
-
 $(objpfx)tststatic: $(objpfx)libdl.a
 $(objpfx)tststatic.out: $(objpfx)tststatic $(objpfx)modstatic.so
 
@@ -117,36 +115,24 @@
 $(objpfx)tststatic2.out: $(objpfx)tststatic2 $(objpfx)modstatic.so \
 			 $(objpfx)modstatic2.so
 
-$(objpfx)modstatic2.so: $(libdl) $(common-objpfx)libc.so \
-			$(common-objpfx)libc_nonshared.a
+$(objpfx)modstatic2.so: $(libdl)
 
 $(objpfx)bug-dlopen1: $(libdl)
 
 $(objpfx)bug-dlsym1: $(libdl) $(objpfx)bug-dlsym1-lib2.so
 $(objpfx)bug-dlsym1.out: $(objpfx)bug-dlsym1-lib1.so \
 			 $(objpfx)bug-dlsym1-lib2.so
-$(objpfx)bug-dlsym1-lib1.so: $(objpfx)bug-dlsym1-lib2.so \
-			     $(common-objpfx)libc.so \
-			     $(common-objpfx)libc_nonshared.a
-$(objpfx)bug-dlsym1-lib2.so: $(common-objpfx)libc.so \
-			     $(common-objpfx)libc_nonshared.a
+$(objpfx)bug-dlsym1-lib1.so: $(objpfx)bug-dlsym1-lib2.so
 
 $(objpfx)bug-atexit1: $(libdl)
 $(objpfx)bug-atexit1.out: $(objpfx)bug-atexit1-lib.so
-$(objpfx)bug-atexit1-lib.so: $(common-objpfx)libc.so \
-			     $(common-objpfx)libc_nonshared.a
 
 $(objpfx)bug-atexit2: $(libdl)
 $(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
-$(objpfx)bug-atexit2-lib.so: $(common-objpfx)libc.so \
-			     $(common-objpfx)libc_nonshared.a
 
-LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(common-objpfx)elf/ld.so \
-			    $(common-objpfx)libc_nonshared.a
+LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh
 $(objpfx)bug-atexit3: $(libdl)
 $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
-$(objpfx)bug-atexit3-lib.so: $(common-objpfx)libc.so \
-			     $(common-objpfx)libc_nonshared.a
 
 
 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.

Modified: trunk/libc/elf/dl-reloc.c
==============================================================================
--- trunk/libc/elf/dl-reloc.c (original)
+++ trunk/libc/elf/dl-reloc.c Thu Jun 24 08:01:34 2010
@@ -1,5 +1,5 @@
 /* Relocate a shared object and resolve its references to other loaded objects.
-   Copyright (C) 1995-2006, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1995-2006, 2008, 2009, 2010 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
@@ -319,6 +319,10 @@
 	  goto call_error;
 	}
 
+#ifdef CLEAR_CACHE
+      CLEAR_CACHE (textrels->start, textrels->start + textrels->len);
+#endif
+
       textrels = textrels->next;
     }
 

Modified: trunk/libc/libio/stdio.h
==============================================================================
--- trunk/libc/libio/stdio.h (original)
+++ trunk/libc/libio/stdio.h Thu Jun 24 08:01:34 2010
@@ -447,9 +447,9 @@
 		       __isoc99_fscanf) __wur;
 extern int __REDIRECT (scanf, (__const char *__restrict __format, ...),
 		       __isoc99_scanf) __wur;
-extern int __REDIRECT (sscanf, (__const char *__restrict __s,
-				__const char *__restrict __format, ...),
-		       __isoc99_sscanf) __THROW;
+extern int __REDIRECT_NTH (sscanf, (__const char *__restrict __s,
+				    __const char *__restrict __format, ...),
+			   __isoc99_sscanf);
 # else
 extern int __isoc99_fscanf (FILE *__restrict __stream,
 			    __const char *__restrict __format, ...) __wur;
@@ -501,11 +501,11 @@
 extern int __REDIRECT (vscanf, (__const char *__restrict __format,
 				_G_va_list __arg), __isoc99_vscanf)
      __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
-extern int __REDIRECT (vsscanf,
-		       (__const char *__restrict __s,
-			__const char *__restrict __format, _G_va_list __arg),
-		       __isoc99_vsscanf)
-     __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
+extern int __REDIRECT_NTH (vsscanf,
+			   (__const char *__restrict __s,
+			    __const char *__restrict __format,
+			    _G_va_list __arg), __isoc99_vsscanf)
+     __attribute__ ((__format__ (__scanf__, 2, 0)));
 #  else
 extern int __isoc99_vfscanf (FILE *__restrict __s,
 			     __const char *__restrict __format,

Modified: trunk/libc/manual/libc.texinfo
==============================================================================
--- trunk/libc/manual/libc.texinfo (original)
+++ trunk/libc/manual/libc.texinfo Thu Jun 24 08:01:34 2010
@@ -33,10 +33,10 @@
 @value{VERSION} @value{PKGVERSION}.
 
 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
-2003, 2007, 2008 Free Software Foundation, Inc.
+2003, 2007, 2008, 2010 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with the
 Invariant Sections being ``Free Software Needs Free Documentation''
 and ``GNU Lesser General Public License'', the Front-Cover texts being

Modified: trunk/libc/nis/nss_nis/nis-initgroups.c
==============================================================================
--- trunk/libc/nis/nss_nis/nis-initgroups.c (original)
+++ trunk/libc/nis/nss_nis/nis-initgroups.c Thu Jun 24 08:01:34 2010
@@ -139,7 +139,7 @@
       if (r != ERANGE)
 	break;
 
-      extend_alloca (buf, buflen, 2 * buflen);
+      buf = extend_alloca (buf, buflen, 2 * buflen);
     }
 
   return 1;

Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Thu Jun 24 08:01:34 2010
@@ -1,3 +1,8 @@
+2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@xxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
+	location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
+
 2010-04-09  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	[BZ #11390]

Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S Thu Jun 24 08:01:34 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
+/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -282,6 +282,7 @@
 	rts
 	 mov.l	@r15+, r12
 
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 	.align	2
 # ifdef PIC
 .Lgot:
@@ -293,7 +294,6 @@
 	.long	__have_futex_clock_realtime
 # endif
 
-# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 .Lreltmo:
 	/* Check for a valid timeout value.  */
 	mov.l	@(4,r6), r1

Modified: trunk/libc/posix/getopt.h
==============================================================================
--- trunk/libc/posix/getopt.h (original)
+++ trunk/libc/posix/getopt.h Thu Jun 24 08:01:34 2010
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009,2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -158,9 +158,9 @@
    additional functionality can be disable at runtime.  This redirection
    helps to also do this at runtime.  */
 #  ifdef __REDIRECT
-  extern int __REDIRECT (getopt, (int ___argc, char *const *___argv,
-				  const char *__shortopts),
-			 __posix_getopt) __THROW;
+  extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv,
+				      const char *__shortopts),
+			     __posix_getopt);
 #  else
 extern int __posix_getopt (int ___argc, char *const *___argv,
 			   const char *__shortopts) __THROW;

Modified: trunk/libc/posix/group_member.c
==============================================================================
--- trunk/libc/posix/group_member.c (original)
+++ trunk/libc/posix/group_member.c Thu Jun 24 08:01:34 2010
@@ -1,5 +1,5 @@
 /* `group_member' -- test if process is in a given group.
-   Copyright (C) 1995, 1997, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1997, 2002, 2010 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
@@ -39,10 +39,11 @@
       groups = __alloca (size * sizeof *groups);
       n = __getgroups (size, groups);
       size *= 2;
-    } while (n == size / 2);
+    }
+  while (n == size / 2);
 
-  while (n >= 0)
-    if (groups[n--] == gid)
+  while (n-- > 0)
+    if (groups[n] == gid)
       return 1;
 
   return 0;

Modified: trunk/libc/sysdeps/unix/sysv/linux/getlogin.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/getlogin.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/getlogin.c Thu Jun 24 08:01:34 2010
@@ -32,8 +32,9 @@
 char *
 getlogin (void)
 {
-  if (__getlogin_r_loginuid (name, sizeof (name)) == 0)
-    return name;
+  int res = __getlogin_r_loginuid (name, sizeof (name));
+  if (res >= 0)
+    return res == 0 ? name : NULL;
 
   return getlogin_fd0 ();
 }

Modified: trunk/libc/sysdeps/unix/sysv/linux/getlogin_r.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/getlogin_r.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/getlogin_r.c Thu Jun 24 08:01:34 2010
@@ -27,6 +27,10 @@
 #undef getlogin_r
 
 
+/* Try to determine login name from /proc/self/loginuid and return 0
+   if successful.  If /proc/self/loginuid cannot be read return -1.
+   Otherwise return the error number.  */
+
 int
 attribute_hidden
 __getlogin_r_loginuid (name, namesize)
@@ -35,7 +39,7 @@
 {
   int fd = open_not_cancel_2 ("/proc/self/loginuid", O_RDONLY);
   if (fd == -1)
-    return 1;
+    return -1;
 
   /* We are reading a 32-bit number.  12 bytes are enough for the text
      representation.  If not, something is wrong.  */
@@ -51,37 +55,38 @@
       || (uidbuf[n] = '\0',
 	  uid = strtoul (uidbuf, &endp, 10),
 	  endp == uidbuf || *endp != '\0'))
-    return 1;
+    return -1;
 
   size_t buflen = 1024;
   char *buf = alloca (buflen);
   bool use_malloc = false;
   struct passwd pwd;
   struct passwd *tpwd;
+  int result = 0;
   int res;
 
-  while ((res = __getpwuid_r (uid, &pwd, buf, buflen, &tpwd)) != 0)
+  while ((res = __getpwuid_r (uid, &pwd, buf, buflen, &tpwd)) == ERANGE)
     if (__libc_use_alloca (2 * buflen))
-      extend_alloca (buf, buflen, 2 * buflen);
+      buf = extend_alloca (buf, buflen, 2 * buflen);
     else
       {
 	buflen *= 2;
 	char *newp = realloc (use_malloc ? buf : NULL, buflen);
 	if (newp == NULL)
 	  {
-	  fail:
-	    if (use_malloc)
-	      free (buf);
-	    return 1;
+	    result = ENOMEM;
+	    goto out;
 	  }
 	buf = newp;
 	use_malloc = true;
       }
 
-  if (tpwd == NULL)
-    goto fail;
+  if (res != 0)
+    {
+      result = -1;
+      goto out;
+    }
 
-  int result = 0;
   size_t needed = strlen (pwd.pw_name) + 1;
   if (needed > namesize)
     {
@@ -109,8 +114,9 @@
      char *name;
      size_t namesize;
 {
-  if (__getlogin_r_loginuid (name, namesize) == 0)
-    return 0;
+  int res = __getlogin_r_loginuid (name, namesize);
+  if (res >= 0)
+    return res;
 
   return getlogin_r_fd0 (name, namesize);
 }

Modified: trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -102,6 +102,8 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with

Modified: trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -99,6 +99,8 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with

Modified: trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -102,6 +102,8 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with

Modified: trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -118,6 +118,8 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -103,6 +103,8 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with

Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -101,6 +101,8 @@
 # define F_SETLEASE     1024	/* Set a lease.  */
 # define F_GETLEASE     1025	/* Enquire what lease is active.  */
 # define F_NOTIFY       1026	/* Request notfications on a directory.  */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with

Modified: trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -117,6 +117,8 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with

Modified: trunk/libc/wcsmbs/wchar.h
==============================================================================
--- trunk/libc/wcsmbs/wchar.h (original)
+++ trunk/libc/wcsmbs/wchar.h Thu Jun 24 08:01:34 2010
@@ -658,10 +658,10 @@
 extern int __REDIRECT (wscanf, (__const wchar_t *__restrict __format, ...),
 		       __isoc99_wscanf)
      /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
-extern int __REDIRECT (swscanf, (__const wchar_t *__restrict __s,
-				 __const wchar_t *__restrict __format, ...),
-		       __isoc99_swscanf)
-     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
+extern int __REDIRECT_NTH (swscanf, (__const wchar_t *__restrict __s,
+				     __const wchar_t *__restrict __format,
+				     ...), __isoc99_swscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
 #  else
 extern int __isoc99_fwscanf (__FILE *__restrict __stream,
 			     __const wchar_t *__restrict __format, ...);
@@ -712,10 +712,10 @@
 extern int __REDIRECT (vwscanf, (__const wchar_t *__restrict __format,
 				 __gnuc_va_list __arg), __isoc99_vwscanf)
      /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
-extern int __REDIRECT (vswscanf, (__const wchar_t *__restrict __s,
-				  __const wchar_t *__restrict __format,
-				  __gnuc_va_list __arg), __isoc99_vswscanf)
-     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+extern int __REDIRECT_NTH (vswscanf, (__const wchar_t *__restrict __s,
+				      __const wchar_t *__restrict __format,
+				      __gnuc_va_list __arg), __isoc99_vswscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
 #  else
 extern int __isoc99_vfwscanf (__FILE *__restrict __s,
 			      __const wchar_t *__restrict __format,

Modified: trunk/ports/ChangeLog.arm
==============================================================================
--- trunk/ports/ChangeLog.arm (original)
+++ trunk/ports/ChangeLog.arm Thu Jun 24 08:01:34 2010
@@ -1,3 +1,8 @@
+2010-06-14  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETPIPE_SZ,
+	F_GETPIPE_SZ): Define.
+
 2010-05-21  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S: New.

Modified: trunk/ports/ChangeLog.hppa
==============================================================================
--- trunk/ports/ChangeLog.hppa (original)
+++ trunk/ports/ChangeLog.hppa Thu Jun 24 08:01:34 2010
@@ -1,3 +1,16 @@
+2010-06-23  Carlos O'Donell  <carlos@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext_ret):
+	Document that this function is a non-standard calling ABI.
+	Document register usage.
+	(__getcontext): Use normal %sp without adjustment. Use named
+	resgister %sp. 
+	* sysdeps/unix/sysv/linux/hppa/makecontext.c: Remove FRAME_SIZE.
+	Define FRAME_SIZE_UL, FRAME_SIZE_BYTES, ARGS.
+	(__makecontext): Create and setup a stack frame. 
+	* sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext):
+	Use named register %sp. Do not use oSS_SP. 
+
 2010-06-07  Andreas Schwab  <schwab@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Update to agree

Modified: trunk/ports/ChangeLog.m68k
==============================================================================
--- trunk/ports/ChangeLog.m68k (original)
+++ trunk/ports/ChangeLog.m68k Thu Jun 24 08:01:34 2010
@@ -1,3 +1,16 @@
+2010-06-13  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Mark all functions as
+	non-throwing.
+
+	* sysdeps/unix/sysv/linux/m68k/sys/user.h (NBPG, UPAGES)
+	(HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Define.
+
+2010-06-11  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: Force
+	alignment of futex variables.
+
 2010-05-22  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
 
 	* data/c++-types-m68k-linux-gnu.data: New file.

Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Thu Jun 24 08:01:34 2010
@@ -1,3 +1,8 @@
+2010-06-14  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETPIPE_SZ,
+	F_GETPIPE_SZ): Define.
+
 2010-05-21  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c,

Modified: trunk/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
==============================================================================
--- trunk/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h (original)
+++ trunk/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h Thu Jun 24 08:01:34 2010
@@ -126,7 +126,7 @@
 /* Define a const math function.  */
 #define __m81_defun(rettype, func, args)				      \
   __m81_inline rettype __attribute__((__const__))			      \
-  __m81_u(func) args
+  __NTH (__m81_u(func) args)
 
 /* Define the three variants of a math function that has a direct
    implementation in the m68k fpu.  FUNC is the name for C (which will be
@@ -329,8 +329,8 @@
 }									  \
 									  \
 __m81_inline float_type							  \
-__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y,		  \
-			   float_type __z)				  \
+__NTH (__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y,	  \
+				  float_type __z))			  \
 {									  \
   return (__x * __y) + __z;						  \
 }
@@ -346,8 +346,8 @@
 
 # define __inline_functions(float_type, s)				\
 __m81_inline void							\
-__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx,	\
-			      float_type *__cosx)			\
+__NTH (__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
+				     float_type *__cosx))		\
 {									\
   __asm ("fsincos%.x %2,%1:%0"						\
 	 : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x));			\
@@ -368,13 +368,13 @@
    NAME, to make token pasting work correctly with -traditional.  */
 # define __inline_forward_c(rettype, name, args1, args2)	\
 __MATH_INLINE rettype __attribute__((__const__))		\
-  name args1							\
+__NTH (name args1)						\
 {								\
   return __CONCAT(__,name) args2;				\
 }
 
 # define __inline_forward(rettype, name, args1, args2)	\
-__MATH_INLINE rettype name args1			\
+__MATH_INLINE rettype __NTH (name args1)		\
 {							\
   return __CONCAT(__,name) args2;			\
 }

Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -102,6 +102,8 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with

Modified: trunk/ports/sysdeps/unix/sysv/linux/hppa/getcontext.S
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/hppa/getcontext.S (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/hppa/getcontext.S Thu Jun 24 08:01:34 2010
@@ -23,17 +23,21 @@
 #include "ucontext_i.h"
 
 
-	/* Trampoline function.  */
+	/* Trampoline function. Non-standard calling ABI.  */
 	/* Can not use ENTRY(__getcontext_ret) here.  */
 	.type	__getcontext_ret, @function
 	.hidden	__getcontext_ret
 __getcontext_ret:
 	.proc
 	.callinfo FRAME=0,NO_CALLS
+	/* r26-r23 contain original r3-r6, but because setcontext
+	   does not reload r3-r6 (it's using them as temporaries)
+	   we must save them elsewhere and swap them back in.  */
 	copy	%r23, %r3
 	copy	%r24, %r4
 	copy	%r25, %r5
 	copy	%r26, %r6
+	/* r20 contains original return pointer.  */
 	bv	0(%r20)
 	copy	%r0, %ret0
 	.procend
@@ -72,13 +76,12 @@
 	stw	%r27, oR27(%r26)
 	stw	%r28, oR28(%r26)
 	stw	%r29, oR29(%r26)
-	ldo	-64(%sp), %r1	/* Calculate %sp in %r1.  */
-	stw	%r1, oR30(%r26)	/* Save new %sp.  */
+	stw	%sp, oR30(%r26)
 	stw	%r31, oR31(%r26)
 
 	stw	%r0, oUC_FLAGS(%r26)
 	/* stw	%r0, oUC_LINK(%r26) - Do not overwrite.  */
-	stw	%r1, oSS_SP(%r26)
+	stw	%sp, oSS_SP(%r26)
 	stw	%r0, oSS_FLAGS(%r26)
 	stw	%r0, oSS_SIZE(%r26)
 
@@ -127,9 +130,9 @@
 	fstds	 %fr31, 0(%r1)
 
 	/* Prologue */
-	stwm	%r4, 64(%r30)
+	stwm	%r4, 64(%sp)
 #ifdef PIC
-	stw	%r19, -32(%r30)
+	stw	%r19, -32(%sp)
 #endif
 
 	/* Set up the trampoline registers.
@@ -152,12 +155,12 @@
 	ldi	SIG_BLOCK, %r26
 
 	/* Epilogue */
-	ldw	-84(%r30), %r2
+	ldw	-84(%sp), %r2
 #ifdef PIC
-	ldw	-96(%r30), %r19
+	ldw	-96(%sp), %r19
 #endif
 	bv	%r0(%r2)
-	ldwm	-64(%r30), %r4
+	ldwm	-64(%sp), %r4
 END(__getcontext)
 
 weak_alias (__getcontext, getcontext)

Modified: trunk/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c Thu Jun 24 08:01:34 2010
@@ -26,26 +26,57 @@
 #include <ucontext.h>
 
 /* POSIX only supports integer arguments.  */
+
+/* Stack must be 64-byte aligned at all times.  */
 #define STACK_ALIGN 64
-#define FRAME_SIZE 8
+/* Size of frame marker in unsigned long words.  */
+#define FRAME_SIZE_UL 8 
+/* Size of frame marker in bytes.  */
+#define FRAME_SIZE_BYTES (8 * sizeof(unsigned long)) 
+/* Size of X arguments in bytes.  */
+#define ARGS(x) (x * sizeof(unsigned long))
 
 void
 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
 {
-  unsigned long *sp;
+  unsigned long *sp, *osp;
   va_list ap;
   int i;
 
-  /* Get stack pointer (64-byte aligned).  */
-  sp = (unsigned long *)((((unsigned long) ucp->uc_stack.ss_sp) 
-			 + FRAME_SIZE + argc + STACK_ALIGN) 
-		        & ~(STACK_ALIGN - 1));
+  /* Create a 64-byte aligned frame to store args. Use ss_sp if 
+     it is available, otherwise be robust and use the currently
+     saved stack pointer.  */
+  if (ucp->uc_stack.ss_sp && ucp->uc_stack.ss_size)
+    osp = (unsigned long *)ucp->uc_stack.ss_sp;
+  else
+    osp = (unsigned long *)ucp->uc_mcontext.sc_gr[30];
+
+  sp = (unsigned long *)((((unsigned long) osp) 
+			   + FRAME_SIZE_BYTES + ARGS(argc) + STACK_ALIGN) 
+			 & ~(STACK_ALIGN - 1));
+
+  /* Use new frame.  */
+  ucp->uc_mcontext.sc_gr[30] = ((unsigned long) sp);
+
+  /* Finish frame setup.  */
+  if (ucp->uc_link)
+    {
+      /* Returning to the next context and next frame.  */
+      sp[-4/sizeof(unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[30];
+      sp[-20/sizeof(unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[2];
+    }
+  else
+    {
+      /* This is the main context. No frame marker, and no return address.  */
+      sp[-4/sizeof(unsigned long)] = 0x0;
+      sp[-20/sizeof(unsigned long)] = 0x0;
+    }
 
   /* Store address to jump to.  */
   ucp->uc_mcontext.sc_gr[2] = (unsigned long) func;
 
+  /* Process arguments.  */
   va_start (ap, argc);
-  /* Handle arguments.  */
   for (i = 0; i < argc; ++i)
     {
       if (i < 4)
@@ -62,13 +93,9 @@
 	} 
 
       /* All other arguments go on the stack.  */
-      sp[-1 * (FRAME_SIZE + 1 + i)] = va_arg (ap, int);
+      sp[-1 * (FRAME_SIZE_UL + 1 + i)] = va_arg (ap, int);
     }
   va_end (ap); 
+}
+weak_alias(__makecontext, makecontext)
 
-  /* Adjust the stack pointer to last used argument.  */
-  ucp->uc_mcontext.sc_gr[30] = (unsigned long) sp;
-}
-
-
-weak_alias(__makecontext, makecontext)

Modified: trunk/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S Thu Jun 24 08:01:34 2010
@@ -25,9 +25,9 @@
 
 ENTRY(__setcontext)
 	/* Prologue */
-	stwm	%r3, 64(%r30)
+	stwm	%r3, 64(%sp)
 #ifdef PIC
-	stw	%r19, -32(%r30)
+	stw	%r19, -32(%sp)
 #endif
 
 	/* Save ucp.  */
@@ -78,7 +78,7 @@
 	ldw	oR27(%r3), %r27
 	ldw	oR28(%r3), %r28
 	ldw	oR29(%r3), %r29
-	ldw	oR30(%r3), %r30
+	ldw	oR30(%r3), %sp
 	/* ldw	oR31(%r3), %r31 - dyncall scratch register */
 
 	/* Restore floating-point registers.  */
@@ -116,9 +116,13 @@
 	fldds,mb -8(%r22), %fr1
 	fldds,mb -8(%r22), %fr0
 
-	/* Calculate new stack pointer.  */
-	ldw	oSS_SP(%r3), %sp
-	ldo	64(%sp), %sp
+	/* Do not load oSS_SP into %sp. The value of oSS_SP indicates
+	   the start of the user allocated stack, but not the sp that
+	   should be used by the new context. In fact makecontext 
+	   will create a frame, and adjust sp as required. We do not
+	   support calling getcontext and modifying ss_sp without
+	   a call to makecontext to synchronize ss_sp into the machine
+	   context.  */
 
 	/* Call external function.  */
 	copy	%r2, %r22

Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h Thu Jun 24 08:01:34 2010
@@ -57,7 +57,7 @@
 {
   struct __pthread_mutex_s
   {
-    int __lock;
+    int __lock __attribute__ ((__aligned__ (4)));
     unsigned int __count;
     int __owner;
     /* KIND must stay at this position in the structure to maintain
@@ -87,7 +87,7 @@
 {
   struct
   {
-    int __lock;
+    int __lock __attribute__ ((__aligned__ (4)));
     unsigned int __futex;
     __extension__ unsigned long long int __total_seq;
     __extension__ unsigned long long int __wakeup_seq;
@@ -112,7 +112,7 @@
 
 
 /* Once-only execution */
-typedef int pthread_once_t;
+typedef int __attribute__ ((__aligned__ (4))) pthread_once_t;
 
 
 #if defined __USE_UNIX98 || defined __USE_XOPEN2K
@@ -122,7 +122,7 @@
 {
   struct
   {
-    int __lock;
+    int __lock __attribute__ ((__aligned__ (4)));
     unsigned int __nr_readers;
     unsigned int __readers_wakeup;
     unsigned int __writer_wakeup;
@@ -158,7 +158,7 @@
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_BARRIER_T];
-  long int __align;
+  long int __align __attribute__ ((__aligned__ (4)));
 } pthread_barrier_t;
 
 typedef union

Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h Thu Jun 24 08:01:34 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2010 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,4 +58,9 @@
 	char u_comm[32];
 };
 
+#define NBPG 4096
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR u.start_code
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
 #endif

Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h Thu Jun 24 08:01:34 2010
@@ -104,6 +104,8 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
 #ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with