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

[Commits] r18237 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/pthread/ scripts/ sysdeps/generic/ sysdeps/gnu/ sysdeps/ieee754/ldbl-128i...



Author: eglibc
Date: Fri Apr 27 00:01:32 2012
New Revision: 18237

Log:
Import glibc-mainline for 2012-04-27

Added:
    fsf/trunk/libc/sysdeps/unix/sysv/linux/tcsendbrk.c
Removed:
    fsf/trunk/libc/sysdeps/generic/libgcc_s.h
    fsf/trunk/libc/sysdeps/unix/common/tcsendbrk.c
    fsf/trunk/libc/sysdeps/unix/i386/brk.S
    fsf/trunk/libc/sysdeps/unix/i386/dl-brk.S
    fsf/trunk/libc/sysdeps/unix/i386/pipe.S
    fsf/trunk/libc/sysdeps/unix/i386/sigreturn.S
    fsf/trunk/libc/sysdeps/unix/i386/syscall.S
    fsf/trunk/libc/sysdeps/unix/i386/vfork.S
    fsf/trunk/libc/sysdeps/unix/i386/wait.S
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c
    fsf/trunk/libc/scripts/test-installation.pl
    fsf/trunk/libc/shlib-versions
    fsf/trunk/libc/sysdeps/generic/framestate.c
    fsf/trunk/libc/sysdeps/gnu/unwind-resume.c
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_ctanl.c
    fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
    fsf/trunk/libc/sysdeps/sparc/sparc32/bits/atomic.h
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Apr 27 00:01:32 2012
@@ -1,3 +1,84 @@
+2012-04-26  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/i386/brk.S: Remove file.
+	* sysdeps/unix/i386/dl-brk.S: Likewise.
+	* sysdeps/unix/i386/pipe.S: Likewise.
+	* sysdeps/unix/i386/sigreturn.S: Likewise.
+	* sysdeps/unix/i386/syscall.S: Likewise.
+	* sysdeps/unix/i386/vfork.S: Likewise.
+	* sysdeps/unix/i386/wait.S: Likewise.
+
+	* sysdeps/unix/common/tcsendbrk.c: Move to ...
+	* sysdeps/unix/sysv/linux/tcsendbrk.c: ... here.
+
+	* configure.in (arm*-none*): Do not allow without
+	--enable-hacker-mode.
+	(netbsd*): Remove case setting base_os.
+	(386bsd*): Likewise.
+	(freebsd*): Likewise.
+	(bsdi*): Likewise.
+	(osf*): Likewise.
+	(sunos*): Likewise.
+	(ultrix*): Likewise.
+	(newsos*): Likewise.
+	(dynix*): Likewise.
+	(*bsd*): Likewise.
+	(sysv*): Likewise.
+	(isc*): Likewise.
+	(esix*): Likewise.
+	(sco*): Likewise.
+	(minix*): Likewise.
+	(irix4*): Likewise.
+	(irix6*): Likewise.
+	(solaris[2-9]*): Likewise.
+	(none): Likewise.
+	* configure: Regenerated.
+
+2012-04-26  Adhemerval Zanella  <azanella@xxxxxxxxxxxxxxxxxx>
+
+	[BZ #11521]
+	* sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c (__ctanhl): Avoid internal
+	overflow or cancellation in calculating denominator.
+	* sysdeps/ieee754/ldbl-128ibm/s_ctanl.c (__ctanl): Likewise.
+	* sysdeps/ieee754/ldbl-128ibm/e_sinhl.c (__ieee754_sinhl): Breaking
+	down expression to avoid unexpected rounding in newer GCCs.
+	* sysdeps/powerpc/fpu/libm-test-ulps: Update for ctan, ctanh fix.
+
+2012-04-26  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S: Generate
+	long-double compat symbols.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S: Likewise.
+
+2012-04-25  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/sparc/sparc32/bits/atomic.h: Include sysdep.h to get
+	HWCAP_* values only after the memory barriers have been defined.
+	(atomic_full_barrier): Define.
+	(atomic_read_barrier): Define.
+	(atomic_write_barrier): Define.
+
+2012-04-26  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* shlib-versions: Add libgcc_s version information.
+	* sysdeps/generic/libgcc_s.h: Remove.
+	* sysdeps/generic/framestate.c: Include gnu/lib-names.h instead of
+	libgcc_s.h.
+	* sysdeps/gnu/unwind-resume.c: Likewise.
+	* scripts/test-installation.pl: Remove libgcc_s from link_libs.
+
 2012-04-25  David S. Miller  <davem@xxxxxxxxxxxxx>
 
 	* sysdeps/unix/sparc/brk.S: Delete.

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Fri Apr 27 00:01:32 2012
@@ -3982,7 +3982,7 @@
 ###
 if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
   case "$machine-$host_os" in
-  *-linux* | *-gnu* | arm*-none*)
+  *-linux* | *-gnu*)
     ;;
   *)
     echo "*** The GNU C library is currently not available for this platform."
