From 363323a3b9fac77274ee5618e06d909cfaa0ad04 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 2 Feb 2016 12:28:36 +0100 Subject: [PATCH] Apply glibc-isinf-cxx11.patch to improve C++11 compatibility --- glibc-isinf-cxx11.patch | 32 ++++++++++++++++++++++++++++++++ glibc.spec | 4 ++++ series | 3 ++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 glibc-isinf-cxx11.patch diff --git a/glibc-isinf-cxx11.patch b/glibc-isinf-cxx11.patch new file mode 100644 index 0000000..b65a2f3 --- /dev/null +++ b/glibc-isinf-cxx11.patch @@ -0,0 +1,32 @@ +commit 48746aa5a013aab5ca89ee8c29761baec8850c0f +Author: Jakub Jelinek +Date: Mon Feb 1 16:17:55 2016 +0000 + + Restore isinf, isinfl, isnanf and isnanl for C++11 + +diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h +index a48345d..9a7b3f0 100644 +--- a/math/bits/mathcalls.h ++++ b/math/bits/mathcalls.h +@@ -196,7 +196,9 @@ __MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); + _Mdouble_END_NAMESPACE + + #ifdef __USE_MISC +-# if !defined __cplusplus || __cplusplus < 201103L /* Conflicts with C++11. */ ++# if (!defined __cplusplus \ ++ || __cplusplus < 201103L /* isinf conflicts with C++11. */ \ ++ || __MATH_DECLARING_DOUBLE == 0) /* isinff or isinfl don't. */ + /* Return 0 if VALUE is finite or NaN, +1 if it + is +Infinity, -1 if it is -Infinity. */ + __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); +@@ -232,7 +234,9 @@ __END_NAMESPACE_C99 + __MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); + + #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) +-# if !defined __cplusplus || __cplusplus < 201103L /* Conflicts with C++11. */ ++# if (!defined __cplusplus \ ++ || __cplusplus < 201103L /* isnan conflicts with C++11. */ \ ++ || __MATH_DECLARING_DOUBLE == 0) /* isnanf or isnanl don't. */ + /* Return nonzero if VALUE is not a number. */ + __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); + # endif diff --git a/glibc.spec b/glibc.spec index d97f47a..5cb5262 100644 --- a/glibc.spec +++ b/glibc.spec @@ -290,7 +290,9 @@ Patch2034: glibc-aarch64-workaround-nzcv-clobber-in-tlsdesc.patch # Group Merge Patch: Patch2035: glibc-nsswitch-Add-group-merging-support.patch + Patch2036: glibc-gcc-PR69537.patch +Patch2037: glibc-isinf-cxx11.patch ############################################################################## # @@ -685,6 +687,7 @@ cat /proc/meminfo %patch0059 -p1 %patch2035 -p1 %patch2036 -p1 +%patch2037 -p1 ############################################################################## # %%prep - Additional prep required... @@ -1945,6 +1948,7 @@ rm -f *.filelist* %changelog * Tue Feb 02 2016 Florian Weimer - 2.22.90-32 - Auto-sync with upstream master. +- Add glibc-isinf-cxx11.patch to improve C++11 compatibility. * Thu Jan 28 2016 Florian Weimer - 2.22.90-31 - Add workaround for GCC PR69537. diff --git a/series b/series index e33ce36..528fb2e 100644 --- a/series +++ b/series @@ -37,4 +37,5 @@ glibc-dns-host-gcc5.patch -p1 --fuzz=0 glibc-bug-regex-gcc5.patch -p1 --fuzz=0 glibc-c-utf8-locale.patch -p1 --fuzz=0 glibc-nsswitch-Add-group-merging-support.patch -p1 --fuzz=0 -glibc-gcc-PR69537.patch +glibc-gcc-PR69537.patch -p1 --fuzz=0 +glibc-isinf-cxx11.patch -p1 --fuzz=0