forked from pool/glibc
Accepting request 528652 from home:Andreas_Schwab:Factory
- math-c++-compat.patch: add more C++ compatibility (BZ #22146) OBS-URL: https://build.opensuse.org/request/show/528652 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=478
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2017-09-22 Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
|
||||
|
||||
[BZ #22146]
|
||||
math/math.h: Let fpclassify use the builtin in C++ mode, even
|
||||
when optimazing for size.
|
||||
|
||||
2017-08-28 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
|
||||
|
||||
[BZ #21930]
|
||||
@@ -30,7 +36,22 @@ Index: glibc-2.26/math/math.h
|
||||
===================================================================
|
||||
--- glibc-2.26.orig/math/math.h
|
||||
+++ glibc-2.26/math/math.h
|
||||
@@ -442,8 +442,12 @@ enum
|
||||
@@ -402,7 +402,13 @@ enum
|
||||
|
||||
/* Return number of classification appropriate for X. */
|
||||
# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ \
|
||||
- && !defined __OPTIMIZE_SIZE__
|
||||
+ && (!defined __OPTIMIZE_SIZE__ || defined __cplusplus)
|
||||
+ /* The check for __cplusplus allows the use of the builtin, even
|
||||
+ when optimization for size is on. This is provided for
|
||||
+ libstdc++, only to let its configure test work when it is built
|
||||
+ with -Os. No further use of this definition of fpclassify is
|
||||
+ expected in C++ mode, since libstdc++ provides its own version
|
||||
+ of fpclassify in cmath (which undefines fpclassify). */
|
||||
# define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, \
|
||||
FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
|
||||
# else
|
||||
@@ -442,8 +448,12 @@ enum
|
||||
|
||||
/* Return nonzero value if X is positive or negative infinity. */
|
||||
# if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \
|
||||
@@ -45,7 +66,7 @@ Index: glibc-2.26/math/math.h
|
||||
# define isinf(x) \
|
||||
(__builtin_types_compatible_p (__typeof (x), _Float128) \
|
||||
? __isinff128 (x) : __builtin_isinf_sign (x))
|
||||
@@ -470,7 +474,32 @@ enum
|
||||
@@ -470,7 +480,32 @@ enum
|
||||
# include <bits/iscanonical.h>
|
||||
|
||||
/* Return nonzero value if X is a signaling NaN. */
|
||||
@@ -79,7 +100,7 @@ Index: glibc-2.26/math/math.h
|
||||
|
||||
/* Return nonzero value if X is subnormal. */
|
||||
# define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)
|
||||
@@ -484,15 +513,40 @@ enum
|
||||
@@ -484,15 +519,40 @@ enum
|
||||
# endif
|
||||
# else /* __cplusplus */
|
||||
extern "C++" {
|
||||
|
Reference in New Issue
Block a user