@@ -4177,18 +4177,8 @@
 test "x$base_os" != x || case "$os" in
 gnu*)
   base_os=mach/hurd ;;
-netbsd* | 386bsd* | freebsd* | bsdi*)
-  base_os=unix/bsd/bsd4.4 ;;
-osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
-  base_os=unix/bsd ;;
-sysv* | isc* | esix* | sco* | minix* | irix4* | linux*)
+linux*)
   base_os=unix/sysv ;;
-irix6*)
-  base_os=unix/sysv/irix6/$os ;;
-solaris[2-9]*)
-  base_os=unix/sysv/sysv4 ;;
-none)
-  base_os=standalone ;;
 esac
 
 # For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Fri Apr 27 00:01:32 2012
@@ -463,7 +463,7 @@
 ###
 if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
   case "$machine-$host_os" in
-  *-linux* | *-gnu* | arm*-none*)
+  *-linux* | *-gnu*)
     ;;
   *)
     echo "*** The GNU C library is currently not available for this platform."
@@ -615,18 +615,8 @@
 test "x$base_os" != x || case "$os" in
 gnu*)
   base_os=mach/hurd ;;
-netbsd* | 386bsd* | freebsd* | bsdi*)
-  base_os=unix/bsd/bsd4.4 ;;
-osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
-  base_os=unix/bsd ;;
-sysv* | isc* | esix* | sco* | minix* | irix4* | linux*)
+linux*)
   base_os=unix/sysv ;;
-irix6*)
-  base_os=unix/sysv/irix6/$os ;;
-solaris[2-9]*)
-  base_os=unix/sysv/sysv4 ;;
-none)
-  base_os=standalone ;;
 esac
 
 # For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Apr 27 00:01:32 2012
@@ -1,3 +1,8 @@
+2012-04-26  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
+	instead of libgcc_s.h.
+
 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@xxxxxxxxxx>
 
 	* sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.

Modified: fsf/trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c Fri Apr 27 00:01:32 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005, 2006, 2009, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>.
 
@@ -21,7 +21,7 @@
 #include <unwind.h>
 #include <pthreadP.h>
 #include <sysdep.h>
-#include <libgcc_s.h>
+#include <gnu/lib-names.h>
 
 static void *libgcc_s_handle;
 static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);

Modified: fsf/trunk/libc/scripts/test-installation.pl
==============================================================================
--- fsf/trunk/libc/scripts/test-installation.pl (original)
+++ fsf/trunk/libc/scripts/test-installation.pl Fri Apr 27 00:01:32 2012
@@ -1,5 +1,5 @@
 #! /usr/bin/perl -w
-# Copyright (C) 1997, 1998, 1999, 2004, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Andreas Jaeger <aj@xxxxxxxxxxxxxxxxxxxxxx>, 1997.
 
@@ -105,9 +105,10 @@
     # - libnss1_* from glibc-compat add-on
     # - libthread_db since it contains unresolved references
     # - it's just a test NSS module
+    # - We don't provide the libgcc so we don't test it
     if ($name ne "nss_ldap" && $name ne "db1"
 	&& !($name =~/^nss1_/) && $name ne "thread_db"
-	&& $name ne "nss_test1") {
+	&& $name ne "nss_test1" && $name ne "libgcc_s") {
       $link_libs .= " -l$name";
       $versions{$name} = $version;
     }

Modified: fsf/trunk/libc/shlib-versions
==============================================================================
--- fsf/trunk/libc/shlib-versions (original)
+++ fsf/trunk/libc/shlib-versions Fri Apr 27 00:01:32 2012
@@ -124,3 +124,7 @@
 
 # The asynchronous name lookup library.
 .*-.*-.*		libanl=1
