This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.10-295-g4a8f61a
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 24 Aug 2009 19:07:39 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.10-295-g4a8f61a
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 4a8f61a797e4c02c5ea7ab810af0816914ca5233 (commit)
via f0c281e072fd324261a51558284c04e230c0178d (commit)
from 036e46b655557f9a17784e502f694a80abfd68dc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a8f61a797e4c02c5ea7ab810af0816914ca5233
commit 4a8f61a797e4c02c5ea7ab810af0816914ca5233
Merge: f0c281e 036e46b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 24 12:07:27 2009 -0700
Merge branch 'master' of ssh://sources.redhat.com/git/glibc
diff --cc ChangeLog
index 76a0d1d,1517156..bc1c0f1
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,9 -1,14 +1,18 @@@
+ 2009-08-24 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/unix/syscall-template.S: New file.
+ * sysdeps/unix/make-syscalls.sh: Generate rules to use it.
+ * sysdeps/unix/Makefile (omit-deps): Do not omit syscall stubs' deps.
+ (compile-syscall): Pass mkdep and -g options as normal.
+ (s-proto.d, s-proto-cancel.d): Don't "-include" these.
+ (common-generated): Don't add them here.
+
2009-08-24 Ulrich Drepper <drepper@redhat.com>
+ * math/s_fdim.c: In case of overflows set errno.
+ * math/s_fdimf.c: Likewise.
+ * math/s_fdiml.c: Likewise.
+
* math/math.h: Define math_errhandling of __FAST_MATH__ is not defined.
* sysdeps/i386/fpu/bits/mathinline.h: Undefine math_errhandling if we
are using the inline optimizations.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0c281e072fd324261a51558284c04e230c0178d
commit f0c281e072fd324261a51558284c04e230c0178d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 24 12:06:55 2009 -0700
Fix overflow handling in fdim.
diff --git a/ChangeLog b/ChangeLog
index b367ab0..76a0d1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-08-24 Ulrich Drepper <drepper@redhat.com>
+ * math/s_fdim.c: In case of overflows set errno.
+ * math/s_fdimf.c: Likewise.
+ * math/s_fdiml.c: Likewise.
+
* math/math.h: Define math_errhandling of __FAST_MATH__ is not defined.
* sysdeps/i386/fpu/bits/mathinline.h: Undefine math_errhandling if we
are using the inline optimizations.
diff --git a/math/s_fdim.c b/math/s_fdim.c
index 5804e63..677fdcd 100644
--- a/math/s_fdim.c
+++ b/math/s_fdim.c
@@ -1,5 +1,5 @@
/* Return positive difference between arguments.
- Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2004, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <math.h>
double
@@ -31,7 +32,14 @@ __fdim (double x, double y)
/* Raise invalid flag. */
return x - y;
- return x <= y ? 0 : x - y;
+ if (x <= y)
+ return 0.0;
+
+ double r = x - y;
+ if (fpclassify (r) == FP_INFINITE)
+ __set_errno (ERANGE);
+
+ return r;
}
weak_alias (__fdim, fdim)
#ifdef NO_LONG_DOUBLE
diff --git a/math/s_fdimf.c b/math/s_fdimf.c
index 2f3ce30..737413a 100644
--- a/math/s_fdimf.c
+++ b/math/s_fdimf.c
@@ -1,5 +1,5 @@
/* Return positive difference between arguments.
- Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2004, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <math.h>
float
@@ -31,6 +32,13 @@ __fdimf (float x, float y)
/* Raise invalid flag. */
return x - y;
- return x <= y ? 0 : x - y;
+ if (x <= y)
+ return 0.0f;
+
+ float r = x - y;
+ if (fpclassify (r) == FP_INFINITE)
+ __set_errno (ERANGE);
+
+ return r;
}
weak_alias (__fdimf, fdimf)
diff --git a/math/s_fdiml.c b/math/s_fdiml.c
index 70246ba..e1ff11b 100644
--- a/math/s_fdiml.c
+++ b/math/s_fdiml.c
@@ -1,5 +1,5 @@
/* Return positive difference between arguments.
- Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2004, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,19 +18,27 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <math.h>
long double
__fdiml (long double x, long double y)
{
- int clsx = fpclassify (x);
- int clsy = fpclassify (y);
+ int clsx = fpclassifyl (x);
+ int clsy = fpclassifyl (y);
if (clsx == FP_NAN || clsy == FP_NAN
|| (y < 0 && clsx == FP_INFINITE && clsy == FP_INFINITE))
/* Raise invalid flag. */
return x - y;
- return x <= y ? 0 : x - y;
+ if (x <= y)
+ return 0.0f;
+
+ long double r = x - y;
+ if (fpclassify (r) == FP_INFINITE)
+ __set_errno (ERANGE);
+
+ return r;
}
weak_alias (__fdiml, fdiml)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
math/s_fdim.c | 12 ++++++++++--
math/s_fdimf.c | 12 ++++++++++--
math/s_fdiml.c | 16 ++++++++++++----
4 files changed, 36 insertions(+), 8 deletions(-)
hooks/post-receive
--
GNU C Library master sources