changeset 21409:de7115fb7b83

10881 more C99 math macros should be compiler builtins (fix signbit compatibility) Reviewed by: Andy Fiddaman <andy@omniosce.org> Approved by: Dan McDonald <danmcd@joyent.com>
author Rich Lowe <richlowe@richlowe.net>
date Sun, 02 Jun 2019 21:54:47 +0000
parents e6f8a373226a
children 6fec3e496bcb b4873d1306d9
files usr/src/head/iso/math_c99.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/head/iso/math_c99.h	Thu May 09 17:19:27 2019 +0000
+++ b/usr/src/head/iso/math_c99.h	Sun Jun 02 21:54:47 2019 +0000
@@ -72,7 +72,7 @@
     FP_SUBNORMAL, FP_ZERO, x)
 #define	isfinite(x)	__builtin_isfinite(x)
 #define	isnormal(x)	__builtin_isnormal(x)
-#define	signbit(x)	__builtin_signbit(x)
+#define	signbit(x)	(__builtin_signbit(x) > 0)
 #else  /* __GNUC__ >= 4 */
 #define	isnan(x)	__extension__( \
 			{ __typeof(x) __x_n = (x); \