+
+# This defines the libgcc soname version this glibc is to load for
+# asynchronous cancellation to work correctly.
+.*-.*-.*		libgcc_s=1

Modified: fsf/trunk/libc/sysdeps/generic/framestate.c
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/framestate.c (original)
+++ fsf/trunk/libc/sysdeps/generic/framestate.c Fri Apr 27 00:01:32 2012
@@ -1,5 +1,5 @@
 /* __frame_state_for unwinder helper function wrapper.
-   Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 2001.
 
@@ -23,7 +23,7 @@
 #define __frame_state_for fallback_frame_state_for
 #include <unwind-dw2.c>
 #undef __frame_state_for
-#include <libgcc_s.h>
+#include <gnu/lib-names.h>
 
 typedef struct frame_state * (*framesf)(void *pc, struct frame_state *);
 struct frame_state *__frame_state_for (void *pc,

Removed: fsf/trunk/libc/sysdeps/generic/libgcc_s.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/libgcc_s.h (original)
+++ fsf/trunk/libc/sysdeps/generic/libgcc_s.h (removed)
@@ -1,2 +1,0 @@
-/* Name of libgcc_s library provided by gcc.  */
-#define LIBGCC_S_SO "libgcc_s.so.1"

Modified: fsf/trunk/libc/sysdeps/gnu/unwind-resume.c
==============================================================================
--- fsf/trunk/libc/sysdeps/gnu/unwind-resume.c (original)
+++ fsf/trunk/libc/sysdeps/gnu/unwind-resume.c Fri Apr 27 00:01:32 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>.
 
@@ -19,7 +19,7 @@
 #include <dlfcn.h>
 #include <stdio.h>
 #include <unwind.h>
-#include <libgcc_s.h>
+#include <gnu/lib-names.h>
 
 static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
 static _Unwind_Reason_Code (*libgcc_s_personality)

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c Fri Apr 27 00:01:32 2012
@@ -54,7 +54,8 @@
 		if(shuge+x>one) return x;/* sinhl(tiny) = tiny with inexact */
 	    t = __expm1l(fabsl(x));
 	    if(ix<0x3ff0000000000000LL) return h*(2.0*t-t*t/(t+one));
-	    return h*(t+t/(t+one));
+	    w = t/(t+one);
+	    return h*(t+w);
 	}
 
     /* |x| in [40, log(maxdouble)] return 0.5*exp(|x|) */

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c Fri Apr 27 00:01:32 2012
@@ -1,5 +1,5 @@
 /* Complex hyperbole tangent for long double.  IBM extended format version.
-   Copyright (C) 1997,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -19,6 +19,7 @@
 
 #include <complex.h>
 #include <fenv.h>
+#include <float.h>
 #include <math.h>
 #include <math_ldbl_opt.h>
 
@@ -54,24 +55,44 @@
     }
   else
     {
-      long double sin2ix, cos2ix;
+      long double sinix, cosix;
       long double den;
+      const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l / 2);
 
-      __sincosl (2.0 * __imag__ x, &sin2ix, &cos2ix);
+      /* tanh(x+iy) = (sinh(2x) + i*sin(2y))/(cosh(2x) + cos(2y))
+        = (sinh(x)*cosh(x) + i*sin(y)*cos(y))/(sinh(x)^2 + cos(y)^2).  */
 
-      den = (__ieee754_coshl (2.0 * __real__ x) + cos2ix);
+      __sincosl (__imag__ x, &sinix, &cosix);
 
