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

[Commits] r17322 - in /fsf/trunk/libc: ./ conform/ conform/data/ include/ include/arpa/ include/bits/ include/sys/ io/ libio/ libio/bi...



Author: eglibc
Date: Tue Feb 28 00:02:02 2012
New Revision: 17322

Log:
Import glibc-mainline for 2012-02-28

Added:
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_ceil.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_ceilf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_rint.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_rintf.S
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/INSTALL
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/conform/Makefile
    fsf/trunk/libc/conform/conformtest.pl
    fsf/trunk/libc/conform/data/limits.h-data
    fsf/trunk/libc/conform/run-conformtest.sh
    fsf/trunk/libc/include/arpa/inet.h
    fsf/trunk/libc/include/bits/dlfcn.h
    fsf/trunk/libc/include/langinfo.h
    fsf/trunk/libc/include/monetary.h
    fsf/trunk/libc/include/sys/poll.h
    fsf/trunk/libc/io/fcntl.h
    fsf/trunk/libc/libio/bits/stdio-ldbl.h
    fsf/trunk/libc/libio/stdio.h
    fsf/trunk/libc/manual/Makefile
    fsf/trunk/libc/manual/install.texi
    fsf/trunk/libc/manual/libc.texinfo
    fsf/trunk/libc/manual/llio.texi
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
    fsf/trunk/libc/posix/spawn.h
    fsf/trunk/libc/posix/sys/wait.h
    fsf/trunk/libc/posix/unistd.h
    fsf/trunk/libc/rt/aio.h
    fsf/trunk/libc/rt/tst-aio.c
    fsf/trunk/libc/rt/tst-aio64.c
    fsf/trunk/libc/rt/tst-aio7.c
    fsf/trunk/libc/stdio-common/tst-fmemopen.c
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_rintl.c
    fsf/trunk/libc/sysdeps/posix/spawni.c
    fsf/trunk/libc/sysdeps/pthread/aio_cancel.c
    fsf/trunk/libc/sysdeps/pthread/aio_fsync.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/siginfo.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/uio.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
    fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/siginfo.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
    fsf/trunk/libc/termios/termios.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Feb 28 00:02:02 2012
@@ -1,4 +1,115 @@
+2012-02-27  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S: Fix comment formatting.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S: Likewise.
+	* sysdeps/sparc/sparc64/fpu/s_ceil.S: Likewise.
+	* sysdeps/sparc/sparc64/fpu/s_ceilf.S: Likewise.
+	* sysdeps/sparc/sparc64/fpu/s_rint.S: Likewise.
+	* sysdeps/sparc/sparc64/fpu/s_rintf.S: Likewise.
+
+2012-02-27  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* configure.in (CC): Restrict allowed GCC versions to 4.3 and
+	later.  Allow versions 5-9.
+	* configure: Regenerated.
+	* manual/install.texi (Tools for Compilation): Give GCC 4.3 as
+	required minimum version and 4.6 as recommended version.  Do not
+	mention bugs in GCC 2.7 and 2.8.
+	* INSTALL: Regenerated.
+
+2012-02-27  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S: New file.
+	* sysdeps/sparc/sparc64/fpu/s_ceil.S: New file.
+	* sysdeps/sparc/sparc64/fpu/s_ceilf.S: New file.
+	* sysdeps/sparc/sparc64/fpu/s_rint.S: New file.
+	* sysdeps/sparc/sparc64/fpu/s_rintf.S: New file.
+
+	* sysdeps/ieee754/ldbl-128/s_nearbyintl.c (__nearbyintl): Do not
+	manipulate bits before adding and subtracting TWO112[sx].
+	* sysdeps/ieee754/ldbl-128/s_rintl.c (__rintl): Likewise.
+
+2012-02-27  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	[BZ #13775]
+	* libio/bits/stdio-ldbl.h (vdprintf, dprintf): Put these under
+	[__USE_XOPEN2K8] rather than [__USE_GNU], to match the stdio.h decls.
+	* libio/stdio.h (vdprintf, dprintf): Remove comment about these not
+	being in POSIX, because they are in 1003.1-2008.
+
+	* rt/tst-aio.c: Include <fcntl.h>.
+	* rt/tst-aio7.c: Likewise.
+	* rt/tst-aio64.c: Likewise.
+
+	* stdio-common/tst-fmemopen.c (main): Remove spurious const.
+
+2012-02-27  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* manual/install.texi (--with-headers): Describe headers as
+	interface headers, not private headers.
+	(Specific advice for GNU/Linux systems): Describe use of headers
+	from "make headers_install", not private headers from older
+	kernels.
+	* INSTALL: Regenerated.
+	* sysdeps/unix/sysv/linux/configure.in (LIBC_LINUX_VERSION):
+	Change to 2.6.19.
+	* sysdeps/unix/sysv/linux/configure: Regenerated.
+
+	* manual/llio.texi (fclean): Remove documentation.
+
+	* manual/Makefile (libc-texi-generated): New variable.  Include
+	version.texi.
+	(libc.dvi, libc.pdf, libc.info, libc/index.html): Depend on
+	$(libc-texi-generated), not duplicated list of files.
+	(version.texi, stamp-version): New rules.
+	(realclean): Remove $(libc-texi-generated), not individual files
+	from that list.  Do not remove dir-add.texinfo.
+	* manual/libc.texinfo: Comment out uses of edition numbers and
+	references to printed manual.  Remove last-updated dates.
+	(EDITION): Comment out.
+	(ISBN): Likewise.
+	(VERSION, UPDATED): Remove.
+	(version.texi): Include.
+
+2012-02-27  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/posix/spawni.c: Include <signal.h>.
+	* sysdeps/pthread/aio_cancel.c: Include <fcntl.h>.
+	* sysdeps/pthread/aio_fsync.c: Likewise.
+
 2012-02-26  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* conform/Makefile (tests): Run only when not cross-compiling and
+	when fast-check is not defined.
+
+	* conform/conformtest.pl: XPG7 and POSIX2008 require C99.
+	* conform/data/limits.h-data: Fixes for POSIX2008.
+	* conform/run-conformtest.sh: Run all tests.
+	* include/arpa/inet.h: Changes to allow conformtest.pl to use the
+	headers.
+	* include/bits/dlfcn.h: Likewise.
+	* include/langinfo.h: Likewise.
+	* include/monetary.h: Likewise.
+	* include/sys/poll.h: Likewise.
+
+	* io/fcntl.h: Define AT_NO_AUTOMOUNT and AT_EMPTY_PATH only
+	for __USE_GNU.
+	* posix/spawn.h: Define __need_sigset_t.
+	* posix/sys/wait.h: Don't include <sys/resource.h>, define id_t here.
+	* posix/unistd.h: Declare ctermid only for XPG before XPG6.
+	* rt/aio.h: Don't include fcntl.h and signal.h.  Use bits/siginfo.h
+	to get sigevent_t only.
+	* sysdeps/unix/sysv/linux/bits/socket.h: Declare sendmmsg and recvmmsg
+	only for __USE_GNU.
+	* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
+	* sysdeps/unix/sysv/linux/bits/uio.h: Declare process_vm_readv and
+	process_vm_writev only for __USE_GNU.
+	* termios/termios.h: Declare tcgetsid also for POSIX2008.
 
 	* conform/Makefile: For now ignore errors from run-conformtest.
 	* conform/conformtest.pl: Simplify code.  Add -ansi to CFLAGS for

Modified: fsf/trunk/libc/INSTALL
==============================================================================
--- fsf/trunk/libc/INSTALL (original)
+++ fsf/trunk/libc/INSTALL Tue Feb 28 00:02:02 2012
@@ -59,9 +59,10 @@
 
 `--with-headers=DIRECTORY'
      Look for kernel header files in DIRECTORY, not `/usr/include'.
-     Glibc needs information from the kernel's private header files.
-     Glibc will normally look in `/usr/include' for them, but if you
-     specify this option, it will look in DIRECTORY instead.
+     Glibc needs information from the kernel's header files describing
+     the interface to the kernel.  Glibc will normally look in
+     `/usr/include' for them, but if you specify this option, it will
+     look in DIRECTORY instead.
 
      This option is primarily of use on a system where the headers in
      `/usr/include' come from an older version of glibc.  Conflicts can
@@ -278,22 +279,13 @@
      recommend GNU `make' version 3.79.  All earlier versions have
      severe bugs or lack features.
 
-   * GCC 3.4 or newer, GCC 4.1 recommended
-
-     GCC 3.4 or higher is required; as of this writing, GCC 4.4 is the
-     compiler we advise to use for current versions.  On certain
-     machines including `powerpc64', compilers prior to GCC 4.0 have
-     bugs that prevent them compiling the C library code.  On other
-     machines, GCC 4.1 is required to build the C library with support
-     for the correct `long double' type format; these include `powerpc'
-     (32 bit), `s390' and `s390x'.  For other architectures special
-     compiler-provided headers are needed (like `cpuid.h' on x86) which
-     only come with later compiler versions.
+   * GCC 4.3 or newer, GCC 4.6 recommended
+
+     GCC 4.3 or higher is required; as of this writing, GCC 4.6 is the
+     compiler we advise to use to build the GNU C library.
 
      You can use whatever compiler you like to compile programs that
-     use GNU libc, but be aware that both GCC 2.7 and 2.8 have bugs in
-     their floating-point support that may be triggered by the math
-     library.
+     use GNU libc.
 
      Check the FAQ for any special compiler issues on particular
      platforms.
@@ -347,37 +339,34 @@
 =====================================
 
 If you are installing GNU libc on a GNU/Linux system, you need to have
-the header files from a 2.2 or newer kernel around for reference.  For
-some architectures, like ia64, sh and hppa, you need at least headers
-from kernel 2.3.99 (sh and hppa) or 2.4.0 (ia64).  You do not need to
-use that kernel, just have its headers where glibc can access at them.
-The easiest way to do this is to unpack it in a directory such as
-`/usr/src/linux-2.2.1'.  In that directory, run `make config' and
-accept all the defaults.  Then run `make include/linux/version.h'.
-Finally, configure glibc with the option
-`--with-headers=/usr/src/linux-2.2.1/include'.  Use the most recent
-kernel you can get your hands on.
-
-   An alternate tactic is to unpack the 2.2 kernel and run `make
-config' as above; then, rename or delete `/usr/include', create a new
-`/usr/include', and make symbolic links of `/usr/include/linux' and
-`/usr/include/asm' into the kernel sources.  You can then configure
-glibc with no special options.
+the header files from a 2.6.19.1 or newer kernel around for reference.
+These headers must be installed using `make headers_install'; the
+headers present in the kernel source directory are not suitable for
+direct use by GNU libc.  You do not need to use that kernel, just have
+its headers installed where glibc can access them, referred to here as
+INSTALL-DIRECTORY.  The easiest way to do this is to unpack it in a
+directory such as `/usr/src/linux-VERSION'.  In that directory, run
+`make headers_install INSTALL_HDR_PATH=INSTALL-DIRECTORY'.  Finally,
+configure glibc with the option
+`--with-headers=INSTALL-DIRECTORY/include'.  Use the most recent kernel
+you can get your hands on.  (If you are cross-compiling GNU libc, you
+need to specify `ARCH=ARCHITECTURE' in the `make headers_install'
+command, where ARCHITECTURE is the architecture name used by the Linux
+kernel, such as `x86' or `powerpc'.)
 
    After installing GNU libc, you may need to remove or rename
-`/usr/include/linux' and `/usr/include/asm', and replace them with
-copies of `include/linux' and `include/asm-$ARCHITECTURE' taken from
-the Linux source package which supplied kernel headers for building the
-library.  ARCHITECTURE will be the machine architecture for which the
-library was built, such as `i386' or `alpha'.  You do not need to do
-this if you did not specify an alternate kernel header source using
-`--with-headers'.  The intent here is that these directories should be
-copies of, *not* symlinks to, the kernel headers used to build the
-library.
-
-   Note that `/usr/include/net' and `/usr/include/scsi' should *not* be
-symlinks into the kernel sources.  GNU libc provides its own versions
-of these files.
+directories such as `/usr/include/linux' and `/usr/include/asm', and
+replace them with copies of directories such as `linux' and `asm' from
+`INSTALL-DIRECTORY/include'.  All directories present in
+`INSTALL-DIRECTORY/include' should be copied, except that GNU libc
+provides its own version of `/usr/include/scsi'; the files provided by
+the kernel should be copied without replacing those provided by GNU
+libc.  The `linux', `asm' and `asm-generic' directories are required to
+compile programs using GNU libc; the other directories describe
+interfaces to the kernel but are not required if not compiling programs
+using those interfaces.  You do not need to copy kernel headers if you
+did not specify an alternate kernel header source using
+`--with-headers'.
 
    GNU/Linux expects some components of the libc installation to be in
 `/lib' and some in `/usr/lib'.  This is handled automatically if you

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Tue Feb 28 00:02:02 2012
@@ -4799,7 +4799,7 @@
   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    3.4* | 4.[0-9]* )
+    4.[3-9].* | 4.[1-9][0-9].* | [5-9].* )
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Tue Feb 28 00:02:02 2012
@@ -932,7 +932,7 @@
 # These programs are version sensitive.
 AC_CHECK_TOOL_PREFIX
 AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
