This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/4] cygwin/math: make isinf functions signed


glibc returns -1 for negative infinity:

http://man7.org/linux/man-pages/man3/isinfl.3.html
https://sourceware.org/bugzilla/show_bug.cgi?id=15367

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
 winsup/cygwin/math/isinf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/math/isinf.c b/winsup/cygwin/math/isinf.c
index e7d3e26..fd9e299 100644
--- a/winsup/cygwin/math/isinf.c
+++ b/winsup/cygwin/math/isinf.c
@@ -1,18 +1,18 @@
 int
 isinf (double x)
 {
-  return __builtin_isinf (x);
+  return __builtin_isinf_sign (x);
 }
 
 int
 isinff (float x)
 {
-  return __builtin_isinf (x);
+  return __builtin_isinf_sign (x);
 }
 
 int
 isinfl (long double x)
 {
-  return __builtin_isinf (x);
+  return __builtin_isinf_sign (x);
 }
 
-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]