-      if (den == 0.0L)
+      if (fabsl (__real__ x) > t)
 	{
-	  __complex__ long double ez = __cexpl (x);
-	  __complex__ long double emz = __cexpl (-x);
-
-	  res = (ez - emz) / (ez + emz);
+	  /* Avoid intermediate overflow when the imaginary part of
+	     the result may be subnormal.  Ignoring negligible terms,
+	     the real part is +/- 1, the imaginary part is
+	     sin(y)*cos(y)/sinh(x)^2 = 4*sin(y)*cos(y)/exp(2x).  */
+	  long double exp_2t = __ieee754_expl (2 * t);
+	  __real__ res = __copysignl (1.0, __real__ x);
+	  __imag__ res = 4 * sinix * cosix;
+	  __real__ x = fabsl (__real__ x);
+	  __real__ x -= t;
+	  __imag__ res /= exp_2t;
+	  if (__real__ x > t)
+	    {
+	      /* Underflow (original real part of x has absolute value
+		 > 2t).  */
+	      __imag__ res /= exp_2t;
+	    }
+	  else
+	    __imag__ res /= __ieee754_expl (2 * __real__ x);
 	}
       else
 	{
-	  __real__ res = __ieee754_sinhl (2.0 * __real__ x) / den;
-	  __imag__ res = sin2ix / den;
+	  long double sinhrx = __ieee754_sinhl (__real__ x);
+	  long double coshrx = __ieee754_coshl (__real__ x);
+
+	  den = sinhrx * sinhrx + cosix * cosix;
+	  __real__ res = sinhrx * coshrx / den;
+	  __imag__ res = sinix * cosix / den;
 	}
       /* __gcc_qmul does not respect -0.0 so we need the following fixup.  */
       if ((__real__ res == 0.0) && (__real__ x == 0.0))

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_ctanl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_ctanl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_ctanl.c Fri Apr 27 00:01:32 2012
@@ -1,5 +1,5 @@
 /* Complex tangent function for long double.  IBM extended format version.
-   Copyright (C) 1997,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -21,6 +21,7 @@
 #include <fenv.h>
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <float.h>
 
 #include <math_private.h>
 
@@ -46,34 +47,53 @@
 	  __real__ res = __nanl ("");
 	  __imag__ res = __nanl ("");
 
-#ifdef FE_INVALID
-	  if (__isinfl (__real__ x))
+	  if (__isinf_nsl (__real__ x))
 	    feraiseexcept (FE_INVALID);
-#endif
 	}
     }
   else
     {
-      long double sin2rx, cos2rx;
+      long double sinrx, cosrx;
       long double den;
+      const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l / 2);
 
-      __sincosl (2.0 * __real__ x, &sin2rx, &cos2rx);
+      /* tan(x+iy) = (sin(2x) + i*sinh(2y))/(cos(2x) + cosh(2y))
+        = (sin(x)*cos(x) + i*sinh(y)*cosh(y)/(cos(x)^2 + sinh(y)^2). */
 
-      den = cos2rx + __ieee754_coshl (2.0 * __imag__ x);
+      __sincosl (__real__ x, &sinrx, &cosrx);
 
+      if (fabsl (__imag__ x) > t)
+	{
+	  /* Avoid intermediate overflow when the real part of the
+	    result may be subnormal.  Ignoring negligible terms, the
+	    imaginary part is +/- 1, the real part is
+	    sin(x)*cos(x)/sinh(y)^2 = 4*sin(x)*cos(x)/exp(2y).  */
+	  long double exp_2t = __ieee754_expl (2 * t);
 
-      if (den == 0.0)
-	{
-	  __complex__ long double ez = __cexpl (1.0i * x);
-	  __complex__ long double emz = __cexpl (-1.0i * x);
-
-	  res = (ez - emz) / (ez + emz) * -1.0i;
+	  __imag__ res = __copysignl (1.0, __imag__ x);
+	  __real__ res = 4 * sinrx * cosrx;
+	  __imag__ x = fabsl (__imag__ x);
+	  __imag__ x -= t;
+	  __real__ res /= exp_2t;
+	  if (__imag__ x > t)
+	    {
+	      /* Underflow (original imaginary part of x has absolute
+		 value > 2t).  */
+	      __real__ res /= exp_2t;
+	    }
+	  else
+	    __real__ res /= __ieee754_expl (2 * __imag__ x);
 	}
       else
 	{
-	  __real__ res = sin2rx / den;
-	  __imag__ res = __ieee754_sinhl (2.0 * __imag__ x) / den;
+	  long double sinhix = __ieee754_sinhl (__imag__ x);
+	  long double coshix = __ieee754_coshl (__imag__ x);
+
+	  den = cosrx * cosrx + sinhix * sinhix;
+	  __real__ res = sinrx * cosrx / den;
+	  __imag__ res = sinhix * coshix / den;
 	}
+
       /* __gcc_qmul does not respect -0.0 so we need the following fixup.  */
       if ((__real__ res == 0.0) && (__real__ x == 0.0))
         __real__ res = __real__ x;

Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps Fri Apr 27 00:01:32 2012
@@ -1051,16 +1051,44 @@
 
 # ctan
 Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
-double: 1
-idouble: 1
+float: 1
+ifloat: 1
+double: 1
+idouble: 1
+ldouble: 1
+ildouble: 1
+Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i":
+ldouble: 2
+ildouble: 2
 Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
-ildouble: 1
-ldouble: 1
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
+double: 1
+idouble: 1
+Test "Real part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
+float: 1
+ifloat: 1
+double: 1
+idouble: 1
+Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i":
+float: 1
+ifloat: 1
 
 # ctanh
 Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -1068,14 +1096,43 @@
 float: 2
 idouble: 1
 ifloat: 2
+Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+double: 1
+idouble: 1
 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
 float: 1
 ifloat: 1
+double: 1
+idouble: 1
 Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
 double: 1
 idouble: 1
 ildouble: 1
-ldouble: 1
+ldouble: 3
+ildouble: 3
+Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+float: 1
+ifloat: 1
+ldouble: 2
+ildouble: 2
+Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i":
+ldouble: 2
+ildouble: 2
+Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+double: 1
+idouble: 1
+Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+float: 1
+ifloat: 1
+double: 1
+idouble: 1
+Test "Imaginary part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+float: 1
+ifloat: 1
+double: 1
 
 # erf
 Test "erf (1.25) == 0.922900128256458230136523481197281140":
@@ -2309,12 +2366,16 @@
 ldouble: 1
 
 Function: Real part of "ctan":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: Imaginary part of "ctan":
+float: 1
+ifloat: 1
 double: 1
 idouble: 1
 ildouble: 1
@@ -2325,14 +2386,16 @@
 float: 2
 idouble: 1
 ifloat: 2
-ildouble: 1
-ldouble: 1
+ildouble: 3
+ldouble: 3
 
 Function: Imaginary part of "ctanh":
 float: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: "erf":
 double: 1

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/bits/atomic.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/bits/atomic.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/bits/atomic.h Fri Apr 27 00:01:32 2012
@@ -21,7 +21,6 @@
 #define _BITS_ATOMIC_H	1
 
 #include <stdint.h>
-#include <sysdep.h>
 
 typedef int8_t atomic8_t;
 typedef uint8_t uatomic8_t;
@@ -231,6 +230,10 @@
        abort ();						      \
      __v7_exchange_24_rel (mem, newval); })
 
