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

[Commits] r22413 - in /fsf/trunk/libc: ./ bits/ manual/ misc/sys/ ports/ ports/sysdeps/mips/include/ ports/sysdeps/mips/include/sys/ p...



Author: eglibc
Date: Tue Feb 12 00:02:02 2013
New Revision: 22413

Log:
Import glibc-mainline for 2013-02-12

Added:
    fsf/trunk/libc/bits/stdlib-bsearch.h
    fsf/trunk/libc/ports/sysdeps/mips/include/
    fsf/trunk/libc/ports/sysdeps/mips/include/sys/
    fsf/trunk/libc/ports/sysdeps/mips/include/sys/asm.h
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/manual/arith.texi
    fsf/trunk/libc/manual/conf.texi
    fsf/trunk/libc/manual/errno.texi
    fsf/trunk/libc/manual/filesys.texi
    fsf/trunk/libc/manual/getopt.texi
    fsf/trunk/libc/manual/llio.texi
    fsf/trunk/libc/manual/math.texi
    fsf/trunk/libc/manual/resource.texi
    fsf/trunk/libc/manual/search.texi
    fsf/trunk/libc/manual/signal.texi
    fsf/trunk/libc/manual/socket.texi
    fsf/trunk/libc/manual/startup.texi
    fsf/trunk/libc/manual/stdio.texi
    fsf/trunk/libc/manual/string.texi
    fsf/trunk/libc/manual/sysinfo.texi
    fsf/trunk/libc/manual/syslog.texi
    fsf/trunk/libc/manual/terminal.texi
    fsf/trunk/libc/manual/time.texi
    fsf/trunk/libc/manual/users.texi
    fsf/trunk/libc/misc/sys/mman.h
    fsf/trunk/libc/ports/ChangeLog.mips
    fsf/trunk/libc/ports/sysdeps/mips/mips64/bsd-_setjmp.S
    fsf/trunk/libc/ports/sysdeps/mips/mips64/bsd-setjmp.S
    fsf/trunk/libc/ports/sysdeps/mips/mips64/setjmp.S
    fsf/trunk/libc/ports/sysdeps/mips/sys/asm.h
    fsf/trunk/libc/ports/sysdeps/unix/mips/mips32/sysdep.h
    fsf/trunk/libc/ports/sysdeps/unix/mips/mips64/n32/sysdep.h
    fsf/trunk/libc/ports/sysdeps/unix/mips/mips64/n64/sysdep.h
    fsf/trunk/libc/ports/sysdeps/unix/mips/sysdep.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/clone.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/getcontext.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/makecontext.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/setcontext.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/vfork.S
    fsf/trunk/libc/stdlib/bsearch.c
    fsf/trunk/libc/stdlib/stdlib.h
    fsf/trunk/libc/string/Makefile
    fsf/trunk/libc/string/str-two-way.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Feb 12 00:02:02 2013
@@ -1,3 +1,104 @@
+2013-02-11  Tom de Vries  <tom@xxxxxxxxxxxxxxxx>
+
+	* string/str-two-way.h:  Fix typo RESULT_TYPE -> RETURN_TYPE in
+	comment.
+	Add RET0_IF_0 and CHECK_EOL to macro list in comment.
+	(AVAILABLE1, AVAILABLE2, AVAILABLE1_USES_J): Remove superfluous undef.
+	(CHECK_EOL): Add undef.
+
+2013-02-11   OndÃÂej BÃÂlka  <neleai@xxxxxxxxx>
+
+	* bits/stdlib-bsearch.h: New file.
+	* stdlib/bsearch.c: Include bits/stdlib-bsearch.h.
+	* stdlib/stdlib.h: Likewise.
+
+2013-02-11  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* manual/conf.texi (General Limits): Fix SSIZE_MAX type to ssize_t.
+	* manual/errno.texi (Error Messages): Fix typo in error_print_progname
+	declaration.
+	* manual/search.texi (Array Search Function): Add missing const in
+	lfind prototype.
+	* manual/resource.texi (Limits on Resources): Fix RLIM_INFINITY
+	declaration to use rlim_t.
+	(Basic Scheduling Functions): Remove erroneous const from
+	sched_getparam prototype.  Remove erroneous * from
+	sched_get_priority_max and sched_get_priority_min prototypes.
+	(Resource Usage): Fix summary @comment on vtimes to refer to
+	sys/vtimes.h rather than vtimes.h.
+	Add missing *s in vtimes prototype.
+	(Limits on Resources): Fix ulimit prototype to return long int.
+	* manual/math.texi (SVID Random): Fix lrand48_r and mrand48_r
+	prototypes to use long int rather than double.
+	(BSD Random): Fix initstate and setstate to use char *, not void *.
+	* manual/llio.texi (Asynchronous Reads/Writes): Fix lio_listio64
+	prototype to make second argument 'struct aiocb64 *const[]'.
+	Fix aio_read64 and aio_write64 prototypes to use struct aiocb64.
+	(Status of AIO Operations): Remove erroneous const in aio_return and
+	aio_return64 prototypes.
+	(Synchronizing I/O): Fix sync prototype to return void.
+	* manual/startup.texi (Suboptions): Remove an erroneous const in
+	getsubopt prototype.
+	* manual/getopt.texi (Using Getopt): Add a const in getopt prototype.
+	* manual/users.texi (Lookup Netgroup): Fix getnetgrent_r prototype to
+	use size_t rather than int.
+	(Scanning All Users): Likewise for getpwent_r.
+	(Setting Groups): Add missing const to setgroups prototype.
+	* manual/sysinfo.texi (mtab): Fix typo in getmntent_r prototype.
+	* manual/socket.texi (Host Names): Fix gethostbyaddr and
+	gethostbyaddr_r prototypes to use socklen_t rather than size_t and
+	'const void *' rather than 'const char *'.
+	(Host Address Functions): Likewise for inet_ntop.
+	(Networks Database): Fix getnetbyaddr prototype to use uint32_t.
+	(Receiving Data): Fix recv, recvfrom, recvmsg prototypes to use
+	ssize_t for return value.
+	(Sending Data): Likewise for send, sendto, sendmsg.
+	(Socket Option Functions): Add a missing const in setsockopt prototype.
+	* manual/stdio.texi (Simple Output): Fix fputwc_unlocked prototype to
+	use wchar_t for the argument.
+	(Formatted Input Functions): Fix swscanf prototype to use wchar_t *.
+	* manual/arith.texi (Control Functions): Fix fegetexcept prototype to
+	take no arguments.
+	(Normalization Functions): Fix scalb, scalbf, scalbl prototypes to use
+	double/float/long double for second argument.
+	Fix return types of significand, significandf, significandl.
+	* manual/filesys.texi (Setting Permissions): Use mode_t for second
+	argument in fchmod prototype.
+	(File Owner): Use uid_t and gid_t in fchown prototype.
+	(File Times): Add const to utimes, futimes, and lutimes prototypes.
+	(Making Special Files): Use mode_t and dev_t in mknod prototype.
+	(Scanning Directory Content): Fix scandir and scandir64 prototypes to
+	use 'const struct dirent **' as argument types to CMP function pointer
+	argument.
+	(Symbolic Links): Fix readlink prototype with ssize_t as return value.
+	(File Times): Fix summary magic @comment for struct utimbuf and utime
+	to refer to utime.h, not time.h.
+	* manual/string.texi (Argz Functions): Add missing const in
+	argz_extract and argz_next prototypes.
+	(Finding Tokens in a String): Likewise for basename.
+	(String/Array Comparison): Fix typo in wcscasecmp prototype.
+	(Copying and Concatenation): Fix typo in wmemmove prototype.
+	* manual/signal.texi (Using Pause): Use (void) in pause prototype.
+	(Signal Stack): Remove erroneous const in sigstack prototype.
+	* manual/time.texi (Setting an Alarm): Add missing const in setitimer
+	prototype.
+	(Simple Calendar Time): Likewise for stime.
+	* manual/terminal.texi (BSD Terminal Modes): Add missing const in stty
+	prototype.
+	* manual/sysinfo.texi (System Parameters): Fix mentions of sysctl.h to
+	say sys/sysctl.h instead.
+	* manual/syslog.texi (syslog; vsyslog): Add missing const in syslog
+	and vsyslog prototypes.
+
+2013-02-11  Tom de Vries  <tom@xxxxxxxxxxxxxxxx>
+
+	* string/Makefile (CFLAGS-bug-strstr1.c, CFLAGS-bug-strcasestr1.c):
+	Remove.
+
+2013-02-11  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* misc/sys/mman.h: Fix typo in mremap comment.
+
 2013-02-08  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* manual/examples/mkfsock.c (make_named_socket): Don't add one for
@@ -5116,7 +5217,7 @@
 	(do_one_test): Call check_result.
 	(test_main): Call check1.
 	* string/bug-strstr1.c (main): Moved to ...
-	* string/test-strchr.c (check1): Here.  New function.
+	* string/test-strstr.c (check1): Here.  New function.
 	(do_one_test): Break out result checking code into ...
 	(check_result): This.  New function.
 	(do_one_test): Call check_result.

