aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-28 15:52:36 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-28 15:52:36 +0000
commitb3fc5f84d13573b9494fb1f0db9b5e80679e5098 (patch)
treedc0a71f8e940437cbc744a1b2fb9e8a01913a5a8 /sysdeps
parent738d1a5a43e97ee81d7b62a3c7a5f754f5b51b82 (diff)
downloadglibc-b3fc5f84d13573b9494fb1f0db9b5e80679e5098.tar
glibc-b3fc5f84d13573b9494fb1f0db9b5e80679e5098.tar.gz
glibc-b3fc5f84d13573b9494fb1f0db9b5e80679e5098.tar.bz2
glibc-b3fc5f84d13573b9494fb1f0db9b5e80679e5098.zip
Update.
* sysdeps/libm-ieee754/e_gamma_r.c: Initialize *signgamp for NaN returns. * sysdeps/libm-ieee754/e_gammaf_r.c: Likewise. * sysdeps/libm-ieee754/e_gammal_r.c: Likewise. Reported by John Reiser <jreiser@BitWagon.com> [PR libc/1185]. * elf/dl-dst.h: Fix typo. * elf/dl-open.c: Likewise. 1999-06-26 Zack Weinberg <zack@rabi.columbia.edu> * elf/dl-libc.c: New file, provides three functions: __libc_dlopen, __libc_dlclose, __libc_dlsym. * include/dlfcn.h: Prototype them. Prototype _dl_addr. * elf/Makefile (routines): Add dl-libc.c. * elf/dl-profstub.c (_dl_mcount_wrapper): Change type of argument to void *. * elf/ldsodefs.h: Change proto and use of _dl_mcount_wrapper to match. * iconv/gconv.c: Include dlfcn.h. * iconv/gconv_db.c: Likewise. * malloc/mtrace.c: Likewise. Don't include ldsodefs.h. * iconv/gconv_int.h (struct __gconv_loaded_object): Change `handle' to a void *. (__gconv_find_func): Delete prototype. * iconv/gconv_dl.c: Don't include ldsodefs.h. Remove dlerror_run and related functions and structs. Use __libc_dlopen, __libc_dlsym, __libc_dlclose. * nss/nsswitch.c: Likewise. 1999-06-28 Ulrich Drepper <drepper@cygnus.com>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/libm-ieee754/e_gamma_r.c10
-rw-r--r--sysdeps/libm-ieee754/e_gammaf_r.c10
-rw-r--r--sysdeps/libm-ieee754/e_gammal_r.c10
3 files changed, 21 insertions, 9 deletions
diff --git a/sysdeps/libm-ieee754/e_gamma_r.c b/sysdeps/libm-ieee754/e_gamma_r.c
index 901f1451d2..bd802c24f1 100644
--- a/sysdeps/libm-ieee754/e_gamma_r.c
+++ b/sysdeps/libm-ieee754/e_gamma_r.c
@@ -1,5 +1,5 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -34,11 +34,15 @@ __ieee754_gamma_r (double x, int *signgamp)
EXTRACT_WORDS (hx, lx, x);
if (((hx & 0x7fffffff) | lx) == 0)
- /* Return value for x == 0 is NaN with invalid exception. */
- return x / x;
+ {
+ /* Return value for x == 0 is NaN with invalid exception. */
+ *signgamp = 0;
+ return x / x;
+ }
if (hx < 0 && (u_int32_t) hx < 0xfff00000 && __rint (x) == x)
{
/* Return value for integer x < 0 is NaN with invalid exception. */
+ *signgamp = 0;
return (x - x) / (x - x);
}
diff --git a/sysdeps/libm-ieee754/e_gammaf_r.c b/sysdeps/libm-ieee754/e_gammaf_r.c
index bf79ffeb57..926905e7cd 100644
--- a/sysdeps/libm-ieee754/e_gammaf_r.c
+++ b/sysdeps/libm-ieee754/e_gammaf_r.c
@@ -1,5 +1,5 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -33,11 +33,15 @@ __ieee754_gammaf_r (float x, int *signgamp)
GET_FLOAT_WORD (hx, x);
if ((hx & 0x7fffffff) == 0)
- /* Return value for x == 0 is NaN with invalid exception. */
- return x / x;
+ {
+ /* Return value for x == 0 is NaN with invalid exception. */
+ *signgamp = 0;
+ return x / x;
+ }
if (hx < 0 && (u_int32_t) hx < 0xff800000 && __rintf (x) == x)
{
/* Return value for integer x < 0 is NaN with invalid exception. */
+ *signgamp = 0;
return (x - x) / (x - x);
}
diff --git a/sysdeps/libm-ieee754/e_gammal_r.c b/sysdeps/libm-ieee754/e_gammal_r.c
index 4fd49886d1..104992450b 100644
--- a/sysdeps/libm-ieee754/e_gammal_r.c
+++ b/sysdeps/libm-ieee754/e_gammal_r.c
@@ -1,5 +1,5 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -33,11 +33,15 @@ __ieee754_gammal_r (long double x, int *signgamp)
GET_LDOUBLE_WORDS (es, hx, lx, x);
if (((es & 0x7fff) | hx | lx) == 0)
- /* Return value for x == 0 is NaN with invalid exception. */
- return x / x;
+ {
+ /* Return value for x == 0 is NaN with invalid exception. */
+ *signgamp = 0;
+ return x / x;
+ }
if ((hx & 0x8000) != 0 && (hx & 0x7fff) != 0x7fff && __rintl (x) == x)
{
/* Return value for integer x < 0 is NaN with invalid exception. */
+ *signgamp = 0;
return (x - x) / (x - x);
}