+# define atomic_full_barrier() __asm ("" ::: "memory")
+# define atomic_read_barrier() atomic_full_barrier ()
+# define atomic_write_barrier() atomic_full_barrier ()
+
 #else
 
 /* In libc.a/libpthread.a etc. we don't know if we'll be run on
@@ -319,6 +322,35 @@
        __acev_w24ret = __v7_exchange_24_rel (mem, newval);	      \
      __acev_w24ret; })
 
+#define atomic_full_barrier()						\
+  do {									\
+     if (__atomic_is_v9)						\
+       /* membar #LoadLoad | #LoadStore | #StoreLoad | #StoreStore */	\
+       __asm __volatile (".word 0x8143e00f" : : : "memory");		\
+     else								\
+       __asm __volatile ("" : : : "memory");				\
+  } while (0)
+
+#define atomic_read_barrier()						\
+  do {									\
+     if (__atomic_is_v9)						\
+       /* membar #LoadLoad | #LoadStore */				\
+       __asm __volatile (".word 0x8143e005" : : : "memory");		\
+     else								\
+       __asm __volatile ("" : : : "memory");				\
+  } while (0)
+
+#define atomic_write_barrier()						\
+  do {									\
+     if (__atomic_is_v9)						\
+       /* membar  #StoreLoad | #StoreStore */				\
+       __asm __volatile (".word 0x8143e00a" : : : "memory");		\
+     else								\
+       __asm __volatile ("" : : : "memory");				\
+  } while (0)
+
 #endif
 
+#include <sysdep.h>
+
 #endif	/* bits/atomic.h */

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S Fri Apr 27 00:01:32 2012
@@ -1,11 +1,18 @@
 #include <sparc-ifunc.h>
+#include <math_ldbl_opt.h>
 
 SPARC_ASM_VIS3_IFUNC(ceil)
 
 weak_alias (__ceil, ceil)
 
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __ceil, ceill, GLIBC_2_0)
+#endif
+
 # undef weak_alias
 # define weak_alias(a, b)
+# undef compat_symbol
+# define compat_symbol(a, b, c, d)
 
 #define __ceil __ceil_generic
 

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S Fri Apr 27 00:01:32 2012
@@ -1,11 +1,18 @@
 #include <sparc-ifunc.h>