Added: fsf/trunk/libc/bits/stdlib-bsearch.h
==============================================================================
--- fsf/trunk/libc/bits/stdlib-bsearch.h (added)
+++ fsf/trunk/libc/bits/stdlib-bsearch.h Tue Feb 12 00:02:02 2013
@@ -1,0 +1,43 @@
+/* Perform binary search - inline version.
+   Copyright (C) 1991-2013 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+__extern_inline void *
+bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+	 __compar_fn_t __compar)
+{
+  size_t __l, __u, __idx;
+  const void *__p;
+  int __comparison;
+
+  __l = 0;
+  __u = __nmemb;
+  while (__l < __u)
+    {
+      __idx = (__l + __u) / 2;
+      __p = (void *) (((const char *) __base) + (__idx * __size));
+      __comparison = (*__compar) (__key, __p);
+      if (__comparison < 0)
+	__u = __idx;
+      else if (__comparison > 0)
+	__l = __idx + 1;
+      else
+	return (void *) __p;
+    }
+
+  return NULL;
+}

Modified: fsf/trunk/libc/manual/arith.texi
==============================================================================
--- fsf/trunk/libc/manual/arith.texi (original)
+++ fsf/trunk/libc/manual/arith.texi Tue Feb 12 00:02:02 2013
@@ -1086,7 +1086,7 @@
 
 @comment fenv.h
 @comment GNU
-@deftypefun int fegetexcept (int @var{excepts})
+@deftypefun int fegetexcept (void)
 The function returns a bitmask of all currently enabled exceptions.  It
 returns @code{-1} in case of failure.
 @end deftypefun
@@ -1248,13 +1248,13 @@
 
 @comment math.h
 @comment BSD
-@deftypefun double scalb (double @var{value}, int @var{exponent})
-@comment math.h
-@comment BSD
-@deftypefunx float scalbf (float @var{value}, int @var{exponent})
-@comment math.h
-@comment BSD
-@deftypefunx {long double} scalbl (long double @var{value}, int @var{exponent})
+@deftypefun double scalb (double @var{value}, double @var{exponent})
+@comment math.h
+@comment BSD
+@deftypefunx float scalbf (float @var{value}, float @var{exponent})
+@comment math.h
+@comment BSD
+@deftypefunx {long double} scalbl (long double @var{value}, long double @var{exponent})
 The @code{scalb} function is the BSD name for @code{ldexp}.
 @end deftypefun
 
@@ -1286,13 +1286,13 @@
 
 @comment math.h
 @comment BSD
-@deftypefun {long long int} significand (double @var{x})
-@comment math.h
-@comment BSD
-@deftypefunx {long long int} significandf (float @var{x})
-@comment math.h
-@comment BSD
-@deftypefunx {long long int} significandl (long double @var{x})
+@deftypefun double significand (double @var{x})
+@comment math.h
+@comment BSD
+@deftypefunx float significandf (float @var{x})
+@comment math.h
+@comment BSD
+@deftypefunx {long double} significandl (long double @var{x})
 @code{significand} returns the mantissa of @var{x} scaled to the range
 @math{[1, 2)}.
 It is equivalent to @w{@code{scalb (@var{x}, (double) -ilogb (@var{x}))}}.

Modified: fsf/trunk/libc/manual/conf.texi
==============================================================================
--- fsf/trunk/libc/manual/conf.texi (original)
+++ fsf/trunk/libc/manual/conf.texi Tue Feb 12 00:02:02 2013
@@ -114,7 +114,7 @@
 
 @comment limits.h
 @comment POSIX.1
-@deftypevr Macro int SSIZE_MAX
+@deftypevr Macro ssize_t SSIZE_MAX
 The largest value that can fit in an object of type @code{ssize_t}.
 Effectively, this is the limit on the number of bytes that can be read
 or written in a single operation.
@@ -1121,7 +1121,7 @@
 have on @emph{any} POSIX system.  @xref{File Minimums}.
 
 @cindex limits, link count of files
-@comment limits.h
+@comment limits.h (optional)
 @comment POSIX.1
 @deftypevr Macro int LINK_MAX
 The uniform system limit (if any) for the number of names for a given

Modified: fsf/trunk/libc/manual/errno.texi
==============================================================================
--- fsf/trunk/libc/manual/errno.texi (original)
+++ fsf/trunk/libc/manual/errno.texi Tue Feb 12 00:02:02 2013
@@ -1507,7 +1507,7 @@
 
 @comment error.h
 @comment GNU
-@deftypevar {void (*) error_print_progname } (void)
+@deftypevar {void (*error_print_progname)} (void)
 If the @code{error_print_progname} variable is defined to a non-zero
 value the function pointed to is called by @code{error} or
 @code{error_at_line}.  It is expected to print the program name or do

Modified: fsf/trunk/libc/manual/filesys.texi
==============================================================================
--- fsf/trunk/libc/manual/filesys.texi (original)
+++ fsf/trunk/libc/manual/filesys.texi Tue Feb 12 00:02:02 2013
@@ -615,7 +615,7 @@
 
 @comment dirent.h
 @comment BSD/SVID
-@deftypefun int scandir (const char *@var{dir}, struct dirent ***@var{namelist}, int (*@var{selector}) (const struct dirent *), int (*@var{cmp}) (const void *, const void *))
+@deftypefun int scandir (const char *@var{dir}, struct dirent ***@var{namelist}, int (*@var{selector}) (const struct dirent *), int (*@var{cmp}) (const struct dirent **, const struct dirent **))
 
 The @code{scandir} function scans the contents of the directory selected
 by @var{dir}.  The result in *@var{namelist} is an array of pointers to
@@ -669,7 +669,7 @@
 
 @comment dirent.h
 @comment GNU
-@deftypefun int scandir64 (const char *@var{dir}, struct dirent64 ***@var{namelist}, int (*@var{selector}) (const struct dirent64 *), int (*@var{cmp}) (const void *, const void *))
+@deftypefun int scandir64 (const char *@var{dir}, struct dirent64 ***@var{namelist}, int (*@var{selector}) (const struct dirent64 *), int (*@var{cmp}) (const struct dirent64 **, const struct dirent64 **))
 The @code{scandir64} function works like the @code{scandir} function
 except that the directory entries it returns are described by elements
 of type @w{@code{struct dirent64}}.  The function pointed to by
@@ -1189,7 +1189,7 @@
 
 @comment unistd.h
 @comment BSD
-@deftypefun int readlink (const char *@var{filename}, char *@var{buffer}, size_t @var{size})
+@deftypefun ssize_t readlink (const char *@var{filename}, char *@var{buffer}, size_t @var{size})
 The @code{readlink} function gets the value of the symbolic link
 @var{filename}.  The file name that the link points to is copied into
 @var{buffer}.  This file name string is @emph{not} null-terminated;
@@ -2189,7 +2189,7 @@
 
 @comment unistd.h
 @comment BSD
-@deftypefun int fchown (int @var{filedes}, int @var{owner}, int @var{group})
+@deftypefun int fchown (int @var{filedes}, uid_t @var{owner}, gid_t @var{group})
 This is like @code{chown}, except that it changes the owner of the open
 file with descriptor @var{filedes}.
 
@@ -2541,7 +2541,7 @@
 
 @comment sys/stat.h
 @comment BSD
-@deftypefun int fchmod (int @var{filedes}, int @var{mode})
+@deftypefun int fchmod (int @var{filedes}, mode_t @var{mode})
 This is like @code{chmod}, except that it changes the permissions of the
 currently open file given by @var{filedes}.
 
@@ -2713,7 +2713,7 @@
 need to include the header file @file{utime.h} to use this facility.
 @pindex utime.h
 
-@comment time.h
+@comment utime.h
 @comment POSIX.1
 @deftp {Data Type} {struct utimbuf}
 The @code{utimbuf} structure is used with the @code{utime} function to
@@ -2729,7 +2729,7 @@
 @end table
 @end deftp
 
-@comment time.h
+@comment utime.h
 @comment POSIX.1
 @deftypefun int utime (const char *@var{filename}, const struct utimbuf *@var{times})
 This function is used to modify the file times associated with the file
@@ -2782,7 +2782,7 @@
 
 @comment sys/time.h
 @comment BSD
-@deftypefun int utimes (const char *@var{filename}, struct timeval @var{tvp}@t{[2]})
+@deftypefun int utimes (const char *@var{filename}, const struct timeval @var{tvp}@t{[2]})
 This function sets the file access and modification times of the file
 @var{filename}.  The new file access time is specified by
 @code{@var{tvp}[0]}, and the new modification time by
@@ -2796,7 +2796,7 @@
 
 @comment sys/time.h
 @comment BSD
-@deftypefun int lutimes (const char *@var{filename}, struct timeval @var{tvp}@t{[2]})
+@deftypefun int lutimes (const char *@var{filename}, const struct timeval @var{tvp}@t{[2]})
 This function is like @code{utimes}, except that it does not follow
 symbolic links.  If @var{filename} is the name of a symbolic link,
 @code{lutimes} sets the file access and modification times of the
@@ -2812,7 +2812,7 @@
 
 @comment sys/time.h
 @comment BSD
-@deftypefun int futimes (int @var{fd}, struct timeval @var{tvp}@t{[2]})
+@deftypefun int futimes (int @var{fd}, const struct timeval @var{tvp}@t{[2]})
 This function is like @code{utimes}, except that it takes an open file
 descriptor as an argument instead of a file name.  @xref{Low-Level
 I/O}.  This function comes from FreeBSD, and is not available on all
@@ -3049,7 +3049,7 @@
 
 @comment sys/stat.h
 @comment BSD
-@deftypefun int mknod (const char *@var{filename}, int @var{mode}, int @var{dev})
+@deftypefun int mknod (const char *@var{filename}, mode_t @var{mode}, dev_t @var{dev})
 The @code{mknod} function makes a special file with name @var{filename}.
 The @var{mode} specifies the mode of the file, and may include the various
 special file bits, such as @code{S_IFCHR} (for a character special file)

Modified: fsf/trunk/libc/manual/getopt.texi
==============================================================================
--- fsf/trunk/libc/manual/getopt.texi (original)
+++ fsf/trunk/libc/manual/getopt.texi Tue Feb 12 00:02:02 2013
@@ -59,7 +59,7 @@
 
 @comment unistd.h
 @comment POSIX.2
-@deftypefun int getopt (int @var{argc}, char **@var{argv}, const char *@var{options})
+@deftypefun int getopt (int @var{argc}, char *const *@var{argv}, const char *@var{options})
 The @code{getopt} function gets the next option argument from the
 argument list specified by the @var{argv} and @var{argc} arguments.
 Normally these values come directly from the arguments received by

Modified: fsf/trunk/libc/manual/llio.texi
==============================================================================
--- fsf/trunk/libc/manual/llio.texi (original)
+++ fsf/trunk/libc/manual/llio.texi Tue Feb 12 00:02:02 2013
@@ -1669,15 +1669,13 @@
 
 @comment unistd.h
 @comment X/Open
-@deftypefun int sync (void)
+@deftypefun void sync (void)
 A call to this function will not return as long as there is data which
 has not been written to the device.  All dirty buffers in the kernel will
 be written and so an overall consistent system can be achieved (if no
 other process in parallel writes data).
 
 A prototype for @code{sync} can be found in @file{unistd.h}.
-
-The return value is zero to indicate no error.
 @end deftypefun
 
 Programs more often want to ensure that data written to a given file is
@@ -1989,7 +1987,7 @@
 
 @comment aio.h
 @comment Unix98
-@deftypefun int aio_read64 (struct aiocb *@var{aiocbp})
+@deftypefun int aio_read64 (struct aiocb64 *@var{aiocbp})
 This function is similar to the @code{aio_read} function.  The only
 difference is that on @w{32 bit} machines, the file descriptor should
 be opened in the large file mode.  Internally, @code{aio_read64} uses
@@ -2073,7 +2071,7 @@
 
 @comment aio.h
 @comment Unix98
-@deftypefun int aio_write64 (struct aiocb *@var{aiocbp})
+@deftypefun int aio_write64 (struct aiocb64 *@var{aiocbp})
 This function is similar to the @code{aio_write} function.  The only
 difference is that on @w{32 bit} machines the file descriptor should
 be opened in the large file mode.  Internally @code{aio_write64} uses
@@ -2177,7 +2175,7 @@
 
 @comment aio.h
 @comment Unix98
-@deftypefun int lio_listio64 (int @var{mode}, struct aiocb *const @var{list}, int @var{nent}, struct sigevent *@var{sig})
+@deftypefun int lio_listio64 (int @var{mode}, struct aiocb64 *const @var{list}[], int @var{nent}, struct sigevent *@var{sig})
 This function is similar to the @code{lio_listio} function.  The only
 difference is that on @w{32 bit} machines, the file descriptor should
 be opened in the large file mode.  Internally, @code{lio_listio64} uses
@@ -2239,7 +2237,7 @@
 
 @comment aio.h
 @comment POSIX.1b
-@deftypefun ssize_t aio_return (const struct aiocb *@var{aiocbp})
+@deftypefun ssize_t aio_return (struct aiocb *@var{aiocbp})
 This function can be used to retrieve the return status of the operation
 carried out by the request described in the variable pointed to by
 @var{aiocbp}.  As long as the error status of this request as returned
@@ -2262,7 +2260,7 @@
 
 @comment aio.h
 @comment Unix98
-@deftypefun int aio_return64 (const struct aiocb64 *@var{aiocbp})
+@deftypefun ssize_t aio_return64 (struct aiocb64 *@var{aiocbp})
 This function is similar to @code{aio_return} with the only difference
 that the argument is a reference to a variable of type @code{struct
 aiocb64}.
@@ -2929,19 +2927,19 @@
 But most programs will want to be portable to other POSIX.1 systems and
 should use the POSIX.1 names above instead.
 
-@comment fcntl.h
+@comment fcntl.h (optional)
 @comment GNU
 @deftypevr Macro int O_READ
 Open the file for reading.  Same as @code{O_RDONLY}; only defined on GNU.
 @end deftypevr
 
-@comment fcntl.h
+@comment fcntl.h (optional)
 @comment GNU
 @deftypevr Macro int O_WRITE
 Open the file for writing.  Same as @code{O_WRONLY}; only defined on GNU.
 @end deftypevr
 
-@comment fcntl.h
+@comment fcntl.h (optional)
 @comment GNU
 @deftypevr Macro int O_EXEC
 Open the file for executing.  Only defined on GNU.
@@ -3045,7 +3043,7 @@
 The following three file name translation flags exist only on
 @gnuhurdsystems{}.
 
-@comment fcntl.h
+@comment fcntl.h (optional)
 @comment GNU
 @deftypevr Macro int O_IGNORE_CTTY
 Do not recognize the named file as the controlling terminal, even if it
@@ -3054,7 +3052,7 @@
 @xref{Job Control}.
 @end deftypevr
 
-@comment fcntl.h
+@comment fcntl.h (optional)
 @comment GNU
 @deftypevr Macro int O_NOLINK
 If the named file is a symbolic link, open the link itself instead of
@@ -3063,7 +3061,7 @@
 @cindex symbolic link, opening
 @end deftypevr
 
-@comment fcntl.h
+@comment fcntl.h (optional)
 @comment GNU
 @deftypevr Macro int O_NOTRANS
 If the named file is specially translated, do not invoke the translator.
@@ -3095,7 +3093,7 @@
 The remaining operating modes are BSD extensions.  They exist only
 on some systems.  On other systems, these macros are not defined.
 
-@comment fcntl.h
+@comment fcntl.h (optional)
 @comment BSD
 @deftypevr Macro int O_SHLOCK
 Acquire a shared lock on the file, as with @code{flock}.
@@ -3106,7 +3104,7 @@
 the lock on the new file first.
 @end deftypevr
 
-@comment fcntl.h
+@comment fcntl.h (optional)
 @comment BSD
 @deftypevr Macro int O_EXLOCK
 Acquire an exclusive lock on the file, as with @code{flock}.

Modified: fsf/trunk/libc/manual/math.texi
==============================================================================
--- fsf/trunk/libc/manual/math.texi (original)
+++ fsf/trunk/libc/manual/math.texi Tue Feb 12 00:02:02 2013
@@ -1387,7 +1387,7 @@
 
 @comment stdlib.h
 @comment BSD
-@deftypefun {void *} initstate (unsigned int @var{seed}, void *@var{state}, size_t @var{size})
+@deftypefun {char *} initstate (unsigned int @var{seed}, char *@var{state}, size_t @var{size})
 The @code{initstate} function is used to initialize the random number
 generator state.  The argument @var{state} is an array of @var{size}
 bytes, used to hold the state information.  It is initialized based on
@@ -1401,7 +1401,7 @@
 
 @comment stdlib.h
 @comment BSD
-@deftypefun {void *} setstate (void *@var{state})
+@deftypefun {char *} setstate (char *@var{state})
 The @code{setstate} function restores the random number state
 information @var{state}.  The argument must have been the result of
 a previous call to @var{initstate} or @var{setstate}.
@@ -1692,7 +1692,7 @@
 
 @comment stdlib.h
 @comment GNU
-@deftypefun int lrand48_r (struct drand48_data *@var{buffer}, double *@var{result})
+@deftypefun int lrand48_r (struct drand48_data *@var{buffer}, long int *@var{result})
 This function is similar to @code{lrand48}, but in addition it takes a
 pointer to a buffer describing the state of the random number generator
 just like @code{drand48}.
@@ -1722,7 +1722,7 @@
 
 @comment stdlib.h
 @comment GNU
-@deftypefun int mrand48_r (struct drand48_data *@var{buffer}, double *@var{result})
+@deftypefun int mrand48_r (struct drand48_data *@var{buffer}, long int *@var{result})
 This function is similar to @code{mrand48} but like the other reentrant
 functions it uses the random number generator described by the value in
 the buffer pointed to by @var{buffer}.

Modified: fsf/trunk/libc/manual/resource.texi
==============================================================================
--- fsf/trunk/libc/manual/resource.texi (original)
+++ fsf/trunk/libc/manual/resource.texi Tue Feb 12 00:02:02 2013
@@ -129,9 +129,9 @@
 @code{vtimes} and its @code{vtimes} data structure are declared in
 @file{sys/vtimes.h}.
 @pindex sys/vtimes.h
-@comment vtimes.h
-
-@deftypefun int vtimes (struct vtimes @var{current}, struct vtimes @var{child})
+
+@comment sys/vtimes.h
+@deftypefun int vtimes (struct vtimes *@var{current}, struct vtimes *@var{child})
 
 @code{vtimes} reports resource usage totals for a process.
 
@@ -419,7 +419,7 @@
 
 @comment sys/resource.h
 @comment BSD
-@deftypevr Constant int RLIM_INFINITY
+@deftypevr Constant rlim_t RLIM_INFINITY
 This constant stands for a value of ``infinity'' when supplied as
 the limit value in @code{setrlimit}.
 @end deftypevr
@@ -433,7 +433,7 @@
 
 @comment ulimit.h
 @comment BSD
-@deftypefun int ulimit (int @var{cmd}, @dots{})
+@deftypefun {long int} ulimit (int @var{cmd}, @dots{})
 
 @code{ulimit} gets the current limit or sets the current and maximum
 limit for a particular resource for the calling process according to the
@@ -893,7 +893,7 @@
 
 @comment sched.h
 @comment POSIX
-@deftypefun int sched_getparam (pid_t @var{pid}, const struct sched_param *@var{param})
+@deftypefun int sched_getparam (pid_t @var{pid}, struct sched_param *@var{param})
 
 This function returns a process' absolute priority.
 
@@ -922,7 +922,7 @@
 
 @comment sched.h
 @comment POSIX
-@deftypefun int sched_get_priority_min (int *@var{policy})
+@deftypefun int sched_get_priority_min (int @var{policy})
 
 This function returns the lowest absolute priority value that is
 allowable for a process with scheduling policy @var{policy}.
@@ -942,7 +942,7 @@
 
 @comment sched.h
 @comment POSIX
-@deftypefun int sched_get_priority_max (int *@var{policy})
+@deftypefun int sched_get_priority_max (int @var{policy})
 
 This function returns the highest absolute priority value that is
 allowable for a process that with scheduling policy @var{policy}.

Modified: fsf/trunk/libc/manual/search.texi
==============================================================================
--- fsf/trunk/libc/manual/search.texi (original)
+++ fsf/trunk/libc/manual/search.texi Tue Feb 12 00:02:02 2013
@@ -71,7 +71,7 @@
 
 @comment search.h
 @comment SVID
-@deftypefun {void *} lfind (const void *@var{key}, void *@var{base}, size_t *@var{nmemb}, size_t @var{size}, comparison_fn_t @var{compar})
+@deftypefun {void *} lfind (const void *@var{key}, const void *@var{base}, size_t *@var{nmemb}, size_t @var{size}, comparison_fn_t @var{compar})
 The @code{lfind} function searches in the array with @code{*@var{nmemb}}
 elements of @var{size} bytes pointed to by @var{base} for an element
 which matches the one pointed to by @var{key}.  The function pointed to

Modified: fsf/trunk/libc/manual/signal.texi
==============================================================================
--- fsf/trunk/libc/manual/signal.texi (original)
+++ fsf/trunk/libc/manual/signal.texi Tue Feb 12 00:02:02 2013
@@ -2921,7 +2921,7 @@
 
 @comment unistd.h
 @comment POSIX.1
-@deftypefun int pause ()
+@deftypefun int pause (void)
 The @code{pause} function suspends program execution until a signal
 arrives whose action is either to execute a handler function, or to
 terminate the process.
@@ -3195,7 +3195,7 @@
 
 @comment signal.h
 @comment BSD
-@deftypefun int sigstack (const struct sigstack *@var{stack}, struct sigstack *@var{oldstack})
+@deftypefun int sigstack (struct sigstack *@var{stack}, struct sigstack *@var{oldstack})
 The @code{sigstack} function specifies an alternate stack for use during
 signal handling.  When a signal is received by the process and its
 action indicates that the signal stack is used, the system arranges a

Modified: fsf/trunk/libc/manual/socket.texi
==============================================================================
--- fsf/trunk/libc/manual/socket.texi (original)
+++ fsf/trunk/libc/manual/socket.texi Tue Feb 12 00:02:02 2013
@@ -1127,7 +1127,7 @@
 
 @comment arpa/inet.h
 @comment IPv6 basic API
-@deftypefun {const char *} inet_ntop (int @var{af}, const void *@var{cp}, char *@var{buf}, size_t @var{len})
+@deftypefun {const char *} inet_ntop (int @var{af}, const void *@var{cp}, char *@var{buf}, socklen_t @var{len})
 This function converts an Internet address (either IPv4 or IPv6) from
 network (binary) to presentation (textual) form.  @var{af} should be
 either @code{AF_INET} or @code{AF_INET6}, as appropriate.  @var{cp} is a
@@ -1225,7 +1225,7 @@
 
 @comment netdb.h
 @comment BSD
-@deftypefun {struct hostent *} gethostbyaddr (const char *@var{addr}, size_t @var{length}, int @var{format})
+@deftypefun {struct hostent *} gethostbyaddr (const void *@var{addr}, socklen_t @var{length}, int @var{format})
 The @code{gethostbyaddr} function returns information about the host
 with Internet address @var{addr}.  The parameter @var{addr} is not
 really a pointer to char - it can be a pointer to an IPv4 or an IPv6
@@ -1339,7 +1339,7 @@
 
 @comment netdb.h
 @comment GNU
-@deftypefun int gethostbyaddr_r (const char *@var{addr}, size_t @var{length}, int @var{format}, struct hostent *restrict @var{result_buf}, char *restrict @var{buf}, size_t @var{buflen}, struct hostent **restrict @var{result}, int *restrict @var{h_errnop})
+@deftypefun int gethostbyaddr_r (const void *@var{addr}, socklen_t @var{length}, int @var{format}, struct hostent *restrict @var{result_buf}, char *restrict @var{buf}, size_t @var{buflen}, struct hostent **restrict @var{result}, int *restrict @var{h_errnop})
 The @code{gethostbyaddr_r} function returns information about the host
 with Internet address @var{addr}.  The parameter @var{addr} is not
 really a pointer to char - it can be a pointer to an IPv4 or an IPv6
@@ -2248,7 +2248,7 @@
 
 @comment sys/socket.h
 @comment BSD
-@deftypefun int send (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags})
+@deftypefun ssize_t send (int @var{socket}, const void *@var{buffer}, size_t @var{size}, int @var{flags})
 The @code{send} function is like @code{write}, but with the additional
 flags @var{flags}.  The possible values of @var{flags} are described
 in @ref{Socket Data Options}.
@@ -2315,7 +2315,7 @@
 
 @comment sys/socket.h
 @comment BSD
-@deftypefun int recv (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags})
+@deftypefun ssize_t recv (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags})
 The @code{recv} function is like @code{read}, but with the additional
 flags @var{flags}.  The possible values of @var{flags} are described
 in @ref{Socket Data Options}.
@@ -2643,7 +2643,7 @@
 
 @comment sys/socket.h
 @comment BSD
-@deftypefun int sendto (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t @var{length})
+@deftypefun ssize_t sendto (int @var{socket}, const void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t @var{length})
 The @code{sendto} function transmits the data in the @var{buffer}
 through the socket @var{socket} to the destination address specified
 by the @var{addr} and @var{length} arguments.  The @var{size} argument
@@ -2678,7 +2678,7 @@
 
 @comment sys/socket.h
 @comment BSD
-@deftypefun int recvfrom (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t *@var{length-ptr})
+@deftypefun ssize_t recvfrom (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t *@var{length-ptr})
 The @code{recvfrom} function reads one packet from the socket
 @var{socket} into the buffer @var{buffer}.  The @var{size} argument
 specifies the maximum number of bytes to be read.
@@ -2725,7 +2725,7 @@
 
 @comment sys/socket.h
 @comment BSD
-@deftypefun int sendmsg (int @var{socket}, const struct msghdr *@var{message}, int @var{flags})
+@deftypefun ssize_t sendmsg (int @var{socket}, const struct msghdr *@var{message}, int @var{flags})
 
 This function is defined as a cancellation point in multi-threaded
 programs, so one has to be prepared for this and make sure that
@@ -2736,7 +2736,7 @@
 
 @comment sys/socket.h
 @comment BSD
-@deftypefun int recvmsg (int @var{socket}, struct msghdr *@var{message}, int @var{flags})
+@deftypefun ssize_t recvmsg (int @var{socket}, struct msghdr *@var{message}, int @var{flags})
 
 This function is defined as a cancellation point in multi-threaded
 programs, so one has to be prepared for this and make sure that
@@ -2953,7 +2953,7 @@
 
 @comment sys/socket.h
 @comment BSD
-@deftypefun int setsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, socklen_t @var{optlen})
+@deftypefun int setsockopt (int @var{socket}, int @var{level}, int @var{optname}, const void *@var{optval}, socklen_t @var{optlen})
 This function is used to set the socket option @var{optname} at level
 @var{level} for socket @var{socket}.  The value of the option is passed
 in the buffer @var{optval} of size @var{optlen}.
@@ -3157,7 +3157,7 @@
 
 @comment netdb.h
 @comment BSD
-@deftypefun {struct netent *} getnetbyaddr (unsigned long int @var{net}, int @var{type})
+@deftypefun {struct netent *} getnetbyaddr (uint32_t @var{net}, int @var{type})
 The @code{getnetbyaddr} function returns information about the network
 of type @var{type} with number @var{net}.  You should specify a value of
 @code{AF_INET} for the @var{type} argument for Internet networks.

Modified: fsf/trunk/libc/manual/startup.texi
==============================================================================
--- fsf/trunk/libc/manual/startup.texi (original)
+++ fsf/trunk/libc/manual/startup.texi Tue Feb 12 00:02:02 2013
@@ -220,7 +220,7 @@
 available.
 
 @comment stdlib.h
-@deftypefun int getsubopt (char **@var{optionp}, const char* const *@var{tokens}, char **@var{valuep})
+@deftypefun int getsubopt (char **@var{optionp}, char *const *@var{tokens}, char **@var{valuep})
 
 The @var{optionp} parameter must be a pointer to a variable containing
 the address of the string to process.  When the function returns the

Modified: fsf/trunk/libc/manual/stdio.texi
==============================================================================
--- fsf/trunk/libc/manual/stdio.texi (original)
+++ fsf/trunk/libc/manual/stdio.texi Tue Feb 12 00:02:02 2013
@@ -834,7 +834,7 @@
 
 @comment wchar.h
 @comment POSIX
-@deftypefun wint_t fputwc_unlocked (wint_t @var{wc}, FILE *@var{stream})
+@deftypefun wint_t fputwc_unlocked (wchar_t @var{wc}, FILE *@var{stream})
 The @code{fputwc_unlocked} function is equivalent to the @code{fputwc}
 function except that it does not implicitly lock the stream.
 
@@ -3853,7 +3853,7 @@
 
 @comment wchar.h
 @comment ISO
-@deftypefun int swscanf (const wchar_t *@var{ws}, const char *@var{template}, @dots{})
+@deftypefun int swscanf (const wchar_t *@var{ws}, const wchar_t *@var{template}, @dots{})
 This is like @code{wscanf}, except that the characters are taken from the
 null-terminated string @var{ws} instead of from a stream.  Reaching the
 end of the string is treated as an end-of-file condition.

Modified: fsf/trunk/libc/manual/string.texi
==============================================================================
--- fsf/trunk/libc/manual/string.texi (original)
+++ fsf/trunk/libc/manual/string.texi Tue Feb 12 00:02:02 2013
@@ -479,7 +479,7 @@
 
 @comment wchar.h
 @comment ISO
-@deftypefun {wchar_t *} wmemmove (wchar *@var{wto}, const wchar_t *@var{wfrom}, size_t @var{size})
+@deftypefun {wchar_t *} wmemmove (wchar_t *@var{wto}, const wchar_t *@var{wfrom}, size_t @var{size})
 @code{wmemmove} copies the @var{size} wide characters at @var{wfrom}
 into the @var{size} wide characters at @var{wto}, even if those two
 blocks of space overlap.  In the case of overlap, @code{memmove} is
@@ -1065,7 +1065,7 @@
 @code{0}.
 @end deftypefun
 
-@comment wcjar.h
+@comment wchar.h
 @comment ISO
 @deftypefun int wmemcmp (const wchar_t *@var{a1}, const wchar_t *@var{a2}, size_t @var{size})
 The function @code{wmemcmp} compares the @var{size} wide characters
@@ -1171,7 +1171,7 @@
 
 @comment wchar.h
 @comment GNU
-@deftypefun int wcscasecmp (const wchar_t *@var{ws1}, const wchar_T *@var{ws2})
+@deftypefun int wcscasecmp (const wchar_t *@var{ws1}, const wchar_t *@var{ws2})
 This function is like @code{wcscmp}, except that differences in case are
 ignored.  How uppercase and lowercase characters are related is
 determined by the currently selected locale.  In the standard @code{"C"}
@@ -1978,7 +1978,7 @@
 
 @comment wchar.h
 @comment ISO
-@deftypefun {wchar_t *} wcstok (wchar_t *@var{newstring}, const char *@var{delimiters})
+@deftypefun {wchar_t *} wcstok (wchar_t *@var{newstring}, const wchar_t *@var{delimiters})
 A string can be split into tokens by making a series of calls to the
 function @code{wcstok}.
 
@@ -2175,7 +2175,7 @@
 
 @comment libgen.h
 @comment XPG
-@deftypefun {char *} basename (char *@var{path})
+@deftypefun {char *} basename (const char *@var{path})
 This is the standard XPG defined @code{basename}. It is similar in
 spirit to the GNU version, but may modify the @var{path} by removing
 trailing '/' characters.  If the @var{path} is made up entirely of '/'
@@ -2483,7 +2483,7 @@
 
 @comment argz.h
 @comment GNU
-@deftypefun {void} argz_extract (char *@var{argz}, size_t @var{argz_len}, char **@var{argv})
+@deftypefun {void} argz_extract (const char *@var{argz}, size_t @var{argz_len}, char **@var{argv})
 The @code{argz_extract} function converts the argz vector @var{argz} and
 @var{argz_len} into a Unix-style argument vector stored in @var{argv},
 by putting pointers to every element in @var{argz} into successive
@@ -2561,7 +2561,7 @@
 
 @comment argz.h
 @comment GNU
-@deftypefun {char *} argz_next (char *@var{argz}, size_t @var{argz_len}, const char *@var{entry})
+@deftypefun {char *} argz_next (const char *@var{argz}, size_t @var{argz_len}, const char *@var{entry})
 The @code{argz_next} function provides a convenient way of iterating
 over the elements in the argz vector @var{argz}.  It returns a pointer
 to the next element in @var{argz} after the element @var{entry}, or

Modified: fsf/trunk/libc/manual/sysinfo.texi
==============================================================================
--- fsf/trunk/libc/manual/sysinfo.texi (original)
+++ fsf/trunk/libc/manual/sysinfo.texi Tue Feb 12 00:02:02 2013
@@ -691,7 +691,7 @@
 
 @comment mntent.h
 @comment BSD
-@deftypefun {struct mntent *} getmntent_r (FILE *@var{stream}, struct mentent *@var{result}, char *@var{buffer}, int @var{bufsize})
+@deftypefun {struct mntent *} getmntent_r (FILE *@var{stream}, struct mntent *@var{result}, char *@var{buffer}, int @var{bufsize})
 The @code{getmntent_r} function is the reentrant variant of
 @code{getmntent}.  It also returns the next entry from the file and
 returns a pointer.  The actual variable the values are stored in is not
@@ -1062,9 +1062,9 @@
 This section describes the @code{sysctl} function, which gets and sets
 a variety of system parameters.
 
-The symbols used in this section are declared in the file @file{sysctl.h}.
-
-@comment sysctl.h
+The symbols used in this section are declared in the file @file{sys/sysctl.h}.
+
+@comment sys/sysctl.h
 @comment BSD
 @deftypefun int sysctl (int *@var{names}, int @var{nlen}, void *@var{oldval}, size_t *@var{oldlenp}, void *@var{newval}, size_t @var{newlen})
 
@@ -1090,7 +1090,7 @@
 a particular parameter, you specify a path through the structure in a
 way analogous to specifying the pathname of a file.  Each component of
 the path is specified by an integer and each of these integers has a
-macro defined for it by @file{sysctl.h}.  @var{names} is the path, in
+macro defined for it by @file{sys/sysctl.h}.  @var{names} is the path, in
 the form of an array of integers.  Each component of the path is one
 element of the array, in order.  @var{nlen} is the number of components
 in the path.

Modified: fsf/trunk/libc/manual/syslog.texi
==============================================================================
--- fsf/trunk/libc/manual/syslog.texi (original)
+++ fsf/trunk/libc/manual/syslog.texi Tue Feb 12 00:02:02 2013
@@ -275,7 +275,7 @@
 @c syslog() is implemented as a call to vsyslog().
 @comment syslog.h
 @comment BSD
-@deftypefun void syslog (int @var{facility_priority}, char *@var{format}, @dots{})
+@deftypefun void syslog (int @var{facility_priority}, const char *@var{format}, @dots{})
 
 @code{syslog} submits a message to the Syslog facility.  It does this by
 writing to the Unix domain socket @code{/dev/log}.
@@ -403,7 +403,7 @@
 
 @comment syslog.h
 @comment BSD
-@deftypefun void vsyslog (int @var{facility_priority}, char *@var{format}, va_list @var{arglist})
+@deftypefun void vsyslog (int @var{facility_priority}, const char *@var{format}, va_list @var{arglist})
 
 This is functionally identical to @code{syslog}, with the BSD style variable
 length argument.

Modified: fsf/trunk/libc/manual/terminal.texi
==============================================================================
--- fsf/trunk/libc/manual/terminal.texi (original)
+++ fsf/trunk/libc/manual/terminal.texi Tue Feb 12 00:02:02 2013
@@ -621,7 +621,7 @@
 of characters, carriage return followed by linefeed.
 @end deftypevr
 
-@comment termios.h
+@comment termios.h (optional)
 @comment BSD
 @deftypevr Macro tcflag_t OXTABS
 If this bit is set, convert tab characters on output into the appropriate
@@ -630,7 +630,7 @@
 @gnulinuxsystems{} it is available as @code{XTABS}.
 @end deftypevr
 
-@comment termios.h
+@comment termios.h (optional)
 @comment BSD
 @deftypevr Macro tcflag_t ONOEOT
 If this bit is set, discard @kbd{C-d} characters (code @code{004}) on
@@ -962,7 +962,7 @@
 While this bit is set, all output is discarded.  @xref{Other Special}.
 @end deftypevr
 
-@comment termios.h
+@comment termios.h (optional)
 @comment BSD
 @deftypevr Macro tcflag_t NOKERNINFO
 Setting this bit disables handling of the STATUS character.
@@ -1686,7 +1686,7 @@
 
 @comment sgtty.h
 @comment BSD
-@deftypefun int stty (int @var{filedes}, struct sgttyb *@var{attributes})
+@deftypefun int stty (int @var{filedes}, const struct sgttyb *@var{attributes})
 
 This function sets the attributes of a terminal.
 

Modified: fsf/trunk/libc/manual/time.texi
==============================================================================
--- fsf/trunk/libc/manual/time.texi (original)
+++ fsf/trunk/libc/manual/time.texi Tue Feb 12 00:02:02 2013
@@ -420,7 +420,7 @@
 @c Linux.
 @comment time.h
 @comment SVID, XPG
-@deftypefun int stime (time_t *@var{newtime})
+@deftypefun int stime (const time_t *@var{newtime})
 @code{stime} sets the system clock, i.e., it tells the system that the
 current calendar time is @var{newtime}, where @code{newtime} is
 interpreted as described in the above definition of @code{time_t}.
@@ -2314,7 +2314,7 @@
 
 @comment sys/time.h
 @comment BSD
-@deftypefun int setitimer (int @var{which}, struct itimerval *@var{new}, struct itimerval *@var{old})
+@deftypefun int setitimer (int @var{which}, const struct itimerval *@var{new}, struct itimerval *@var{old})
 The @code{setitimer} function sets the timer specified by @var{which}
 according to @var{new}.  The @var{which} argument can have a value of
 @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL}, or @code{ITIMER_PROF}.

Modified: fsf/trunk/libc/manual/users.texi
==============================================================================
--- fsf/trunk/libc/manual/users.texi (original)
+++ fsf/trunk/libc/manual/users.texi Tue Feb 12 00:02:02 2013
@@ -437,7 +437,7 @@
 
 @comment grp.h
 @comment BSD
-@deftypefun int setgroups (size_t @var{count}, gid_t *@var{groups})
+@deftypefun int setgroups (size_t @var{count}, const gid_t *@var{groups})
 This function sets the process's supplementary group IDs.  It can only
 be called from privileged processes.  The @var{count} argument specifies
 the number of group IDs in the array @var{groups}.
@@ -1655,7 +1655,7 @@
 
 @comment pwd.h
 @comment GNU
-@deftypefun int getpwent_r (struct passwd *@var{result_buf}, char *@var{buffer}, int @var{buflen}, struct passwd **@var{result})
+@deftypefun int getpwent_r (struct passwd *@var{result_buf}, char *@var{buffer}, size_t @var{buflen}, struct passwd **@var{result})
 This function is similar to @code{getpwent} in that it returns the next
 entry from the stream initialized by @code{setpwent}.  Like
 @code{fgetpwent_r}, it uses the user-supplied buffers in
@@ -2005,7 +2005,7 @@
 
 @comment netdb.h
 @comment GNU
-@deftypefun int getnetgrent_r (char **@var{hostp}, char **@var{userp}, char **@var{domainp}, char *@var{buffer}, int @var{buflen})
+@deftypefun int getnetgrent_r (char **@var{hostp}, char **@var{userp}, char **@var{domainp}, char *@var{buffer}, size_t @var{buflen})
 This function is similar to @code{getnetgrent} with only one exception:
 the strings the three string pointers @var{hostp}, @var{userp}, and
 @var{domainp} point to, are placed in the buffer of @var{buflen} bytes

Modified: fsf/trunk/libc/misc/sys/mman.h
==============================================================================
--- fsf/trunk/libc/misc/sys/mman.h (original)
+++ fsf/trunk/libc/misc/sys/mman.h Tue Feb 12 00:02:02 2013
@@ -128,7 +128,7 @@
 /* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length
    NEW_LEN.  If MREMAP_MAYMOVE is set in FLAGS the returned address
    may differ from ADDR.  If MREMAP_FIXED is set in FLAGS the function
-   takes another paramter which is a fixed address at which the block
+   takes another parameter which is a fixed address at which the block
    resides after a successful call.  */
 extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,
 		     int __flags, ...) __THROW;

