diff options
Diffstat (limited to 'sysdeps')
33 files changed, 225 insertions, 78 deletions
diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c index 77d4cc1180..79aa970ac0 100644 --- a/sysdeps/alpha/fpu/feholdexcpt.c +++ b/sysdeps/alpha/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson <rth@tamu.edu>, 1997 @@ -31,3 +31,4 @@ feholdexcept (fenv_t *envp) return 0; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c index c4dc196016..54b2bcf673 100644 --- a/sysdeps/alpha/fpu/fesetround.c +++ b/sysdeps/alpha/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson <rth@tamu.edu>, 1997 @@ -40,3 +40,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround) diff --git a/sysdeps/generic/clock_gettime.c b/sysdeps/generic/clock_gettime.c index 85bb79c548..ff306120ba 100644 --- a/sysdeps/generic/clock_gettime.c +++ b/sysdeps/generic/clock_gettime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 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 @@ -26,5 +26,6 @@ clock_gettime (clockid_t clock_id, struct timespec *tp) __set_errno (ENOSYS); return -1; } +librt_hidden_def (clock_gettime) stub_warning (clock_gettime) #include <stub-tag.h> diff --git a/sysdeps/generic/feholdexcpt.c b/sysdeps/generic/feholdexcpt.c index 927a6dc95c..8680d1e492 100644 --- a/sysdeps/generic/feholdexcpt.c +++ b/sysdeps/generic/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -25,5 +25,6 @@ feholdexcept (fenv_t *envp) { return 1; /* Signal failure. */ } +libm_hidden_def (feholdexcept) stub_warning (feholdexcept) #include <stub-tag.h> diff --git a/sysdeps/generic/fesetround.c b/sysdeps/generic/fesetround.c index e5a27d2aa0..5b14826390 100644 --- a/sysdeps/generic/fesetround.c +++ b/sysdeps/generic/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -25,5 +25,6 @@ fesetround (int round) { return 1; /* Signal we are unable to set the direction. */ } +libm_hidden_def (fesetround) stub_warning (fesetround) #include <stub-tag.h> diff --git a/sysdeps/generic/s_significand.c b/sysdeps/generic/s_significand.c index 4ab078c473..f95b6481c2 100644 --- a/sysdeps/generic/s_significand.c +++ b/sysdeps/generic/s_significand.c @@ -30,7 +30,7 @@ static char rcsid[] = "$NetBSD: s_significand.c,v 1.6 1995/05/10 20:48:11 jtc Ex double x; #endif { - return __ieee754_scalb(x,(double) -ilogb(x)); + return __ieee754_scalb(x,(double) -__ilogb(x)); } weak_alias (__significand, significand) #ifdef NO_LONG_DOUBLE diff --git a/sysdeps/generic/s_significandf.c b/sysdeps/generic/s_significandf.c index 2893a4e1b7..cf5eb59efc 100644 --- a/sysdeps/generic/s_significandf.c +++ b/sysdeps/generic/s_significandf.c @@ -8,7 +8,7 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ @@ -27,6 +27,6 @@ static char rcsid[] = "$NetBSD: s_significandf.c,v 1.3 1995/05/10 20:48:13 jtc E float x; #endif { - return __ieee754_scalbf(x,(float) -ilogbf(x)); + return __ieee754_scalbf(x,(float) -__ilogbf(x)); } weak_alias (__significandf, significandf) diff --git a/sysdeps/generic/stpncpy_chk.c b/sysdeps/generic/stpncpy_chk.c new file mode 100644 index 0000000000..d136339dea --- /dev/null +++ b/sysdeps/generic/stpncpy_chk.c @@ -0,0 +1,85 @@ +/* Copyright (C) 1993,1995,1996,1997,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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This is almost copied from strncpy.c, written by Torbjorn Granlund. */ + +#include <string.h> + + +/* Copy no more than N characters of SRC to DEST, returning the address of + the terminating '\0' in DEST, if any, or else DEST + N. */ +char * +__stpncpy_chk (char *dest, const char *src, size_t n, size_t destlen) +{ + char c; + char *s = dest; + + if (__builtin_expect (destlen < n, 0)) + __chk_fail (); + + if (n >= 4) + { + size_t n4 = n >> 2; + + for (;;) + { + c = *src++; + *dest++ = c; + if (c == '\0') + break; + c = *src++; + *dest++ = c; + if (c == '\0') + break; + c = *src++; + *dest++ = c; + if (c == '\0') + break; + c = *src++; + *dest++ = c; + if (c == '\0') + break; + if (--n4 == 0) + goto last_chars; + } + n -= dest - s; + goto zero_fill; + } + + last_chars: + n &= 3; + if (n == 0) + return dest; + + for (;;) + { + c = *src++; + --n; + *dest++ = c; + if (c == '\0') + break; + if (n == 0) + return dest; + } + + zero_fill: + while (n-- > 0) + dest[n] = '\0'; + + return dest - 1; +} diff --git a/sysdeps/generic/wordexp.c b/sysdeps/generic/wordexp.c index 06d38f6b24..2eb58089c4 100644 --- a/sysdeps/generic/wordexp.c +++ b/sysdeps/generic/wordexp.c @@ -1798,12 +1798,7 @@ envsubst: if (str[0] == '\0') str = _("parameter null or not set"); -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s: %s\n", env, str); - else -#endif - fprintf (stderr, "%s: %s\n", env, str); + __fxprintf (NULL, "%s: %s\n", env, str); } if (free_value) diff --git a/sysdeps/i386/fpu/feholdexcpt.c b/sysdeps/i386/fpu/feholdexcpt.c index 55096869a1..feaa24b8d9 100644 --- a/sysdeps/i386/fpu/feholdexcpt.c +++ b/sysdeps/i386/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 1999, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -51,3 +51,4 @@ feholdexcept (fenv_t *envp) return 0; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/i386/fpu/fesetround.c b/sysdeps/i386/fpu/fesetround.c index 2746f3ebf3..a868f275f0 100644 --- a/sysdeps/i386/fpu/fesetround.c +++ b/sysdeps/i386/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -50,3 +50,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround) diff --git a/sysdeps/ia64/fpu/feholdexcpt.c b/sysdeps/ia64/fpu/feholdexcpt.c index fd13de6c35..27c9a1109e 100644 --- a/sysdeps/ia64/fpu/feholdexcpt.c +++ b/sysdeps/ia64/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Christian Boissat <Christian.Boissat@cern.ch>, 1999 @@ -31,3 +31,4 @@ feholdexcept (fenv_t *envp) return 1; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/ia64/fpu/fesetround.c b/sysdeps/ia64/fpu/fesetround.c index 26a6be4ea3..351bcc2f10 100644 --- a/sysdeps/ia64/fpu/fesetround.c +++ b/sysdeps/ia64/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Christian Boissat <Christian.Boissat@cern.ch>, 1999. @@ -39,3 +39,4 @@ fesetround (int round) return 1; } +libm_hidden_def (fesetround) diff --git a/sysdeps/ieee754/dbl-64/s_sincos.c b/sysdeps/ieee754/dbl-64/s_sincos.c index f0542c500c..e946f9f976 100644 --- a/sysdeps/ieee754/dbl-64/s_sincos.c +++ b/sysdeps/ieee754/dbl-64/s_sincos.c @@ -1,5 +1,5 @@ /* Compute sine and cosine of argument. - Copyright (C) 1997, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 2001, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -40,8 +40,8 @@ __sincos (double x, double *sinx, double *cosx) } else { - *sinx = sin (x); - *cosx = cos (x); + *sinx = __sin (x); + *cosx = __cos (x); } } weak_alias (__sincos, sincos) diff --git a/sysdeps/ieee754/flt-32/e_atan2f.c b/sysdeps/ieee754/flt-32/e_atan2f.c index 8b3398c0a3..c0cafb16b8 100644 --- a/sysdeps/ieee754/flt-32/e_atan2f.c +++ b/sysdeps/ieee754/flt-32/e_atan2f.c @@ -30,7 +30,7 @@ zero = 0.0, pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */ pi_o_2 = 1.5707963705e+00, /* 0x3fc90fdb */ pi = 3.1415927410e+00, /* 0x40490fdb */ -pi_lo = -8.7422776573e-07; /* 0xb3bbbd2e */ +pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */ #ifdef __STDC__ float __ieee754_atan2f(float y, float x) diff --git a/sysdeps/powerpc/fpu/feholdexcpt.c b/sysdeps/powerpc/fpu/feholdexcpt.c index 8ac875cc72..150becd678 100644 --- a/sysdeps/powerpc/fpu/feholdexcpt.c +++ b/sysdeps/powerpc/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 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 @@ -36,3 +36,4 @@ feholdexcept (fenv_t *envp) return 0; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/powerpc/fpu/fesetround.c b/sysdeps/powerpc/fpu/fesetround.c index f7cd6af135..67518d0df4 100644 --- a/sysdeps/powerpc/fpu/fesetround.c +++ b/sysdeps/powerpc/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -39,3 +39,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround) diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps index 850a10746c..1ea3b60d9d 100644 --- a/sysdeps/powerpc/fpu/libm-test-ulps +++ b/sysdeps/powerpc/fpu/libm-test-ulps @@ -2,17 +2,14 @@ # atan2 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -float: 6 -ifloat: 6 # atanh Test "atanh (0.75) == 0.972955074527656652552676371721589865": @@ -623,8 +620,8 @@ idouble: 1 # Maximal error of functions: Function: "atan2": -float: 6 -ifloat: 6 +float: 1 +ifloat: 1 Function: "atanh": float: 1 diff --git a/sysdeps/s390/fpu/feholdexcpt.c b/sysdeps/s390/fpu/feholdexcpt.c index 7fd7ea53ca..dee44dcee3 100644 --- a/sysdeps/s390/fpu/feholdexcpt.c +++ b/sysdeps/s390/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). @@ -32,3 +32,4 @@ int feholdexcept (fenv_t *envp) _FPU_SETCW ((envp->fpc & ~(FE_ALL_EXCEPT << FPC_EXCEPTION_MASK_SHIFT))); return 0; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/s390/fpu/fesetround.c b/sysdeps/s390/fpu/fesetround.c index 5f510fe0ad..d99f1db181 100644 --- a/sysdeps/s390/fpu/fesetround.c +++ b/sysdeps/s390/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). @@ -35,3 +35,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround) diff --git a/sysdeps/s390/fpu/libm-test-ulps b/sysdeps/s390/fpu/libm-test-ulps index cfade822a3..552ad4afae 100644 --- a/sysdeps/s390/fpu/libm-test-ulps +++ b/sysdeps/s390/fpu/libm-test-ulps @@ -2,17 +2,14 @@ # atan2 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -float: 6 -ifloat: 6 # atanh Test "atanh (0.75) == 0.972955074527656652552676371721589865": @@ -664,8 +661,8 @@ idouble: 1 # Maximal error of functions: Function: "atan2": -float: 6 -ifloat: 6 +float: 1 +ifloat: 1 Function: "atanh": float: 1 diff --git a/sysdeps/s390/s390-64/bcopy.S b/sysdeps/s390/s390-64/bcopy.S index ff7966723b..abcb1fb1b4 100644 --- a/sysdeps/s390/s390-64/bcopy.S +++ b/sysdeps/s390/s390-64/bcopy.S @@ -1,6 +1,6 @@ /* bcopy -- copy a block from source to destination. 64 bit S/390 version. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). The GNU C Library is free software; you can redistribute it and/or @@ -59,14 +59,10 @@ ENTRY(__bcopy) jo .L6 br %r14 .L7: # destructive overlay, can not use mvcle - lgr %r1,%r2 # bcopy is called with source,dest - lgr %r2,%r3 # memmove with dest,source! Oh, well... - lgr %r3,%r1 -#ifdef PIC - jg memmove@PLT -#else - jg memmove -#endif + lgr %r1,%r2 # bcopy is called with source,dest + lgr %r2,%r3 # memmove with dest,source! Oh, well... + lgr %r3,%r1 + jg HIDDEN_BUILTIN_JUMPTARGET(memmove) END(__bcopy) diff --git a/sysdeps/sh/sh4/fpu/feholdexcpt.c b/sysdeps/sh/sh4/fpu/feholdexcpt.c index dafb4f7daa..7aac5a0d39 100644 --- a/sysdeps/sh/sh4/fpu/feholdexcpt.c +++ b/sysdeps/sh/sh4/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 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 @@ -35,3 +35,4 @@ feholdexcept (fenv_t *envp) return 1; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/sh/sh4/fpu/fesetround.c b/sysdeps/sh/sh4/fpu/fesetround.c index 9966838387..cf4349004e 100644 --- a/sysdeps/sh/sh4/fpu/fesetround.c +++ b/sysdeps/sh/sh4/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998. @@ -41,3 +41,4 @@ fesetround (int round) return 1; } +libm_hidden_def (fesetround) diff --git a/sysdeps/sparc/fpu/feholdexcpt.c b/sysdeps/sparc/fpu/feholdexcpt.c index 3bd2b16cf1..729637ad1b 100644 --- a/sysdeps/sparc/fpu/feholdexcpt.c +++ b/sysdeps/sparc/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 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 @@ -33,3 +33,4 @@ feholdexcept (fenv_t *envp) return 0; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/sparc/fpu/fesetround.c b/sysdeps/sparc/fpu/fesetround.c index b18b344516..e3b441cd53 100644 --- a/sysdeps/sparc/fpu/fesetround.c +++ b/sysdeps/sparc/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 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 @@ -35,3 +35,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround) diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c index 8f82ac848d..f698f0151b 100644 --- a/sysdeps/unix/clock_gettime.c +++ b/sysdeps/unix/clock_gettime.c @@ -131,3 +131,4 @@ clock_gettime (clockid_t clock_id, struct timespec *tp) return retval; } +librt_hidden_def (clock_gettime) diff --git a/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c b/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c index ee19161272..39511cd2c5 100644 --- a/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c +++ b/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2003, 2004, 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 @@ -21,7 +21,7 @@ #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> - +#include <not-cancel.h> static int itc_usable; @@ -31,18 +31,18 @@ has_cpuclock (void) if (__builtin_expect (itc_usable == 0, 0)) { int newval = 1; - int fd = open ("/proc/sal/itc_drift", O_RDONLY); + int fd = open_not_cancel_2 ("/proc/sal/itc_drift", O_RDONLY); if (__builtin_expect (fd != -1, 1)) { char buf[16]; /* We expect the file to contain a single digit followed by a newline. If the format changes we better not rely on the file content. */ - if (read (fd, buf, sizeof buf) != 2 || buf[0] != '0' - || buf[1] != '\n') + if (read_not_cancel (fd, buf, sizeof buf) != 2 + || buf[0] != '0' || buf[1] != '\n') newval = -1; - close (fd); + close_not_cancel_no_status (fd); } itc_usable = newval; diff --git a/sysdeps/x86_64/fpu/feholdexcpt.c b/sysdeps/x86_64/fpu/feholdexcpt.c index db53d0f07f..a9b21a3c25 100644 --- a/sysdeps/x86_64/fpu/feholdexcpt.c +++ b/sysdeps/x86_64/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 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 @@ -39,3 +39,4 @@ feholdexcept (fenv_t *envp) return 0; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/x86_64/fpu/fesetround.c b/sysdeps/x86_64/fpu/fesetround.c index 429b7f1d0c..408116eee8 100644 --- a/sysdeps/x86_64/fpu/fesetround.c +++ b/sysdeps/x86_64/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 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 @@ -44,3 +44,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround) diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index b3ce8bfeee..425549dd0e 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -24,17 +24,14 @@ ldouble: 1 # atan2 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -float: 6 -ifloat: 6 # atanh Test "atanh (0.75) == 0.972955074527656652552676371721589865": @@ -953,8 +950,8 @@ ildouble: 1 ldouble: 1 Function: "atan2": -float: 6 -ifloat: 6 +float: 1 +ifloat: 1 Function: "atanh": float: 1 diff --git a/sysdeps/x86_64/fpu/s_sincos.S b/sysdeps/x86_64/fpu/s_sincos.S new file mode 100644 index 0000000000..9a33615340 --- /dev/null +++ b/sysdeps/x86_64/fpu/s_sincos.S @@ -0,0 +1,61 @@ +/* Compute sine and cosine of argument. + Copyright (C) 1997, 2000, 2001, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + + 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/asm.h> +#include "bp-sym.h" +#include "bp-asm.h" + +#define PARMS LINKAGE /* no space for saved regs */ +#define ANGLE PARMS +#define SINP ANGLE+12 +#define COSP SINP+PTR_SIZE + + .text +ENTRY (BP_SYM (__sincos)) + ENTER + + movsd %xmm0, -8(%rsp) + fldl -8(%rsp) + fsincos + fnstsw %ax + testl $0x400,%eax + jnz 1f + fstpl (%rsi) + fstpl (%rdi) + + LEAVE + retq + +1: fldpi + fadd %st(0) + fxch %st(1) +2: fprem1 + fnstsw %ax + testl $0x400,%eax + jnz 2b + fstp %st(1) + fsincos + fstpl (%rsi) + fstpl (%rdi) + + LEAVE + retq +END (BP_SYM (__sincos)) +weak_alias (BP_SYM (__sincos), BP_SYM (sincos)) diff --git a/sysdeps/x86_64/fpu/s_sincosl.S b/sysdeps/x86_64/fpu/s_sincosl.S index 9a3025ab5f..b17eabe767 100644 --- a/sysdeps/x86_64/fpu/s_sincosl.S +++ b/sysdeps/x86_64/fpu/s_sincosl.S @@ -1,5 +1,5 @@ /* Compute sine and cosine of argument. - Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2001, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -40,9 +40,8 @@ ENTRY (BP_SYM (__sincosl)) fstpt (%rdi) LEAVE - ret + retq - .align ALIGNARG(4) 1: fldpi fadd %st(0) fxch %st(1) @@ -56,6 +55,6 @@ ENTRY (BP_SYM (__sincosl)) fstpt (%rdi) LEAVE - ret + retq END (BP_SYM (__sincosl)) weak_alias (BP_SYM (__sincosl), BP_SYM (sincosl)) |