+#include <math_ldbl_opt.h>
 
 SPARC_ASM_VIS3_IFUNC(floor)
 
 weak_alias (__floor, floor)
 
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __floor, floorl, GLIBC_2_0)
+#endif
+
 # undef weak_alias
 # define weak_alias(a, b)
+# undef compat_symbol
+# define compat_symbol(a, b, c, d)
 
 #define __floor __floor_generic
 

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S Fri Apr 27 00:01:32 2012
@@ -1,11 +1,18 @@
 #include <sparc-ifunc.h>
+#include <math_ldbl_opt.h>
 
 SPARC_ASM_VIS3_IFUNC(fmax)
 
 weak_alias (__fmax, fmax)
 
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
+#endif
+
 # undef weak_alias
 # define weak_alias(a, b)
+# undef compat_symbol
+# define compat_symbol(a, b, c, d)
 
 #define __fmax __fmax_generic
 

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S Fri Apr 27 00:01:32 2012
@@ -1,11 +1,18 @@
 #include <sparc-ifunc.h>
+#include <math_ldbl_opt.h>
 
 SPARC_ASM_VIS3_IFUNC(fmin)
 
 weak_alias (__fmin, fmin)
 
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
+#endif
+
 # undef weak_alias
 # define weak_alias(a, b)
+# undef compat_symbol
+# define compat_symbol(a, b, c, d)
 
 #define __fmin __fmin_generic
 

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S Fri Apr 27 00:01:32 2012
@@ -1,4 +1,5 @@
 #include <sparc-ifunc.h>
+#include <math_ldbl_opt.h>
 
 SPARC_ASM_VIS3_IFUNC(llrint)
 
@@ -7,10 +8,16 @@
 strong_alias (__llrint, __lllrint)
 weak_alias (__lllrint, lllrint)
 
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
+#endif
+
 # undef weak_alias
 # define weak_alias(a, b)
 # undef strong_alias
 # define strong_alias(a, b)
+# undef compat_symbol
+# define compat_symbol(a, b, c, d)
 
 #define __llrint __llrint_generic
 

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S Fri Apr 27 00:01:32 2012
@@ -1,11 +1,18 @@
 #include <sparc-ifunc.h>
+#include <math_ldbl_opt.h>
 
 SPARC_ASM_VIS3_IFUNC(rint)
 
 weak_alias (__rint, rint)
 
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __rint, rintl, GLIBC_2_0)
+#endif
+
 # undef weak_alias
 # define weak_alias(a, b)
+# undef compat_symbol
+# define compat_symbol(a, b, c, d)
 
 #define __rint __rint_generic
 

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S Fri Apr 27 00:01:32 2012
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <math_ldbl_opt.h>
 
 	/* Since changing the rounding mode is extremely expensive, we
 	   try to round up using a method that is rounding mode
@@ -85,3 +86,7 @@
 	 for	%f0, SIGN_BIT, %f0
 END (__ceil)
 weak_alias (__ceil, ceil)
+
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __ceil, ceill, GLIBC_2_0)
+#endif

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S Fri Apr 27 00:01:32 2012
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <math_ldbl_opt.h>
 
 	/* Since changing the rounding mode is extremely expensive, we
 	   try to round up using a method that is rounding mode
@@ -85,3 +86,7 @@
 	 for	%f0, SIGN_BIT, %f0
 END (__floor)
 weak_alias (__floor, floor)
+
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __floor, floorl, GLIBC_2_0)
+#endif

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S Fri Apr 27 00:01:32 2012
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <math_ldbl_opt.h>
 
 #define SIGN_BIT	%f12			/* -0.0 */
 
@@ -38,3 +39,7 @@
 	 fandnot2 %f0, %f4, %f0
 END (__fmax)
 weak_alias (__fmax, fmax)
+
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
+#endif

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S Fri Apr 27 00:01:32 2012
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <math_ldbl_opt.h>
 
 #define SIGN_BIT	%f12			/* -0.0 */
 
@@ -38,3 +39,7 @@
 	 for	%f0, %f4, %f0
 END (__fmin)
 weak_alias (__fmin, fmin)
+
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
+#endif

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S Fri Apr 27 00:01:32 2012
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <math_ldbl_opt.h>
 
 ENTRY (__isnan)
 	sethi	%hi(0x7ff00000), %g1
