[newlib-cygwin] math.h: Replace usage of INT_MAX with __INT_MAX__

Corinna Vinschen corinna@sourceware.org
Tue May 31 14:33:00 GMT 2016


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=357da5bc324311eca1b394ade519f7a681fd483f

commit 357da5bc324311eca1b394ade519f7a681fd483f
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue May 31 16:30:46 2016 +0200

    math.h: Replace usage of INT_MAX with __INT_MAX__
    
    Using INT_MAX requires to include limits.h on most targets.
    Math.h must not rely on that.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 newlib/libc/include/math.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h
index 80a8048..3725ac0 100644
--- a/newlib/libc/include/math.h
+++ b/newlib/libc/include/math.h
@@ -198,10 +198,10 @@ extern int isnan _PARAMS((double));
 #define FP_NORMAL      4
 
 #ifndef FP_ILOGB0
-# define FP_ILOGB0 (-INT_MAX)
+# define FP_ILOGB0 (-__INT_MAX__)
 #endif
 #ifndef FP_ILOGBNAN
-# define FP_ILOGBNAN INT_MAX
+# define FP_ILOGBNAN __INT_MAX__
 #endif
 
 #ifndef MATH_ERRNO



More information about the Newlib-cvs mailing list