-  [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ],
+  [version \([egcygnustpi-]*[0-9.]*\)], [4.[3-9].* | 4.[1-9][0-9].* | [5-9].* ],
   critic_missing="$critic_missing gcc")
 AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
   [GNU Make[^0-9]*\([0-9][0-9.]*\)],

Modified: fsf/trunk/libc/conform/Makefile
==============================================================================
--- fsf/trunk/libc/conform/Makefile (original)
+++ fsf/trunk/libc/conform/Makefile Tue Feb 28 00:02:02 2012
@@ -25,7 +25,11 @@
 
 include ../Rules
 
+ifneq (yes,$(fast-check))
+ifeq (no,$(cross-compiling))
 tests: $(objpfx)run-conformtest.out
+endif
+endif
 
 $(objpfx)run-conformtest.out: run-conformtest.sh conformtest.pl \
 			      $(wildcard data/*.h-data) \

Modified: fsf/trunk/libc/conform/conformtest.pl
==============================================================================
--- fsf/trunk/libc/conform/conformtest.pl (original)
+++ fsf/trunk/libc/conform/conformtest.pl Tue Feb 28 00:02:02 2012
@@ -40,8 +40,8 @@
 $CFLAGS{"XPG4"} = "-D_XOPEN_SOURCE_EXTENDED";
 $CFLAGS{"UNIX98"} = "-D_XOPEN_SOURCE=500";
 $CFLAGS{"XOPEN2K"} = "-D_XOPEN_SOURCE=600";
-$CFLAGS{"XOPEN2K8"} = "-D_XOPEN_SOURCE=700";
-$CFLAGS{"POSIX2008"} = "-D_POSIX_C_SOURCE=200809L";
+$CFLAGS{"XOPEN2K8"} = "-std=c99 -D_XOPEN_SOURCE=700";
+$CFLAGS{"POSIX2008"} = "-std=c99 -D_POSIX_C_SOURCE=200809L";
 
 $CFLAGS = "$flags -fno-builtin '-D__attribute__(x)=' $CFLAGS{$standard} -D_ISOMAC";
 

Modified: fsf/trunk/libc/conform/data/limits.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/limits.h-data (original)
+++ fsf/trunk/libc/conform/data/limits.h-data Tue Feb 28 00:02:02 2012
@@ -87,7 +87,7 @@
 optional-constant _POSIX_AIO_LISTIO_MAX	2
 optional-constant _POSIX_AIO_MAX 1
 optional-constant _POSIX_ARG_MAX 4096
-#ifdef XOPEN2K
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
 optional-constant _POSIX_CHILD_MAX 25
 #else
 optional-constant _POSIX_CHILD_MAX 6
@@ -100,12 +100,12 @@
 optional-constant _POSIX_MQ_OPEN_MAX 8
 optional-constant _POSIX_MQ_PRIO_MAX 32
 optional-constant _POSIX_NAME_MAX 14
-#ifdef XOPEN2K
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
 optional-constant _POSIX_NGROUPS_MAX 8
 #else
 optional-constant _POSIX_NGROUPS_MAX 0
 #endif
-#ifdef XOPEN2K
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
 optional-constant _POSIX_OPEN_MAX 20
 #else
 optional-constant _POSIX_OPEN_MAX 16

Modified: fsf/trunk/libc/conform/run-conformtest.sh
==============================================================================
--- fsf/trunk/libc/conform/run-conformtest.sh (original)
+++ fsf/trunk/libc/conform/run-conformtest.sh Tue Feb 28 00:02:02 2012
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 
 objpfx="$1"
 perl="$2"
@@ -6,8 +6,6 @@
 includes="$4"
 
 standards=("ISO" "ISO99" "ISO11" "POSIX" "XPG3" "XPG4" "UNIX98"
-	   "XOPEN2K" "XOPEN2K8" "POSIX2008")
-standards=("POSIX" "XPG3" "XPG4" "UNIX98"
 	   "XOPEN2K" "XOPEN2K8" "POSIX2008")
 
 exitval=0

Modified: fsf/trunk/libc/include/arpa/inet.h
==============================================================================
--- fsf/trunk/libc/include/arpa/inet.h (original)
+++ fsf/trunk/libc/include/arpa/inet.h Tue Feb 28 00:02:02 2012
@@ -1,5 +1,6 @@
 #include <inet/arpa/inet.h>
 
+#ifndef _ISOMAC
 extern int __inet_aton (const char *__cp, struct in_addr *__inp);
 libc_hidden_proto (__inet_aton)
 
@@ -8,3 +9,4 @@
 libc_hidden_proto (inet_pton)
 libc_hidden_proto (inet_makeaddr)
 libc_hidden_proto (inet_netof)
+#endif

Modified: fsf/trunk/libc/include/bits/dlfcn.h
==============================================================================
--- fsf/trunk/libc/include/bits/dlfcn.h (original)
+++ fsf/trunk/libc/include/bits/dlfcn.h Tue Feb 28 00:02:02 2012
@@ -1,3 +1,5 @@
 #include_next <bits/dlfcn.h>
 
+#ifndef _ISOMAC
 libc_hidden_proto (_dl_mcount_wrapper_check)
+#endif

Modified: fsf/trunk/libc/include/langinfo.h
==============================================================================
--- fsf/trunk/libc/include/langinfo.h (original)
+++ fsf/trunk/libc/include/langinfo.h Tue Feb 28 00:02:02 2012
@@ -2,9 +2,11 @@
 
 #include <locale/langinfo.h>
 
+#ifndef _ISOMAC
 libc_hidden_proto (nl_langinfo)
 
 extern __typeof (nl_langinfo_l) __nl_langinfo_l;
 libc_hidden_proto (__nl_langinfo_l)
+#endif
 
 #endif

Modified: fsf/trunk/libc/include/monetary.h
==============================================================================
--- fsf/trunk/libc/include/monetary.h (original)
+++ fsf/trunk/libc/include/monetary.h Tue Feb 28 00:02:02 2012
@@ -1,5 +1,7 @@
 #include <stdlib/monetary.h>
+#ifndef _ISOMAC
 #include <stdarg.h>
 
 extern ssize_t __vstrfmon_l (char *s, size_t maxsize, __locale_t loc,
 			     const char *format, va_list ap);
+#endif

Modified: fsf/trunk/libc/include/sys/poll.h
==============================================================================
--- fsf/trunk/libc/include/sys/poll.h (original)
+++ fsf/trunk/libc/include/sys/poll.h Tue Feb 28 00:02:02 2012
@@ -1,9 +1,11 @@
 #ifndef	_SYS_POLL_H
 # include <io/sys/poll.h>
 
+#ifndef _ISOMAC
 extern int __poll (struct pollfd *__fds, unsigned long int __nfds,
 		   int __timeout);
 libc_hidden_proto (__poll)
 libc_hidden_proto (ppoll)
+#endif
 
 #endif

Modified: fsf/trunk/libc/io/fcntl.h
==============================================================================
--- fsf/trunk/libc/io/fcntl.h (original)
+++ fsf/trunk/libc/io/fcntl.h Tue Feb 28 00:02:02 2012
@@ -109,9 +109,11 @@
 # define AT_REMOVEDIR		0x200	/* Remove directory instead of
 					   unlinking file.  */
 # define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
-# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
+# ifdef __USE_GNU
+#  define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
 					   traversal.  */
-# define AT_EMPTY_PATH		0x1000	/* Allow empty relative pathname.  */
+#  define AT_EMPTY_PATH		0x1000	/* Allow empty relative pathname.  */
+# endif
 # define AT_EACCESS		0x200	/* Test access permitted for
 					   effective IDs, not real IDs.  */
 #endif

Modified: fsf/trunk/libc/libio/bits/stdio-ldbl.h
==============================================================================
--- fsf/trunk/libc/libio/bits/stdio-ldbl.h (original)
+++ fsf/trunk/libc/libio/bits/stdio-ldbl.h Tue Feb 28 00:02:02 2012
@@ -1,5 +1,5 @@
 /* -mlong-double-64 compatibility mode for stdio functions.
-   Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-2012 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
@@ -62,9 +62,12 @@
 __END_NAMESPACE_C99
 #endif
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 __LDBL_REDIR_DECL (vdprintf)
 __LDBL_REDIR_DECL (dprintf)
+#endif
+
+#ifdef __USE_GNU
 __LDBL_REDIR_DECL (vasprintf)
 __LDBL_REDIR_DECL (__asprintf)
 __LDBL_REDIR_DECL (asprintf)

Modified: fsf/trunk/libc/libio/stdio.h
==============================================================================
--- fsf/trunk/libc/libio/stdio.h (original)
+++ fsf/trunk/libc/libio/stdio.h Tue Feb 28 00:02:02 2012
@@ -408,12 +408,7 @@
 #endif
 
 #ifdef __USE_XOPEN2K8
-/* Write formatted output to a file descriptor.
-
-   These functions are not part of POSIX and therefore no official
-   cancellation point.  But due to similarity with an POSIX interface
-   or due to the implementation they are cancellation points and
-   therefore not marked with __THROW.  */
+/* Write formatted output to a file descriptor.  */
 extern int vdprintf (int __fd, const char *__restrict __fmt,
 		     _G_va_list __arg)
      __attribute__ ((__format__ (__printf__, 2, 0)));

Modified: fsf/trunk/libc/manual/Makefile
==============================================================================
--- fsf/trunk/libc/manual/Makefile (original)
+++ fsf/trunk/libc/manual/Makefile Tue Feb 28 00:02:02 2012
@@ -76,12 +76,15 @@
 			       '$(add-chapters)' \
 			       '$(appendices) $(licenses)'
 
-libc.dvi libc.pdf libc.info: chapters.texi top-menu.texi dir-add.texi \
-			     libm-err.texi
+# Generated files directly included from libc.texinfo.
+libc-texi-generated = chapters.texi top-menu.texi dir-add.texi \
+		      libm-err.texi version.texi
+
+libc.dvi libc.pdf libc.info: $(libc-texi-generated)
 libc.dvi libc.pdf: texinfo.tex
 
 html: libc/index.html
-libc/index.html: chapters.texi top-menu.texi dir-add.texi libm-err.texi
+libc/index.html: $(libc-texi-generated)
 	$(MAKEINFO) --html libc.texinfo
 
 # Generate the summary from the Texinfo source files for each chapter.
@@ -108,6 +111,13 @@
 	pwd=`pwd`; \
 	$(PERL) $< $$pwd/.. > libm-err-tmp
 	$(move-if-change) libm-err-tmp libm-err.texi
+	touch $@
+
+# Generate a file with the version number.
+version.texi: stamp-version ;
+stamp-version: $(common-objpfx)config.make
+	echo "@set VERSION $(version)" > version-tmp
+	$(move-if-change) version-tmp version.texi
 	touch $@
 
 # Generate Texinfo files from the C source for the example programs.
@@ -173,10 +183,10 @@
 distclean: clean
 indices = cp fn pg tp vr ky
 realclean: distclean
-	-rm -f texis summary.texi stamp-summary *.c.texi dir-add.texi
+	-rm -f texis summary.texi stamp-summary *.c.texi
 	-rm -f $(foreach index,$(indices),libc.$(index) libc.$(index)s)
-	-rm -f libc.log libc.aux libc.toc dir-add.texinfo
-	-rm -f top-menu.texi chapters.texi
+	-rm -f libc.log libc.aux libc.toc
+	-rm -f $(libc-texi-generated)
 
 .PHONY: install subdir_install installdirs install-data
 install-data subdir_install: install

Modified: fsf/trunk/libc/manual/install.texi
==============================================================================
--- fsf/trunk/libc/manual/install.texi (original)
+++ fsf/trunk/libc/manual/install.texi Tue Feb 28 00:02:02 2012
@@ -79,8 +79,9 @@
 
 @item --with-headers=@var{directory}
 Look for kernel header files in @var{directory}, not
-@file{/usr/include}.  Glibc needs information from the kernel's private
-header files.  Glibc will normally look in @file{/usr/include} for them,
+@file{/usr/include}.  Glibc needs information from the kernel's header
+files describing the interface to the kernel.  Glibc will normally
+look in @file{/usr/include} for them,
 but if you specify this option, it will look in @var{DIRECTORY} instead.
 
 This option is primarily of use on a system where the headers in
@@ -312,21 +313,13 @@
 bugs or lack features.
 
 @item
-GCC 3.4 or newer, GCC 4.1 recommended
-
-GCC 3.4 or higher is required; as of this
-writing, GCC 4.4 is the compiler we advise to use for current versions.
-On certain machines including @code{powerpc64}, compilers prior to GCC
-4.0 have bugs that prevent them compiling the C library code.  On other
-machines, GCC 4.1 is required to build the C
-library with support for the correct @code{long double} type format;
-these include @code{powerpc} (32 bit), @code{s390} and @code{s390x}.  For
-other architectures special compiler-provided headers are needed
-(like @file{cpuid.h} on x86) which only come with later compiler versions.
+GCC 4.3 or newer, GCC 4.6 recommended
+
+GCC 4.3 or higher is required; as of this writing, GCC 4.6 is the
+compiler we advise to use to build the GNU C library.
 
 You can use whatever compiler you like to compile programs that use GNU
-libc, but be aware that both GCC 2.7 and 2.8 have bugs in their
-floating-point support that may be triggered by the math library.
+libc.
 
 Check the FAQ for any special compiler issues on particular platforms.
 
@@ -393,39 +386,37 @@
 @appendixsec Specific advice for GNU/Linux systems
 @cindex kernel header files
 
-If you are installing GNU libc on a GNU/Linux system, you need to have the
-header files from a 2.2 or newer kernel around for reference.  For some
-architectures, like ia64, sh and hppa, you need at least headers from
-kernel 2.3.99 (sh and hppa) or 2.4.0 (ia64).  You do not need to use
-that kernel, just have its headers where glibc can access at them.  The
-easiest way to do this is to unpack it in a directory such as
-@file{/usr/src/linux-2.2.1}.  In that directory, run @samp{make config}
-and accept all the defaults.  Then run @samp{make
-include/linux/version.h}.  Finally, configure glibc with the option
-@samp{--with-headers=/usr/src/linux-2.2.1/include}.  Use the most recent
-kernel you can get your hands on.
-
-An alternate tactic is to unpack the 2.2 kernel and run @samp{make
-config} as above; then, rename or delete @file{/usr/include}, create a
-new @file{/usr/include}, and make symbolic links of
-@file{/usr/include/linux} and @file{/usr/include/asm} into the kernel
-sources.  You can then configure glibc with no special options.
+If you are installing GNU libc on a GNU/Linux system, you need to have
+the header files from a 2.6.19.1 or newer kernel around for reference.
+These headers must be installed using @samp{make headers_install}; the
+headers present in the kernel source directory are not suitable for
+direct use by GNU libc.  You do not need to use that kernel, just have
+its headers installed where glibc can access them, referred to here as
+@var{install-directory}.  The easiest way to do this is to unpack it
+in a directory such as @file{/usr/src/linux-@var{version}}.  In that
+directory, run @samp{make headers_install
+INSTALL_HDR_PATH=@var{install-directory}}.  Finally, configure glibc
+with the option @samp{--with-headers=@var{install-directory}/include}.
+Use the most recent kernel you can get your hands on.  (If you are
+cross-compiling GNU libc, you need to specify
+@samp{ARCH=@var{architecture}} in the @samp{make headers_install}
+command, where @var{architecture} is the architecture name used by the
+Linux kernel, such as @samp{x86} or @samp{powerpc}.)
 
 After installing GNU libc, you may need to remove or rename
-@file{/usr/include/linux} and @file{/usr/include/asm}, and replace them
-with copies of @file{include/linux} and
-@file{include/asm-$@var{ARCHITECTURE}} taken from the Linux source
-package which supplied kernel headers for building the library.
-@var{ARCHITECTURE} will be the machine architecture for which the
-library was built, such as @samp{i386} or @samp{alpha}.  You do not need
-to do this if you did not specify an alternate kernel header source
-using @samp{--with-headers}.  The intent here is that these directories
-should be copies of, @strong{not} symlinks to, the kernel headers used to
-build the library.
-
-Note that @file{/usr/include/net} and @file{/usr/include/scsi} should
-@strong{not} be symlinks into the kernel sources.  GNU libc provides its
-own versions of these files.
+directories such as @file{/usr/include/linux} and
+@file{/usr/include/asm}, and replace them with copies of directories
+such as @file{linux} and @file{asm} from
+@file{@var{install-directory}/include}.  All directories present in
+@file{@var{install-directory}/include} should be copied, except that
+GNU libc provides its own version of @file{/usr/include/scsi}; the
+files provided by the kernel should be copied without replacing those
+provided by GNU libc.  The @file{linux}, @file{asm} and
+@file{asm-generic} directories are required to compile programs using
+GNU libc; the other directories describe interfaces to the kernel but
+are not required if not compiling programs using those interfaces.
+You do not need to copy kernel headers if you did not specify an
+alternate kernel header source using @samp{--with-headers}.
 
 GNU/Linux expects some components of the libc installation to be in
 @file{/lib} and some in @file{/usr/lib}.  This is handled automatically

Modified: fsf/trunk/libc/manual/libc.texinfo
==============================================================================
--- fsf/trunk/libc/manual/libc.texinfo (original)
+++ fsf/trunk/libc/manual/libc.texinfo Tue Feb 28 00:02:02 2012
@@ -17,19 +17,24 @@
 @c @smallbook
 @comment %**end of header (This is for running Texinfo on a region.)
 
+@c Everything related to printed editions is disabled until we have
+@c resolved how to keep them in sync with the master sources of the
+@c manual.
 @c sold 0.06/1.09, print run out 21may96
-@set EDITION 0.13
-@set VERSION 2.14
-@set UPDATED 2011-07-19
-@set ISBN 1-882114-55-8
+@c @set EDITION 0.13
+@c @set ISBN 1-882114-55-8
+
+@include version.texi
 
 @set FDL_VERSION 1.3
 
 @copying
 This file documents the GNU C library.
 
-This is Edition @value{EDITION}, last updated @value{UPDATED},
-of @cite{The GNU C Library Reference Manual}, for version @value{VERSION}.
+This is
+@c Disabled (printed editions, see above).
+@c Edition @value{EDITION} of
+@cite{The GNU C Library Reference Manual}, for version @value{VERSION}.
 
 Copyright @copyright{} 1993--2012 Free Software Foundation, Inc.
 
@@ -59,22 +64,23 @@
 @center with
 @center Richard M. Stallman, Roland McGrath, Andrew Oram, and Ulrich Drepper
 @sp 3
-@center Edition @value{EDITION}
-@sp 1
-@center last updated @value{UPDATED}
-@sp 1
+@c Disabled (printed editions, see above).
+@c @center Edition @value{EDITION}
+@c @sp 1
 @center for version @value{VERSION}
 @page
 @vskip 0pt plus 1filll
 @insertcopying
 
-@sp 2
-Published by the @uref{http://www.fsf.org/, Free Software Foundation} @*
+@c Disabled (printed editions, see above).
+@c @sp 2
+@c Published by the @uref{http://www.fsf.org/, Free Software Foundation} @*
 @c ISBN @value{ISBN} @*
 
-@sp 2
-Cover art for the Free Software Foundation's printed edition
-by Etienne Suvasa.
+@c Disabled (printed editions, see above).
+@c @sp 2
+@c Cover art for the Free Software Foundation's printed edition
+@c by Etienne Suvasa.
 
 @end titlepage
 
@@ -84,7 +90,9 @@
 @ifnottex
 @node Top, Introduction, (dir), (dir)
 @top Main Menu
-This is Edition @value{EDITION}, last updated @value{UPDATED}, of
+This is
+@c Disabled (printed editions, see above).
+@c Edition @value{EDITION} of
 @cite{The GNU C Library Reference Manual}, for Version @value{VERSION}
 of the GNU C Library.
 @end ifnottex

Modified: fsf/trunk/libc/manual/llio.texi
==============================================================================
--- fsf/trunk/libc/manual/llio.texi (original)
+++ fsf/trunk/libc/manual/llio.texi Tue Feb 28 00:02:02 2012
@@ -1000,21 +1000,10 @@
 @node Cleaning Streams
 @subsection Cleaning Streams
 
-On the GNU system, you can clean up any stream with @code{fclean}:
-
-@comment stdio.h
-@comment GNU
-@deftypefun int fclean (FILE *@var{stream})
-Clean up the stream @var{stream} so that its buffer is empty.  If
-@var{stream} is doing output, force it out.  If @var{stream} is doing
-input, give the data in the buffer back to the system, arranging to
-reread it.
-@end deftypefun
-
-On other systems, you can use @code{fflush} to clean a stream in most
+You can use @code{fflush} to clean a stream in most
 cases.
 
-You can skip the @code{fclean} or @code{fflush} if you know the stream
+You can skip the @code{fflush} if you know the stream
 is already clean.  A stream is clean whenever its buffer is empty.  For
 example, an unbuffered stream is always clean.  An input stream that is
 at end-of-file is clean.  A line-buffered stream is clean when the last
@@ -1028,12 +1017,10 @@
 read.  When an input stream reads from a random-access file,
 @code{fflush} does clean the stream, but leaves the file pointer at an
 unpredictable place; you must set the file pointer before doing any
-further I/O.  On the GNU system, using @code{fclean} avoids both of
-these problems.
+further I/O.
 
 Closing an output-only stream also does @code{fflush}, so this is a
-valid way of cleaning an output stream.  On the GNU system, closing an
-input stream does @code{fclean}.
+valid way of cleaning an output stream.
 
 You need not clean a stream before using its descriptor for control
 operations such as setting terminal modes; these operations don't affect

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Tue Feb 28 00:02:02 2012
@@ -1,4 +1,16 @@
+2012-02-27  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to non-existing
+	__pthread_attr.
+	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
+
 2012-02-26  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
 
 	* sysdeps/pthread/pthread.h: Define __need_timespec before including
 	<time.h>.

Modified: fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h Tue Feb 28 00:02:02 2012
@@ -21,6 +21,9 @@
 #include <features.h>
 #include <endian.h>
 #include <sched.h>
+#ifdef __USE_XOPEN2K
+# define __need_clockid_t
+#endif
 #define __need_timespec
 #include <time.h>
 

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h Tue Feb 28 00:02:02 2012
@@ -35,13 +35,13 @@
 typedef unsigned long int pthread_t;
 
 
-union __pthread_attr
+union pthread_attr_t
 {
   char __size[__SIZEOF_PTHREAD_ATTR_T];
   long int __align;
 };
 #ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 # define __have_pthread_attr_t	1
 #endif
 

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h Tue Feb 28 00:02:02 2012
@@ -49,13 +49,13 @@
 typedef unsigned long int pthread_t;
 
 
-union __pthread_attr
+union pthread_attr_t
 {
   char __size[__SIZEOF_PTHREAD_ATTR_T];
   long int __align;
 };
 #ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 # define __have_pthread_attr_t	1
 #endif
 

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h Tue Feb 28 00:02:02 2012
@@ -48,13 +48,13 @@
 typedef unsigned long int pthread_t;
 
 
-union __pthread_attr
+union pthread_attr_t
 {
   char __size[__SIZEOF_PTHREAD_ATTR_T];
   long int __align;
 };
 #ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 # define __have_pthread_attr_t	1
 #endif
 

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h Tue Feb 28 00:02:02 2012
@@ -37,13 +37,13 @@
 typedef unsigned long int pthread_t;
 
 
-union __pthread_attr
+union pthread_attr_t
 {
   char __size[__SIZEOF_PTHREAD_ATTR_T];
   long int __align;
 };
 #ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 # define __have_pthread_attr_t	1
 #endif
 

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h Tue Feb 28 00:02:02 2012
@@ -49,13 +49,13 @@
 typedef unsigned long int pthread_t;
 
 
-union __pthread_attr
+union pthread_attr_t
 {
   char __size[__SIZEOF_PTHREAD_ATTR_T];
   long int __align;
 };
 #ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 # define __have_pthread_attr_t	1
 #endif
 

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h Tue Feb 28 00:02:02 2012
@@ -48,13 +48,13 @@
 typedef unsigned long int pthread_t;
 
 
-union __pthread_attr
+union pthread_attr_t
 {
   char __size[__SIZEOF_PTHREAD_ATTR_T];
   long int __align;
 };
 #ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 # define __have_pthread_attr_t	1
 #endif
 

Modified: fsf/trunk/libc/posix/spawn.h
==============================================================================
--- fsf/trunk/libc/posix/spawn.h (original)
+++ fsf/trunk/libc/posix/spawn.h Tue Feb 28 00:02:02 2012
@@ -21,6 +21,7 @@
 
 #include <features.h>
 #include <sched.h>
+#define __need_sigset_t
 #include <signal.h>
 #include <sys/types.h>
 

Modified: fsf/trunk/libc/posix/sys/wait.h
==============================================================================
--- fsf/trunk/libc/posix/sys/wait.h (original)
+++ fsf/trunk/libc/posix/sys/wait.h Tue Feb 28 00:02:02 2012
@@ -137,9 +137,15 @@
 extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
 
 #if defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8
-# include <sys/resource.h>
+# ifndef __id_t_defined
+#  include <bits/types.h>
+typedef __id_t id_t;
+#  define __id_t_defined
+# endif
+
 # define __need_siginfo_t
 # include <bits/siginfo.h>
+
 /* Wait for a childing matching IDTYPE and ID to change the status and
    place appropriate information in *INFOP.
    If IDTYPE is P_PID, match any process whose process ID is ID.

Modified: fsf/trunk/libc/posix/unistd.h
==============================================================================
--- fsf/trunk/libc/posix/unistd.h (original)
+++ fsf/trunk/libc/posix/unistd.h Tue Feb 28 00:02:02 2012
@@ -1158,7 +1158,7 @@
 
 /* The Single Unix specification demands this prototype to be here.
    It is also found in <stdio.h>.  */
-#if defined __USE_XOPEN || defined __USE_XOPEN2K8
+#if defined __USE_XOPEN && !defined __USE_XOPEN2K
 /* Return the name of the controlling terminal.  */
 extern char *ctermid (char *__s) __THROW;
 #endif

Modified: fsf/trunk/libc/rt/aio.h
==============================================================================
--- fsf/trunk/libc/rt/aio.h (original)
+++ fsf/trunk/libc/rt/aio.h Tue Feb 28 00:02:02 2012
@@ -23,11 +23,11 @@
 #define _AIO_H	1
 
 #include <features.h>
-#include <fcntl.h>
-#include <signal.h>
+#include <sys/types.h>
+#define __need_sigevent_t
+#include <bits/siginfo.h>
 #define __need_timespec
 #include <time.h>
-#include <sys/types.h>
 
 __BEGIN_DECLS
 

Modified: fsf/trunk/libc/rt/tst-aio.c
==============================================================================
--- fsf/trunk/libc/rt/tst-aio.c (original)
+++ fsf/trunk/libc/rt/tst-aio.c Tue Feb 28 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Tests for AIO in librt.
-   Copyright (C) 1998,2000,02 Free Software Foundation, Inc.
+   Copyright (C) 1998-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
 
@@ -20,6 +20,7 @@
 #include <aio.h>
 #include <errno.h>
 #include <error.h>
+#include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>

Modified: fsf/trunk/libc/rt/tst-aio64.c
==============================================================================
--- fsf/trunk/libc/rt/tst-aio64.c (original)
+++ fsf/trunk/libc/rt/tst-aio64.c Tue Feb 28 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Tests for 64bit AIO in librt.
-   Copyright (C) 1998,99,2000,02 Free Software Foundation, Inc.
+   Copyright (C) 1998-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
 
@@ -21,6 +21,7 @@
 #include <aio.h>
 #include <errno.h>
 #include <error.h>
+#include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>

Modified: fsf/trunk/libc/rt/tst-aio7.c
==============================================================================
--- fsf/trunk/libc/rt/tst-aio7.c (original)
+++ fsf/trunk/libc/rt/tst-aio7.c Tue Feb 28 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Test for AIO POSIX compliance.
-   Copyright (C) 2001,02, 03 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 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
@@ -19,6 +19,7 @@
 #include <aio.h>
 #include <error.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>

Modified: fsf/trunk/libc/stdio-common/tst-fmemopen.c
==============================================================================
--- fsf/trunk/libc/stdio-common/tst-fmemopen.c (original)
+++ fsf/trunk/libc/stdio-common/tst-fmemopen.c Tue Feb 28 00:02:02 2012
@@ -11,7 +11,7 @@
 int
 main (int argc, char **argv)
 {
-  const char *test_file;
+  char *test_file;
   const char blah[] = "BLAH";
   FILE *fp;
   char *mmap_data;

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_nearbyintl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_nearbyintl.c Tue Feb 28 00:02:02 2012
@@ -37,18 +37,13 @@
 {
 	fenv_t env;
 	int64_t i0,j0,sx;
-	u_int64_t i,i1;
+	u_int64_t i1;
 	long double w,t;
 	GET_LDOUBLE_WORDS64(i0,i1,x);
 	sx = (((u_int64_t)i0)>>63);
 	j0 = ((i0>>48)&0x7fff)-0x3fff;
-	if(j0<48) {
+	if(j0<112) {
 	    if(j0<0) {
-		if(((i0&0x7fffffffffffffffLL)|i1)==0) return x;
-		i1 |= (i0&0x0000ffffffffffffLL);
-		i0 &= 0xffffe00000000000ULL;
-		i0 |= ((i1|-i1)>>16)&0x0000800000000000LL;
-		SET_LDOUBLE_MSW64(x,i0);
 		feholdexcept (&env);
 	        w = TWO112[sx]+x;
 	        t = w-TWO112[sx];
@@ -56,25 +51,11 @@
 		GET_LDOUBLE_MSW64(i0,t);
 		SET_LDOUBLE_MSW64(t,(i0&0x7fffffffffffffffLL)|(sx<<63));
 	        return t;
-	    } else {
-		i = (0x0000ffffffffffffLL)>>j0;
-		if(((i0&i)|i1)==0) return x; /* x is integral */
-		i>>=1;
-		if(((i0&i)|i1)!=0) {
-		    if(j0==47) i1 = 0x4000000000000000ULL; else
-		    i0 = (i0&(~i))|((0x0000200000000000LL)>>j0);
-		}
 	    }
-	} else if (j0>111) {
+	} else {
 	    if(j0==0x4000) return x+x;	/* inf or NaN */
 	    else return x;		/* x is integral */
-	} else {
-	    i = -1ULL>>(j0-48);
-	    if((i1&i)==0) return x;	/* x is integral */
-	    i>>=1;
-	    if((i1&i)!=0) i1 = (i1&(~i))|((0x4000000000000000LL)>>(j0-48));
 	}
-	SET_LDOUBLE_WORDS64(x,i0,i1);
 	feholdexcept (&env);
 	w = TWO112[sx]+x;
 	t = w-TWO112[sx];

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_rintl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_rintl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_rintl.c Tue Feb 28 00:02:02 2012
@@ -39,42 +39,23 @@
 long double __rintl(long double x)
 {
 	int64_t i0,j0,sx;
-	u_int64_t i,i1;
+	u_int64_t i1;
 	long double w,t;
 	GET_LDOUBLE_WORDS64(i0,i1,x);
 	sx = (((u_int64_t)i0)>>63);
 	j0 = ((i0>>48)&0x7fff)-0x3fff;
-	if(j0<48) {
+	if(j0<112) {
 	    if(j0<0) {
-		if(((i0&0x7fffffffffffffffLL)|i1)==0) return x;
-		i1 |= (i0&0x0000ffffffffffffLL);
-		i0 &= 0xffffe00000000000ULL;
-		i0 |= ((i1|-i1)>>16)&0x0000800000000000LL;
-		SET_LDOUBLE_MSW64(x,i0);
 	        w = TWO112[sx]+x;
 	        t = w-TWO112[sx];
 		GET_LDOUBLE_MSW64(i0,t);
 		SET_LDOUBLE_MSW64(t,(i0&0x7fffffffffffffffLL)|(sx<<63));
 	        return t;
-	    } else {
-		i = (0x0000ffffffffffffLL)>>j0;
-		if(((i0&i)|i1)==0) return x; /* x is integral */
-		i>>=1;
-		if(((i0&i)|i1)!=0) {
-		    if(j0==47) i1 = 0x4000000000000000ULL; else
-		    i0 = (i0&(~i))|((0x0000200000000000LL)>>j0);
-		}
 	    }
-	} else if (j0>111) {
+	} else {
 	    if(j0==0x4000) return x+x;	/* inf or NaN */
 	    else return x;		/* x is integral */
-	} else {
-	    i = -1ULL>>(j0-48);
-	    if((i1&i)==0) return x;	/* x is integral */
-	    i>>=1;
-	    if((i1&i)!=0) i1 = (i1&(~i))|((0x4000000000000000LL)>>(j0-48));
 	}
-	SET_LDOUBLE_WORDS64(x,i0,i1);
 	w = TWO112[sx]+x;
 	return w-TWO112[sx];
 }

Modified: fsf/trunk/libc/sysdeps/posix/spawni.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/spawni.c (original)
+++ fsf/trunk/libc/sysdeps/posix/spawni.c Tue Feb 28 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Guts of POSIX spawn interface.  Generic POSIX.1 version.
-   Copyright (C) 2000-2005, 2006, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2000-2005, 2006, 2011, 2012 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
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <signal.h>
 #include <sys/resource.h>
 #include "spawn_int.h"
 #include <not-cancel.h>

Modified: fsf/trunk/libc/sysdeps/pthread/aio_cancel.c
==============================================================================
--- fsf/trunk/libc/sysdeps/pthread/aio_cancel.c (original)
+++ fsf/trunk/libc/sysdeps/pthread/aio_cancel.c Tue Feb 28 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Cancel requests associated with given file descriptor.
-   Copyright (C) 1997, 1998, 2000, 2002, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000, 2002, 2005, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -32,6 +32,7 @@
 
 #include <assert.h>
 #include <errno.h>
+#include <fcntl.h>
 
 #include <aio_misc.h>
 

Modified: fsf/trunk/libc/sysdeps/pthread/aio_fsync.c
==============================================================================
--- fsf/trunk/libc/sysdeps/pthread/aio_fsync.c (original)
+++ fsf/trunk/libc/sysdeps/pthread/aio_fsync.c Tue Feb 28 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Synchronize I/O in given file descriptor.
-   Copyright (C) 1997, 1999, 2002, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2002, 2005, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -28,6 +28,7 @@
 /* And undo the hack.  */
 #undef aio_fsync64
 #include <errno.h>
+#include <fcntl.h>
 
 #include <aio_misc.h>
 

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S Tue Feb 28 00:02:02 2012
@@ -1,0 +1,87 @@
+/* ceil function, sparc32 v9 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 2012.
+
+   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/>.  */
+
+#include <sysdep.h>
+
+	/* Since changing the rounding mode is extremely expensive, we
+	   try to round up using a method that is rounding mode
+	   agnostic.
+
+	   We add then subtract (or subtract than add if the initial
+	   value was negative) 2**23 to the value, then subtract it
+	   back out.
+
+	   This will clear out the fractional portion of the value.
+	   One of two things will happen for non-whole initial values.
+	   Either the rounding mode will round it up, or it will be
+	   rounded down.  If the value started out whole, it will be
+	   equal after the addition and subtraction.  This means we
+	   can accurately detect with one test whether we need to add
+	   another 1.0 to round it up properly.
+
+	   We pop constants into the FPU registers using the incoming
+	   argument stack slots, since this avoid having to use any
+	   PIC references.  We also thus avoid having to allocate a
+	   register window.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_FIFTYTWO	0x43300000		/* 2**52 */
+#define ONE_DOT_ZERO	0x3ff00000		/* 1.0 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__ceil)
+	sethi	%hi(TWO_FIFTYTWO), %o2
+	sllx	%o0, 32, %o0
+	sethi	%hi(ONE_DOT_ZERO), %o3
+	or	%o0, %o1, %o0
+	stx	%o0, [%sp + 72]
+	sllx	%o2, 32, %o2
+	fzero	ZERO
+	sllx	%o3, 32, %o3
+
+	ldd	[%sp + 72], %f0
+	fnegd	ZERO, SIGN_BIT
+
+	stx	%o2, [%sp + 72]
+	fabsd	%f0, %f14
+
+	ldd	[%sp + 72], %f16
+	fcmpd	%fcc3, %f14, %f16
+
+	fmovduge %fcc3, ZERO, %f16
+	fand	%f0, SIGN_BIT, SIGN_BIT
+
+	for	%f16, SIGN_BIT, %f16
+	faddd	%f0, %f16, %f18
+	fsubd	%f18, %f16, %f18
+	fcmpd	%fcc2, %f18, %f0
+	stx	%o3, [%fp + 72]
+
+	ldd	[%fp + 72], %f20
+	fmovduge %fcc2, ZERO, %f20
+	faddd	%f18, %f20, %f0
+	fabsd	%f0, %f0
+	retl
+	 for	%f0, SIGN_BIT, %f0
+END (__ceil)
+weak_alias (__ceil, ceil)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S Tue Feb 28 00:02:02 2012
@@ -1,0 +1,83 @@
+/* Float ceil function, sparc32 v9 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 2012.
+
+   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/>.  */
+
+#include <sysdep.h>
+
+	/* Since changing the rounding mode is extremely expensive, we
+	   try to round up using a method that is rounding mode
+	   agnostic.
+
+	   We add then subtract (or subtract than add if the initial
+	   value was negative) 2**23 to the value, then subtract it
+	   back out.
+
+	   This will clear out the fractional portion of the value.
+	   One of two things will happen for non-whole initial values.
+	   Either the rounding mode will round it up, or it will be
+	   rounded down.  If the value started out whole, it will be
+	   equal after the addition and subtraction.  This means we
+	   can accurately detect with one test whether we need to add
+	   another 1.0 to round it up properly.
+
+	   We pop constants into the FPU registers using the incoming
+	   argument stack slots, since this avoid having to use any
+	   PIC references.  We also thus avoid having to allocate a
+	   register window.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_TWENTYTHREE	0x4b000000		/* 2**23 */
+#define ONE_DOT_ZERO	0x3f800000		/* 1.0 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__ceilf)
+	st	%o0, [%sp + 68]
+	sethi	%hi(TWO_TWENTYTHREE), %o2
+	sethi	%hi(ONE_DOT_ZERO), %o3
+	fzeros	ZERO
+
+	ld	[%sp + 68], %f0
+	fnegs	ZERO, SIGN_BIT
+
+	st	%o2, [%sp + 68]
+	fabss	%f0, %f14
+
+	ld	[%sp + 68], %f16
+	fcmps	%fcc3, %f14, %f16
+
+	fmovsuge %fcc3, ZERO, %f16
+	fands	%f0, SIGN_BIT, SIGN_BIT
+
+	fors	%f16, SIGN_BIT, %f16
+	fadds	%f0, %f16, %f1
+	fsubs	%f1, %f16, %f1
+	fcmps	%fcc2, %f1, %f0
+	st	%o3, [%fp + 68]
+
+	ld	[%fp + 68], %f9
+	fmovsuge %fcc2, ZERO, %f9
+	fadds	%f1, %f9, %f0
+	fabss	%f0, %f0
+	retl
+	 fors	%f0, SIGN_BIT, %f0
+END (__ceilf)
+weak_alias (__ceilf, ceilf)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S Tue Feb 28 00:02:02 2012
@@ -1,0 +1,64 @@
+/* Round float to int floating-point values, sparc32 v9 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 2012.
+
+   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/>.  */
+
+#include <sysdep.h>
+
+	/* We pop constants into the FPU registers using the incoming
+	   argument stack slots, since this avoid having to use any PIC
+	   references.  We also thus avoid having to allocate a register
+	   window.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_FIFTYTWO	0x43300000		/* 2**52 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__rint)
+	sethi	%hi(TWO_FIFTYTWO), %o2
+	sllx	%o0, 32, %o0
+
+	or	%o0, %o1, %o0
+	fzero	ZERO
+
+	stx	%o0, [%sp + 72]
+	sllx	%o2, 32, %o2
+	fnegd	ZERO, SIGN_BIT
+
+	ldd	[%sp + 72], %f0
+
+	stx	%o2, [%sp + 72]
+	fabsd	%f0, %f14
+
+	ldd	[%sp + 72], %f16
+	fcmpd	%fcc3, %f14, %f16
+
+	fmovduge %fcc3, ZERO, %f16
+	fand	%f0, SIGN_BIT, SIGN_BIT
+
+	for	%f16, SIGN_BIT, %f16
+	faddd	%f0, %f16, %f6
+	fsubd	%f6, %f16, %f0
+	fabsd	%f0, %f0
+	retl
+	 for	%f0, SIGN_BIT, %f0
+END (__rint)
+weak_alias (__rint, rint)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S Tue Feb 28 00:02:02 2012
@@ -1,0 +1,59 @@
+/* Round float to int floating-point values, sparc32 v9 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 2012.
+
+   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/>.  */
+
+#include <sysdep.h>
+
+	/* We pop constants into the FPU registers using the incoming
+	   argument stack slots, since this avoid having to use any PIC
+	   references.  We also thus avoid having to allocate a register
+	   window.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_TWENTYTHREE	0x4b000000		/* 2**23 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__rintf)
+	st	%o0, [%sp + 68]
+	sethi	%hi(TWO_TWENTYTHREE), %o2
+	fzeros	ZERO
+
+	ld	[%sp + 68], %f1
+	fnegs	ZERO, SIGN_BIT
+
+	st	%o2, [%sp + 68]
+	fabss	%f1, %f14
+
+	ld	[%sp + 68], %f16
+	fcmps	%fcc3, %f14, %f16
+
+	fmovsuge %fcc3, ZERO, %f16
+	fands	%f1, SIGN_BIT, SIGN_BIT
+
+	fors	%f16, SIGN_BIT, %f16
+	fadds	%f1, %f16, %f5
+	fsubs	%f5, %f16, %f0
+	fabss	%f0, %f0
+	retl
+	 fors	%f0, SIGN_BIT, %f0
+END (__rintf)
+weak_alias (__rintf, rintf)

Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_ceil.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_ceil.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_ceil.S Tue Feb 28 00:02:02 2012
@@ -1,0 +1,83 @@
+/* ceil function, sparc64 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 2012.
+
+   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/>.  */
+
+#include <sysdep.h>
+
+	/* Since changing the rounding mode is extremely expensive, we
+	   try to round up using a method that is rounding mode
+	   agnostic.
+
+	   We add then subtract (or subtract than add if the initial
+	   value was negative) 2**23 to the value, then subtract it
+	   back out.
+
+	   This will clear out the fractional portion of the value.
+	   One of two things will happen for non-whole initial values.
+	   Either the rounding mode will round it up, or it will be
+	   rounded down.  If the value started out whole, it will be
+	   equal after the addition and subtraction.  This means we
+	   can accurately detect with one test whether we need to add
+	   another 1.0 to round it up properly.
+
+	   We pop constants into the FPU registers using the incoming
+	   argument stack slots, since this avoid having to use any
+	   PIC references.  We also thus avoid having to allocate a
+	   register window.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_FIFTYTWO	0x43300000		/* 2**52 */
+#define ONE_DOT_ZERO	0x3ff00000		/* 1.0 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__ceil)
+	sethi	%hi(TWO_FIFTYTWO), %o2
+	sethi	%hi(ONE_DOT_ZERO), %o3
+	fzero	ZERO
+
+	sllx	%o2, 32, %o2
+	fnegd	ZERO, SIGN_BIT
+
+	sllx	%o3, 32, %o3
+	stx	%o2, [%sp + STACK_BIAS + 128]
+	fabsd	%f0, %f14
+
+	ldd	[%sp + STACK_BIAS + 128], %f16
+	fcmpd	%fcc3, %f14, %f16
+
+	fmovduge %fcc3, ZERO, %f16
+	fand	%f0, SIGN_BIT, SIGN_BIT
+
+	for	%f16, SIGN_BIT, %f16
+	faddd	%f0, %f16, %f18
+	fsubd	%f18, %f16, %f18
+	fcmpd	%fcc2, %f18, %f0
+	stx	%o3, [%fp + STACK_BIAS + 128]
+
+	ldd	[%fp + STACK_BIAS + 128], %f20
+	fmovduge %fcc2, ZERO, %f20
+	faddd	%f18, %f20, %f0
+	fabsd	%f0, %f0
+	retl
+	 for	%f0, SIGN_BIT, %f0
+END (__ceil)
+weak_alias (__ceil, ceil)

Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_ceilf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_ceilf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_ceilf.S Tue Feb 28 00:02:02 2012
@@ -1,0 +1,81 @@
+/* Float ceil function, sparc64 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 2012.
+
+   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/>.  */
+
+#include <sysdep.h>
+
+	/* Since changing the rounding mode is extremely expensive, we
+	   try to round up using a method that is rounding mode
+	   agnostic.
+
+	   We add then subtract (or subtract than add if the initial
+	   value was negative) 2**23 to the value, then subtract it
+	   back out.
+
+	   This will clear out the fractional portion of the value.
+	   One of two things will happen for non-whole initial values.
+	   Either the rounding mode will round it up, or it will be
+	   rounded down.  If the value started out whole, it will be
+	   equal after the addition and subtraction.  This means we
+	   can accurately detect with one test whether we need to add
+	   another 1.0 to round it up properly.
+
+	   We pop constants into the FPU registers using the incoming
+	   argument stack slots, since this avoid having to use any
+	   PIC references.  We also thus avoid having to allocate a
+	   register window.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_TWENTYTHREE	0x4b000000		/* 2**23 */
+#define ONE_DOT_ZERO	0x3f800000		/* 1.0 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__ceilf)
+	sethi	%hi(TWO_TWENTYTHREE), %o2
+	sethi	%hi(ONE_DOT_ZERO), %o3
+	fzeros	ZERO
+
+	fnegs	ZERO, SIGN_BIT
+
+	st	%o2, [%sp + STACK_BIAS + 128]
+	fabss	%f1, %f14
+
+	ld	[%sp + STACK_BIAS + 128], %f16
+	fcmps	%fcc3, %f14, %f16
+
+	fmovsuge %fcc3, ZERO, %f16
+	fands	%f1, SIGN_BIT, SIGN_BIT
+
+	fors	%f16, SIGN_BIT, %f16
+	fadds	%f1, %f16, %f5
+	fsubs	%f5, %f16, %f5
+	fcmps	%fcc2, %f5, %f1
+	st	%o3, [%fp + STACK_BIAS + 128]
+
+	ld	[%fp + STACK_BIAS + 128], %f9
+	fmovsuge %fcc2, ZERO, %f9
+	fadds	%f5, %f9, %f0
+	fabss	%f0, %f0
+	retl
+	 fors	%f0, SIGN_BIT, %f0
+END (__ceilf)
+weak_alias (__ceilf, ceilf)

Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_rint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_rint.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_rint.S Tue Feb 28 00:02:02 2012
@@ -1,0 +1,57 @@
+/* Round float to int floating-point values, sparc64 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 2012.
+
+   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/>.  */
+
+#include <sysdep.h>
+
+	/* We pop constants into the FPU registers using the incoming
+	   argument stack slots, since this avoid having to use any PIC
+	   references.  We also thus avoid having to allocate a register
+	   window.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_FIFTYTWO	0x43300000		/* 2**52 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__rint)
+	sethi	%hi(TWO_FIFTYTWO), %o2
+	sllx	%o2, 32, %o2
+	fzero	ZERO
+
+	fnegd	ZERO, SIGN_BIT
+	stx	%o2, [%sp + STACK_BIAS + 128]
+	fabsd	%f0, %f14
+
+	ldd	[%sp + STACK_BIAS + 128], %f16
+	fcmpd	%fcc3, %f14, %f16
+
+	fmovduge %fcc3, ZERO, %f16
+	fand	%f0, SIGN_BIT, SIGN_BIT
+
+	for	%f16, SIGN_BIT, %f16
+	faddd	%f0, %f16, %f6
+	fsubd	%f6, %f16, %f0
+	fabsd	%f0, %f0
+	retl
+	 for	%f0, SIGN_BIT, %f0
+END (__rint)
+weak_alias (__rint, rint)

Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_rintf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_rintf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_rintf.S Tue Feb 28 00:02:02 2012
@@ -1,0 +1,56 @@
+/* Round float to int floating-point values, sparc64 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 2012.
+
+   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/>.  */
+
+#include <sysdep.h>
+
+	/* We pop constants into the FPU registers using the incoming
+	   argument stack slots, since this avoid having to use any PIC
+	   references.  We also thus avoid having to allocate a register
+	   window.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_TWENTYTHREE	0x4b000000		/* 2**23 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__rintf)
+	sethi	%hi(TWO_TWENTYTHREE), %o2
+	fzeros	ZERO
+
+	fnegs	ZERO, SIGN_BIT
+	st	%o2, [%sp + STACK_BIAS + 128]
+	fabss	%f1, %f14
+
+	ld	[%sp + STACK_BIAS + 128], %f16
+	fcmps	%fcc3, %f14, %f16
+
+	fmovsuge %fcc3, ZERO, %f16
+	fands	%f1, SIGN_BIT, SIGN_BIT
+
+	fors	%f16, SIGN_BIT, %f16
+	fadds	%f1, %f16, %f5
+	fsubs	%f5, %f16, %f0
+	fabss	%f0, %f0
+	retl
+	 fors	%f0, SIGN_BIT, %f0
+END (__rintf)
+weak_alias (__rintf, rintf)

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/siginfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/siginfo.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/siginfo.h Tue Feb 28 00:02:02 2012
@@ -271,7 +271,7 @@
 
 /* Forward declaration.  */
 # ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 #  define __have_pthread_attr_t	1
 # endif
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h Tue Feb 28 00:02:02 2012
@@ -422,6 +422,7 @@
 
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
 /* Receive up to VLEN messages as described by VMESSAGES from socket FD.
    Returns the number of bytes read or -1 for errors.
 
@@ -437,6 +438,7 @@
    __THROW.  */
 extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
 		     unsigned int __vlen, int __flags);
+#endif
 
 __END_DECLS
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/uio.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/uio.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/uio.h Tue Feb 28 00:02:02 2012
@@ -48,8 +48,10 @@
 
 #endif
 
-#if defined _SYS_UIO_H && !defined _BITS_UIO_H_FOR_SYS_UIO_H
-#define _BITS_UIO_H_FOR_SYS_UIO_H 1
+
+#ifdef __USE_GNU
+# if defined _SYS_UIO_H && !defined _BITS_UIO_H_FOR_SYS_UIO_H
+#  define _BITS_UIO_H_FOR_SYS_UIO_H 1
 
 __BEGIN_DECLS
 
@@ -71,4 +73,5 @@
 
 __END_DECLS
 
+# endif
 #endif

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure Tue Feb 28 00:02:02 2012
@@ -242,33 +242,33 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
 $as_echo_n "checking installed Linux kernel header files... " >&6; }
-if ${libc_cv_linux2010+:} false; then :
+if ${libc_cv_linux2619+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <linux/version.h>
-#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE <  (2 *65536+ 0 *256+ 10) /* 2.0.10 */
+#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE <  (2 *65536+ 6 *256+ 19) /* 2.6.19 */
 eat flaming death
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "eat flaming death" >/dev/null 2>&1; then :
-  libc_cv_linux2010='TOO OLD!'
-else
-  libc_cv_linux2010='2.0.10 or later'
+  libc_cv_linux2619='TOO OLD!'
+else
+  libc_cv_linux2619='2.6.19 or later'
 fi
 rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux2010" >&5
-$as_echo "$libc_cv_linux2010" >&6; }
-if test "$libc_cv_linux2010" != '2.0.10 or later'; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux2619" >&5
+$as_echo "$libc_cv_linux2619" >&6; }
+if test "$libc_cv_linux2619" != '2.6.19 or later'; then
   as_fn_error $? "GNU libc requires kernel header files from
-Linux 2.0.10 or later to be installed before configuring.
+Linux 2.6.19 or later to be installed before configuring.
 The kernel header files are found usually in /usr/include/asm and
 /usr/include/linux; make sure these directories use files from
-Linux 2.0.10 or later.  This check uses <linux/version.h>, so
+Linux 2.6.19 or later.  This check uses <linux/version.h>, so
 make sure that file was built correctly when installing the kernel header
 files.  To use kernel headers not from /usr/include/linux, use the
 configure option --with-headers." "$LINENO" 5

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in Tue Feb 28 00:02:02 2012
@@ -5,7 +5,7 @@
 # existing system library, because we are the only system library.
 inhibit_glue=yes
 
-define([LIBC_LINUX_VERSION],[2.0.10])dnl
+define([LIBC_LINUX_VERSION],[2.6.19])dnl
 if test -n "$sysheaders"; then
   OLD_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/siginfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/siginfo.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/siginfo.h Tue Feb 28 00:02:02 2012
@@ -273,7 +273,7 @@
 
 /* Forward declaration.  */
 # ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 #  define __have_pthread_attr_t	1
 # endif
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h Tue Feb 28 00:02:02 2012
@@ -280,7 +280,7 @@
 
 /* Forward declaration.  */
 # ifndef __have_pthread_attr_t
-typedef union __pthread_attr pthread_attr_t;
+typedef union pthread_attr_t pthread_attr_t;
 #  define __have_pthread_attr_t	1
 # endif
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h Tue Feb 28 00:02:02 2012
@@ -422,6 +422,7 @@
 
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
 /* Receive a message as described by MESSAGE from socket FD.
    Returns the number of bytes read or -1 for errors.
 
@@ -430,6 +431,7 @@
 extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
 		     unsigned int __vlen, int __flags,
 		     const struct timespec *__tmo);
+#endif
 
 __END_DECLS
 

Modified: fsf/trunk/libc/termios/termios.h
==============================================================================
--- fsf/trunk/libc/termios/termios.h (original)
+++ fsf/trunk/libc/termios/termios.h Tue Feb 28 00:02:02 2012
@@ -95,7 +95,7 @@
 extern int tcflow (int __fd, int __action) __THROW;
 
 
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
 /* Get process group ID for session leader for controlling terminal FD.  */
 extern __pid_t tcgetsid (int __fd) __THROW;
 #endif

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