@@ -30,3 +31,10 @@
 END (__isnan)
 hidden_def (__isnan)
 weak_alias (__isnan, isnan)
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
+# endif
+#endif

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S Fri Apr 27 00:01:32 2012
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <math_ldbl_opt.h>
 
 	/* We pop constants into the FPU registers using the incoming
 	   argument stack slots, since this avoid having to use any PIC
@@ -65,3 +66,7 @@
 	 ldd	[%sp + 72], %o0
 END (__llrint)
 weak_alias (__llrint, llrint)
+
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
+#endif

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S Fri Apr 27 00:01:32 2012
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <math_ldbl_opt.h>
 
 	/* We pop constants into the FPU registers using the incoming
 	   argument stack slots, since this avoid having to use any PIC
@@ -65,3 +66,7 @@
 	 ld	[%sp + 72], %o0
 END (__lrint)
 weak_alias (__lrint, lrint)
+
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lrint, lrintl, GLIBC_2_1)
+#endif

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S Fri Apr 27 00:01:32 2012
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <math_ldbl_opt.h>
 
 	/* We pop constants into the FPU registers using the incoming
 	   argument stack slots, since this avoid having to use any PIC
@@ -62,3 +63,7 @@
 	 for	%f0, SIGN_BIT, %f0
 END (__rint)
 weak_alias (__rint, rint)
+
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __rint, rintl, GLIBC_2_0)
+#endif

Removed: fsf/trunk/libc/sysdeps/unix/common/tcsendbrk.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/common/tcsendbrk.c (original)
+++ fsf/trunk/libc/sysdeps/unix/common/tcsendbrk.c (removed)
@@ -1,45 +1,0 @@
-/* Send break to terminal.
-   Copyright (C) 1996, 1997 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/>.  */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-
-/* Send zero bits on FD.  */
-int
-tcsendbreak (int fd, int duration)
-{
-  /* The break lasts 0.25 to 0.5 seconds if DURATION is zero,
-     and an implementation-defined period if DURATION is nonzero.
-     We define a positive DURATION to be number of milliseconds to break.  */
-  if (duration <= 0)
-    return __ioctl (fd, TCSBRK, 0);
-
-#ifdef TCSBRKP
-  /* Probably Linux-specific: a positive third TCSBRKP ioctl argument is
-     defined to be the number of 100ms units to break.  */
-  return __ioctl (fd, TCSBRKP, (duration + 99) / 100);
-#else
-  /* ioctl can't send a break of any other duration for us.
-     This could be changed to use trickery (e.g. lower speed and
-     send a '\0') to send the break, but for now just return an error.  */
-  __set_errno (EINVAL);
-  return -1;
-#endif
-}

Removed: fsf/trunk/libc/sysdeps/unix/i386/brk.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/i386/brk.S (original)
+++ fsf/trunk/libc/sysdeps/unix/i386/brk.S (removed)
@@ -1,46 +1,0 @@
-/* Copyright (C) 1991,92,93,95,97,2002,2005 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/>.  */
-
-#include <sysdep.h>
-
-#ifndef	SYS_brk
-#define	SYS_brk	17
-#endif
-
-.data
-.globl C_SYMBOL_NAME(__curbrk)
-C_LABEL(__curbrk)
-	.long C_SYMBOL_NAME(_end)
-
-.text
-SYSCALL__ (brk, 1)
-	movl 4(%esp), %eax
-#ifdef	PIC
-	/* Standard PIC nonsense to store into `__curbrk' through the GOT.  */
-	call L(here)
-L(here): popl %ecx
-	addl $_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ecx
-	movl C_SYMBOL_NAME(__curbrk@GOT)(%ecx), %ecx
-	movl %eax, (%ecx)
-#else
-	movl %eax, C_SYMBOL_NAME(__curbrk)
-#endif
-	xorl %eax, %eax
-	ret
-PSEUDO_END (__brk)
-
-weak_alias (__brk, brk)

Removed: fsf/trunk/libc/sysdeps/unix/i386/dl-brk.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/i386/dl-brk.S (original)
+++ fsf/trunk/libc/sysdeps/unix/i386/dl-brk.S (removed)
@@ -1,1 +1,0 @@
-#include <brk.S>

Removed: fsf/trunk/libc/sysdeps/unix/i386/pipe.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/i386/pipe.S (original)
+++ fsf/trunk/libc/sysdeps/unix/i386/pipe.S (removed)
@@ -1,29 +1,0 @@
-/* Copyright (C) 1991,92,93,95,97,2002 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/>.  */
-
-#include <sysdep.h>
-
-SYSCALL__ (pipe, 1)
-	movl 4(%esp), scratch
-	movl %eax, (scratch)
-	movl r1, 4(scratch)
-	xorl %eax, %eax
-	ret
-PSEUDO_END (__pipe)
-
-libc_hidden_def (__pipe)
-weak_alias (__pipe, pipe)

Removed: fsf/trunk/libc/sysdeps/unix/i386/sigreturn.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/i386/sigreturn.S (original)
+++ fsf/trunk/libc/sysdeps/unix/i386/sigreturn.S (removed)
@@ -1,26 +1,0 @@
-/* Copyright (C) 1992, 1993, 1995, 1997 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/>.  */
-
-#include <sysdep.h>
-
-.text
-ENTRY (__sigreturn)
-	addl $4, %esp		/* Pop the return PC.  */
-	DO_CALL (sigreturn, 0)	/* Do the system call; it never returns.  */
-	/* NOTREACHED */
-
-weak_alias (__sigreturn, sigreturn)

Removed: fsf/trunk/libc/sysdeps/unix/i386/syscall.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/i386/syscall.S (original)
+++ fsf/trunk/libc/sysdeps/unix/i386/syscall.S (removed)
@@ -1,27 +1,0 @@
-/* Copyright (C) 1993, 1995, 1997 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/>.  */
-
-#include <sysdep.h>
-
-.globl syscall_error
-ENTRY (syscall)
-	popl %ecx		/* Pop return address into %ecx.  */
-	popl %eax		/* Pop syscall number into %eax.  */
-	pushl %ecx		/* Push back return address.  */
-	.byte 0x9a, 0, 0, 0, 0, 7, 0 /* lcall $7, $0 -- gas bug */
-	jb JUMPTARGET(syscall_error)
-	ret

Removed: fsf/trunk/libc/sysdeps/unix/i386/vfork.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/i386/vfork.S (original)
+++ fsf/trunk/libc/sysdeps/unix/i386/vfork.S (removed)
@@ -1,23 +1,0 @@
-/* Copyright (C) 1994, 1997 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/>.  */
-
-#include <sysdep.h>
-
-/* Go directly into __vfork, don't do anything with the stack ptr.  */
-
-ENTRY(vfork)
-	jmp __vfork

Removed: fsf/trunk/libc/sysdeps/unix/i386/wait.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/i386/wait.S (original)
+++ fsf/trunk/libc/sysdeps/unix/i386/wait.S (removed)
@@ -1,28 +1,0 @@
-/* Copyright (C) 1991,92,93,95,97,2002 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/>.  */
-
-#include <sysdep.h>
-
-SYSCALL__ (wait, 1)
-	movl 4(%esp), scratch	/* Put status pointer in scratch register.  */
-	testl scratch, scratch	/* Is it non-nil?  */
-	je null
-	movl r1, (scratch)	/* Yes; store the status there.  */
-null:	ret
-PSEUDO_END (__wait)
-
-weak_alias (__wait, wait)

Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/tcsendbrk.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/tcsendbrk.c (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/tcsendbrk.c Fri Apr 27 00:01:32 2012
@@ -1,0 +1,45 @@
+/* Send break to terminal.
+   Copyright (C) 1996, 1997 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/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <termios.h>
+#include <sys/ioctl.h>
+
+/* Send zero bits on FD.  */
+int
+tcsendbreak (int fd, int duration)
+{
+  /* The break lasts 0.25 to 0.5 seconds if DURATION is zero,
+     and an implementation-defined period if DURATION is nonzero.
+     We define a positive DURATION to be number of milliseconds to break.  */
+  if (duration <= 0)
+    return __ioctl (fd, TCSBRK, 0);
+
+#ifdef TCSBRKP
+  /* Probably Linux-specific: a positive third TCSBRKP ioctl argument is
+     defined to be the number of 100ms units to break.  */
+  return __ioctl (fd, TCSBRKP, (duration + 99) / 100);
+#else
+  /* ioctl can't send a break of any other duration for us.
+     This could be changed to use trickery (e.g. lower speed and
+     send a '\0') to send the break, but for now just return an error.  */
+  __set_errno (EINVAL);
+  return -1;
+#endif
+}

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