wok-next annotate jsoncpp/stuff/patches/0001-json_writer-fix-build-with-glibc-2.26.patch @ rev 20729

cookutils: up (1059)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 29 14:14:46 2018 +0300 (2018-05-29)
parents
children
rev   line source
al@20542 1 From 2cb87c456f95510d55dd40f783435ecd1177c453 Mon Sep 17 00:00:00 2001
al@20542 2 From: Romain Naour <romain.naour@gmail.com>
al@20542 3 Date: Sat, 26 Aug 2017 19:39:03 +0200
al@20542 4 Subject: [PATCH] json_writer: fix build with glibc >= 2.26
al@20542 5
al@20542 6 src/lib_json/json_writer.cpp:45:23: error: 'isfinite' is not a member of 'std'
al@20542 7 #define isfinite std::isfinite
al@20542 8 ^
al@20542 9
al@20542 10 Signed-off-by: Romain Naour <romain.naour@gmail.com>
al@20542 11 ---
al@20542 12 src/lib_json/json_writer.cpp | 3 +++
al@20542 13 1 file changed, 3 insertions(+)
al@20542 14
al@20542 15 diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
al@20542 16 index 02f1cb1..a3189cb 100644
al@20542 17 --- a/src/lib_json/json_writer.cpp
al@20542 18 +++ b/src/lib_json/json_writer.cpp
al@20542 19 @@ -42,9 +42,12 @@
al@20542 20 #else
al@20542 21 #include <cmath>
al@20542 22 #if !(defined(__QNXNTO__)) // QNX already defines isfinite
al@20542 23 +// std::isfinite is not defined on glibc >= 2.26
al@20542 24 +#if !(defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 26)))
al@20542 25 #define isfinite std::isfinite
al@20542 26 #endif
al@20542 27 #endif
al@20542 28 +#endif
al@20542 29
al@20542 30 #if defined(_MSC_VER)
al@20542 31 #if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above
al@20542 32 --
al@20542 33 2.9.5