Modified: fsf/trunk/libc/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.mips (original)
+++ fsf/trunk/libc/ports/ChangeLog.mips Tue Feb 12 00:02:02 2013
@@ -1,3 +1,48 @@
+2013-02-11  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/mips/include/sys/asm.h: New file.
+	* sysdeps/mips/mips64/bsd-_setjmp.S (_setjmp): Use SETUP_GP64_REG
+	and RESTORE_GP64_REG.
+	* sysdeps/mips/mips64/bsd-setjmp.S (setjmp): Likewise.
+	* sysdeps/mips/mips64/setjmp.S (__sigsetjmp): Likewise.
+	* sysdeps/mips/sys/asm.h (__mips_cfi_startproc): Define to empty.
+	(__mips_cfi_endproc): Likewise.
+	(LEAF): Use __mips_cfi_startproc.
+	(NESTED): Likewise.
+	(END): Use __mips_cfi_endproc.
+	(EXPORT): Use __mips_cfi_startproc.
+	* sysdeps/unix/mips/mips32/sysdep.h (PSEUDO): Add CFI information
+	for error-handling code in both definitions.
+	* sysdeps/unix/mips/mips64/n32/sysdep.h (PSEUDO): Likewise.
+	* sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Likewise.
+	* sysdeps/unix/mips/sysdep.h (ENTRY): Use cfi_startproc.
+	(END): Use cfi_endproc.
+	(PSEUDO_END): Likewise.
+	(PSEUDO_END_NOERRNO): Likewise.
+	(PSEUDO_END_ERRVAL): Likewise.
+	* sysdeps/unix/sysv/linux/mips/clone.S (__clone): Add CFI
+	information.  Use SETUP_GP64_STACK and RESTORE_GP64_STACK.
+	* sysdeps/unix/sysv/linux/mips/getcontext.S (__getcontext):
+	Likewise.
+	* sysdeps/unix/sysv/linux/mips/makecontext.S (__makecontext):
+	Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Use
+	SETUP_GP64_REG and RESTORE_GP64_REG.
+	* sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
+	[(!NOT_IN_libc || IS_IN_libpthread || IS_IN_librt) && __PIC__]
+	(PSEUDO): Use cfi_endproc before ENTRY.
+	* sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Add CFI
+	information.  Use SETUP_GP64_REG and RESTORE_GP64_REG.
+	* sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h [(!NOT_IN_libc
+	|| IS_IN_libpthread || IS_IN_librt) && __PIC__] (PSEUDO): Use
+	cfi_endproc before ENTRY.
+	* sysdeps/unix/sysv/linux/mips/setcontext.S (__setcontext): Add
+	CFI information.  Use SETUP_GP64_STACK and RESTORE_GP64_STACK.
+	* sysdeps/unix/sysv/linux/mips/swapcontext.S (__swapcontext):
+	Likewise.
+	* sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Add CFI
+	information.  Use SETUP_GP64_REG and RESTORE_GP64_REG.
+
 2013-02-08  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	[BZ #13550]

Added: fsf/trunk/libc/ports/sysdeps/mips/include/sys/asm.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/include/sys/asm.h (added)
+++ fsf/trunk/libc/ports/sysdeps/mips/include/sys/asm.h Tue Feb 12 00:02:02 2013
@@ -1,0 +1,53 @@
+/* Copyright (C) 2013 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_ASM_H
+
+# include_next <sys/asm.h>
+
+# undef __mips_cfi_startproc
+# define __mips_cfi_startproc cfi_startproc
+# undef __mips_cfi_endproc
+# define __mips_cfi_endproc cfi_endproc
+
+# if _MIPS_SIM == _ABIO32
+#  define SETUP_GP64_REG_CFI(a)
+#  define SETUP_GP64_REG(a, b)
+#  define SETUP_GP64_STACK_CFI(a)
+#  define SETUP_GP64_STACK(a, b)
+#  define RESTORE_GP64_REG
+#  define RESTORE_GP64_STACK
+# else
+#  define SETUP_GP64_REG_CFI(gpsavereg)		\
+	cfi_register (gp, gpsavereg)
+#  define SETUP_GP64_REG(gpsavereg, proc)	\
+	SETUP_GP64 (gpsavereg, proc);		\
+	SETUP_GP64_REG_CFI (gpsavereg)
+#  define SETUP_GP64_STACK_CFI(gpoffset)	\
+	cfi_rel_offset (gp, gpoffset)
+#  define SETUP_GP64_STACK(gpoffset, proc)	\
+	SETUP_GP64 (gpoffset, proc);		\
+	SETUP_GP64_STACK_CFI (gpoffset)
+#  define RESTORE_GP64_REG			\
+	RESTORE_GP64;				\
+	cfi_restore (gp)
+#  define RESTORE_GP64_STACK			\
+	RESTORE_GP64;				\
+	cfi_restore (gp)
+# endif
+
+#endif

Modified: fsf/trunk/libc/ports/sysdeps/mips/mips64/bsd-_setjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/mips64/bsd-_setjmp.S (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/mips64/bsd-_setjmp.S Tue Feb 12 00:02:02 2013
@@ -31,12 +31,12 @@
 #ifdef __PIC__
 	SETUP_GP
 #endif
-	SETUP_GP64 (v0, C_SYMBOL_NAME (_setjmp))
+	SETUP_GP64_REG (v0, C_SYMBOL_NAME (_setjmp))
 	PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp)
 #if _MIPS_SIM == _ABIO32
 	nop
 #endif	
-	RESTORE_GP64
+	RESTORE_GP64_REG
 	move	a1, zero		/* Pass a second argument of zero.  */
 #ifdef __PIC__
 	jr	t9

Modified: fsf/trunk/libc/ports/sysdeps/mips/mips64/bsd-setjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/mips64/bsd-setjmp.S (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/mips64/bsd-setjmp.S Tue Feb 12 00:02:02 2013
@@ -31,12 +31,12 @@
 #ifdef __PIC__
 	SETUP_GP
 #endif
-	SETUP_GP64 (v0, C_SYMBOL_NAME (setjmp))
+	SETUP_GP64_REG (v0, C_SYMBOL_NAME (setjmp))
 	PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp)
 #if _MIPS_SIM == _ABIO32
 	nop
 #endif	
-	RESTORE_GP64
+	RESTORE_GP64_REG
 	dli a1, 1		/* Pass a second argument of one.  */
 #ifdef __PIC__
 	jr	t9

Modified: fsf/trunk/libc/ports/sysdeps/mips/mips64/setjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/mips64/setjmp.S (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/mips64/setjmp.S Tue Feb 12 00:02:02 2013
@@ -29,14 +29,14 @@
 #ifdef __PIC__
 	SETUP_GP
 #endif
-	SETUP_GP64 (v0, C_SYMBOL_NAME (__sigsetjmp))
+	SETUP_GP64_REG (v0, C_SYMBOL_NAME (__sigsetjmp))
 	move a2, sp
 	move a3, fp
 	PTR_LA t9, __sigsetjmp_aux
 #if _MIPS_SIM == _ABIO32
 	nop
 #endif	
-	RESTORE_GP64
+	RESTORE_GP64_REG
 #if _MIPS_SIM != _ABIO32
 	move a4, gp
 #endif

Modified: fsf/trunk/libc/ports/sysdeps/mips/sys/asm.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/sys/asm.h (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/sys/asm.h Tue Feb 12 00:02:02 2013
@@ -25,6 +25,10 @@
 # define __CAT(str1,str2) str1##str2
 # define CAT(str1,str2) __CAT(str1,str2)
 #endif
+
+/* Redefined as nonempty in the internal header.  */
+#define __mips_cfi_startproc /* Empty.  */
+#define __mips_cfi_endproc /* Empty.  */
 
 /*
  * Macros to handle different pointer/register sizes for 32/64-bit code
@@ -147,7 +151,8 @@
 		.align	2;                              \
 		.type	symbol,@function;               \
 		.ent	symbol,0;                       \
-symbol:		.frame	sp,0,ra
+symbol:		.frame	sp,0,ra;			\
+		__mips_cfi_startproc
 
 /*
  * NESTED - declare nested routine entry point
@@ -157,13 +162,15 @@
 		.align	2;                              \
 		.type	symbol,@function;               \
 		.ent	symbol,0;                       \
-symbol:		.frame	sp, framesize, rpc
+symbol:		.frame	sp, framesize, rpc;		\
+		__mips_cfi_startproc
 
 /*
  * END - mark end of function
  */
 #ifndef END
 # define END(function)                                   \
+		__mips_cfi_endproc;			\
 		.end	function;		        \
 		.size	function,.-function
 #endif
@@ -173,7 +180,7 @@
  */
 #define	EXPORT(symbol)                                  \
 		.globl	symbol;                         \
-symbol:
+symbol:		__mips_cfi_startproc
 
 /*
  * ABS - export absolute symbol

Modified: fsf/trunk/libc/ports/sysdeps/unix/mips/mips32/sysdep.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/mips/mips32/sysdep.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/mips/mips32/sysdep.h Tue Feb 12 00:02:02 2013
@@ -24,8 +24,10 @@
 #ifdef __PIC__
 #define PSEUDO(name, syscall_name, args) \
   .align 2;								      \
+  cfi_startproc;							      \
   99: la t9,__syscall_error;						      \
   jr t9;								      \
+  cfi_endproc;								      \
   ENTRY(name)								      \
   .set noreorder;							      \
   .cpload t9;								      \
@@ -38,8 +40,10 @@
 #define PSEUDO(name, syscall_name, args) \
   .set noreorder;							      \
   .align 2;								      \
+  cfi_startproc;							      \
   99: j __syscall_error;						      \
   nop;									      \
+  cfi_endproc;								      \
   ENTRY(name)								      \
   .set noreorder;							      \
   li v0, SYS_ify(syscall_name);						      \

Modified: fsf/trunk/libc/ports/sysdeps/unix/mips/mips64/n32/sysdep.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/mips/mips64/n32/sysdep.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/mips/mips64/n32/sysdep.h Tue Feb 12 00:02:02 2013
@@ -26,13 +26,17 @@
 #ifdef __PIC__
 #define PSEUDO(name, syscall_name, args) \
   .align 2;								      \
+  cfi_startproc;							      \
   99:;									      \
   .set noat;								      \
   .cpsetup t9, $1, name;						      \
+  cfi_register (gp, $1);						      \
   .set at;								      \
   la t9,__syscall_error;						      \
   .cpreturn;								      \
+  cfi_restore (gp);							      \
   jr t9;								      \
+  cfi_endproc;								      \
   ENTRY(name)								      \
   li v0, SYS_ify(syscall_name);						      \
   syscall;								      \
@@ -42,8 +46,10 @@
 #define PSEUDO(name, syscall_name, args) \
   .set noreorder;							      \
   .align 2;								      \
+  cfi_startproc;							      \
   99: j __syscall_error;						      \
   nop;                                                                        \
+  cfi_endproc;								      \
   ENTRY(name)								      \
   .set noreorder;							      \
   li v0, SYS_ify(syscall_name);						      \

Modified: fsf/trunk/libc/ports/sysdeps/unix/mips/mips64/n64/sysdep.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/mips/mips64/n64/sysdep.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/mips/mips64/n64/sysdep.h Tue Feb 12 00:02:02 2013
@@ -26,13 +26,17 @@
 #ifdef __PIC__
 #define PSEUDO(name, syscall_name, args) \
   .align 2;								      \
+  cfi_startproc;							      \
   99:;									      \
   .set noat;								      \
   .cpsetup t9, $1, name;						      \
+  cfi_register (gp, $1);						      \
   .set at;								      \
   dla t9,__syscall_error;						      \
   .cpreturn;								      \
+  cfi_restore (gp);							      \
   jr t9;								      \
+  cfi_endproc;								      \
   ENTRY(name)								      \
   li v0, SYS_ify(syscall_name);						      \
   syscall;								      \
@@ -42,8 +46,10 @@
 #define PSEUDO(name, syscall_name, args) \
   .set noreorder;							      \
   .align 2;								      \
+  cfi_startproc;							      \
   99: j __syscall_error;						      \
   nop;                                                                        \
+  cfi_endproc;								      \
   ENTRY(name)								      \
   .set noreorder;							      \
   li v0, SYS_ify(syscall_name);						      \

Modified: fsf/trunk/libc/ports/sysdeps/unix/mips/sysdep.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/mips/sysdep.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/mips/sysdep.h Tue Feb 12 00:02:02 2013
@@ -27,17 +27,19 @@
   .globl name;								      \
   .align 2;								      \
   .ent name,0;								      \
-  name##:
+  name##:								      \
+  cfi_startproc;
 
 #undef END
 #define	END(function)                                   \
+		cfi_endproc;				\
 		.end	function;		        \
 		.size	function,.-function
 
 #define ret	j ra ; nop
 
 #undef PSEUDO_END
-#define PSEUDO_END(sym) .end sym; .size sym,.-sym
+#define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym
 
 #define PSEUDO_NOERRNO(name, syscall_name, args)	\
   .align 2;						\
@@ -47,7 +49,7 @@
   syscall
 
 #undef PSEUDO_END_NOERRNO
-#define PSEUDO_END_NOERRNO(sym) .end sym; .size sym,.-sym
+#define PSEUDO_END_NOERRNO(sym) cfi_endproc; .end sym; .size sym,.-sym
 
 #define ret_NOERRNO ret
 
@@ -59,7 +61,7 @@
   syscall
 
 #undef PSEUDO_END_ERRVAL
-#define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym
+#define PSEUDO_END_ERRVAL(sym) cfi_endproc; .end sym; .size sym,.-sym
 
 #define ret_ERRVAL ret
 

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/clone.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/clone.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/clone.S Tue Feb 12 00:02:02 2013
@@ -47,7 +47,8 @@
 	SETUP_GP
 #endif
 	PTR_SUBU sp, FRAMESZ
-	SETUP_GP64 (GPOFF, __clone)
+	cfi_adjust_cfa_offset (FRAMESZ)
+	SETUP_GP64_STACK (GPOFF, __clone)
 #ifdef __PIC__
 	SAVE_GP (GPOFF)
 #endif
@@ -88,26 +89,35 @@
 
 	/* Do the system call */
 	li		v0,__NR_clone
+	cfi_endproc
 	syscall
 
 	bnez		a3,L(error)
 	beqz		v0,L(thread_start)
 
 	/* Successful return from the parent */
-	RESTORE_GP64
+	cfi_startproc
+	cfi_adjust_cfa_offset (FRAMESZ)
+	SETUP_GP64_STACK_CFI (GPOFF)
+	cfi_remember_state
+	RESTORE_GP64_STACK
 	PTR_ADDU	sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 	ret
 
 	/* Something bad happened -- no child created */
 L(error):
+	cfi_restore_state
 #ifdef __PIC__
 	PTR_LA		t9,__syscall_error
-	RESTORE_GP64
+	RESTORE_GP64_STACK
 	PTR_ADDU	sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 	jr		t9
 #else
-	RESTORE_GP64
+	RESTORE_GP64_STACK
 	PTR_ADDU	sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 	j		__syscall_error
 #endif
 	END(__clone)
@@ -118,6 +128,7 @@
 
 ENTRY(__thread_start)
 L(thread_start):
+	cfi_undefined ($31)
 	/* cp is already loaded.  */
 	SAVE_GP (GPOFF)
 	/* The stackframe has been created on entry of clone().  */

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/getcontext.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/getcontext.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/getcontext.S Tue Feb 12 00:02:02 2013
@@ -54,7 +54,8 @@
 # endif
 
 	PTR_ADDIU sp, -FRAMESZ
-	SETUP_GP64 (GPOFF, __getcontext)
+	cfi_adjust_cfa_offset (FRAMESZ)
+	SETUP_GP64_STACK (GPOFF, __getcontext)
 	SAVE_GP (GPOFF)
 
 #else  /* ! __PIC__ */
@@ -124,19 +125,23 @@
 	li	v0, SYS_ify (rt_sigprocmask)
 	syscall
 	bnez	a3, 99f
+	cfi_remember_state
 
 #ifdef __PIC__
-	RESTORE_GP64
+	RESTORE_GP64_STACK
 	PTR_ADDIU sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 #endif
 	move	v0, zero
 	jr	ra
 
 99:
+	cfi_restore_state
 #ifdef __PIC__
 	PTR_LA	t9, JUMPTARGET (__syscall_error)
-	RESTORE_GP64
+	RESTORE_GP64_STACK
 	PTR_ADDIU sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 	jr	t9
 
 #else  /* ! __PIC__ */

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/makecontext.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/makecontext.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/makecontext.S Tue Feb 12 00:02:02 2013
@@ -63,9 +63,10 @@
 #endif
 
 	PTR_ADDIU sp, -FRAMESZ
+	cfi_adjust_cfa_offset (FRAMESZ)
 
 #ifdef __PIC__
-	SETUP_GP64 (GPOFF, __makecontext)
+	SETUP_GP64_STACK (GPOFF, __makecontext)
 	SAVE_GP (GPOFF)
 #endif
 
@@ -145,8 +146,9 @@
 	REG_S	a1, MCONTEXT_PC(a0)
 
 #ifdef __PIC__
-	RESTORE_GP64
+	RESTORE_GP64_STACK
 	PTR_ADDIU sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 #endif
 	jr	ra
 

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S Tue Feb 12 00:02:02 2013
@@ -31,9 +31,9 @@
 	ret
 
 L(error):
-	SETUP_GP64 (a0, __ioctl)
+	SETUP_GP64_REG (a0, __ioctl)
 	PTR_LA t9, __syscall_error
-	RESTORE_GP64
+	RESTORE_GP64_REG
 	jr t9
 
 PSEUDO_END (__ioctl)

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h Tue Feb 12 00:02:02 2013
@@ -57,6 +57,7 @@
     cfi_same_value (gp);						      \
     RESTORESTK;								      \
     ret;								      \
+    cfi_endproc;							      \
   .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	      \
   ENTRY (name)								      \
     SAVESTK;								      \

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S Tue Feb 12 00:02:02 2013
@@ -30,7 +30,9 @@
 	.mask 0x00010000, -SZREG
 	.fmask 0x00000000, 0
 	PTR_ADDIU sp, -SZREG
+	cfi_adjust_cfa_offset (SZREG)
 	REG_S s0, (sp)
+	cfi_rel_offset (s0, 0)
 
 	move s0, a0
 	move a0, a1		/* shift arg1 - arg7.  */
@@ -45,15 +47,17 @@
 	syscall			/* Do the system call.  */
 
 	REG_L s0, (sp)
+	cfi_restore (s0)
 	PTR_ADDIU sp, SZREG
+	cfi_adjust_cfa_offset (-SZREG)
 	bne a3, zero, L(error)
 
 	ret
 
 L(error):
-	SETUP_GP64 (a0, syscall)
+	SETUP_GP64_REG (a0, syscall)
 	PTR_LA t9, __syscall_error
-	RESTORE_GP64
+	RESTORE_GP64_REG
 	jr t9
 
 END (syscall)

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h Tue Feb 12 00:02:02 2013
@@ -52,6 +52,7 @@
     .set reorder;							      \
     bne a3, zero, 99b;					       		      \
     ret;								      \
+    cfi_endproc;							      \
   .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	      \
   ENTRY (name)								      \
     .set noreorder;							      \

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/setcontext.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/setcontext.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/setcontext.S Tue Feb 12 00:02:02 2013
@@ -56,9 +56,10 @@
 #endif
 
 	PTR_ADDIU sp, -FRAMESZ
+	cfi_adjust_cfa_offset (FRAMESZ)
 
 #ifdef __PIC__
-	SETUP_GP64 (GPOFF, __setcontext)
+	SETUP_GP64_STACK (GPOFF, __setcontext)
 	SAVE_GP (GPOFF)
 #endif
 
@@ -152,6 +153,7 @@
 	   and call the signal return syscall as if a signal
 	   handler exited normally.  */
 	PTR_ADDIU sp, -((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
+	cfi_adjust_cfa_offset ((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
 
 	/* Only ucontext is referred to from rt_sigreturn,
 	   copy it.  */
@@ -175,11 +177,13 @@
 	   path.  Successful rt_sigreturn never returns to
 	   its calling place.  */
 	PTR_ADDIU sp, ((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
+	cfi_adjust_cfa_offset (-((RT_SIGFRAME_SIZE + ALSZ) & ALMASK))
 99:
 #ifdef __PIC__
 	PTR_LA	t9, JUMPTARGET (__syscall_error)
-	RESTORE_GP64
+	RESTORE_GP64_STACK
 	PTR_ADDIU sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 	jr	t9
 
 #else  /* ! __PIC__ */

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S Tue Feb 12 00:02:02 2013
@@ -63,7 +63,8 @@
 # endif
 
 	PTR_ADDIU sp, -FRAMESZ
-	SETUP_GP64 (GPOFF, __swapcontext)
+	cfi_adjust_cfa_offset (FRAMESZ)
+	SETUP_GP64_STACK (GPOFF, __swapcontext)
 	SAVE_GP (GPOFF)
 
 #else  /* ! __PIC__ */
@@ -198,8 +199,9 @@
 99:
 #ifdef __PIC__
 	PTR_LA	t9, JUMPTARGET (__syscall_error)
-	RESTORE_GP64
+	RESTORE_GP64_STACK
 	PTR_ADDIU sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 	jr	t9
 
 #else  /* ! __PIC__ */

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/vfork.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/vfork.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/vfork.S Tue Feb 12 00:02:02 2013
@@ -42,7 +42,8 @@
 	SETUP_GP
 #endif
 	PTR_SUBU sp, FRAMESZ
-	SETUP_GP64 (a5, __vfork)
+	cfi_adjust_cfa_offset (FRAMESZ)
+	SETUP_GP64_REG (a5, __vfork)
 #ifdef __PIC__
 	SAVE_GP (GPOFF)
 #endif
@@ -63,6 +64,7 @@
 #endif
 
 	PTR_ADDU	sp, FRAMESZ
+	cfi_adjust_cfa_offset (-FRAMESZ)
 
 	SAVE_PID
 
@@ -75,20 +77,22 @@
 
 	RESTORE_PID
 
+	cfi_remember_state
 	bnez		a3,L(error)
 
 	/* Successful return from the parent or child.  */
-	RESTORE_GP64
+	RESTORE_GP64_REG
 	ret
 
 	/* Something bad happened -- no child created.  */
 L(error):
+	cfi_restore_state
 #ifdef __PIC__
 	PTR_LA		t9, __syscall_error
-	RESTORE_GP64
+	RESTORE_GP64_REG
 	jr		t9
 #else
-	RESTORE_GP64
+	RESTORE_GP64_REG
 	j		__syscall_error
 #endif
 	END(__vfork)

Modified: fsf/trunk/libc/stdlib/bsearch.c
==============================================================================
--- fsf/trunk/libc/stdlib/bsearch.c (original)
+++ fsf/trunk/libc/stdlib/bsearch.c Tue Feb 12 00:02:02 2013
@@ -17,32 +17,7 @@
 
 #include <stdlib.h>
 
-
-/* Perform a binary search for KEY in BASE which has NMEMB elements
-   of SIZE bytes each.  The comparisons are done by (*COMPAR)().  */
-void *
-bsearch (const void *key, const void *base, size_t nmemb, size_t size,
-	 int (*compar) (const void *, const void *))
-{
-  size_t l, u, idx;
-  const void *p;
-  int comparison;
-
-  l = 0;
-  u = nmemb;
-  while (l < u)
-    {
-      idx = (l + u) / 2;
-      p = (void *) (((const char *) base) + (idx * size));
-      comparison = (*compar) (key, p);
-      if (comparison < 0)
-	u = idx;
-      else if (comparison > 0)
-	l = idx + 1;
-      else
-	return (void *) p;
-    }
-
-  return NULL;
-}
+#undef  __extern_inline
+#define __extern_inline /* Empty, so we get a normal definition.  */
+#include <bits/stdlib-bsearch.h>
 libc_hidden_def (bsearch)

Modified: fsf/trunk/libc/stdlib/stdlib.h
==============================================================================
--- fsf/trunk/libc/stdlib/stdlib.h (original)
+++ fsf/trunk/libc/stdlib/stdlib.h Tue Feb 12 00:02:02 2013
@@ -756,6 +756,10 @@
 		      size_t __nmemb, size_t __size, __compar_fn_t __compar)
      __nonnull ((1, 2, 5)) __wur;
 
+#ifdef __USE_EXTERN_INLINES
+# include <bits/stdlib-bsearch.h>
+#endif
+
 /* Sort NMEMB elements of BASE, of SIZE bytes each,
    using COMPAR to perform the comparisons.  */
 extern void qsort (void *__base, size_t __nmemb, size_t __size,

Modified: fsf/trunk/libc/string/Makefile
==============================================================================
--- fsf/trunk/libc/string/Makefile (original)
+++ fsf/trunk/libc/string/Makefile Tue Feb 12 00:02:02 2013
@@ -75,8 +75,6 @@
 CFLAGS-stratcliff.c = -fno-builtin
 CFLAGS-test-ffs.c = -fno-builtin
 CFLAGS-tst-inlcall.c = -fno-builtin
-CFLAGS-bug-strstr1.c = -fno-builtin
-CFLAGS-bug-strcasestr1.c = -fno-builtin
 
 ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-svc.out

Modified: fsf/trunk/libc/string/str-two-way.h
==============================================================================
--- fsf/trunk/libc/string/str-two-way.h (original)
+++ fsf/trunk/libc/string/str-two-way.h Tue Feb 12 00:02:02 2013
@@ -19,7 +19,7 @@
 
 /* Before including this file, you need to include <string.h> (and
    <config.h> before that, if not part of libc), and define:
-     RESULT_TYPE             A macro that expands to the return type.
+     RETURN_TYPE             A macro that expands to the return type.
      AVAILABLE(h, h_l, j, n_l)
 			     A macro that returns nonzero if there are
 			     at least N_L bytes left starting at H[J].
@@ -37,7 +37,11 @@
 			     The argument is an 'unsigned char'; the result
 			     must be an 'unsigned char' as well.
 
-  This file undefines the macros documented above, and defines
+  Other macros you may optionally define:
+     RET0_IF_0(a)            Documented below at default definition.
+     CHECK_EOL               Same.
+
+  This file undefines the macros listed above, and defines
   LONG_NEEDLE_THRESHOLD.
 */
 
@@ -516,10 +520,8 @@
 }
 
 #undef AVAILABLE
-#undef AVAILABLE1
-#undef AVAILABLE2
-#undef AVAILABLE1_USES_J
 #undef CANON_ELEMENT
 #undef CMP_FUNC
 #undef RET0_IF_0
 #undef RETURN_TYPE
+#undef CHECK_EOL

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits