From e0c8341b3e4e13778bcde00d477e461ea8e94306 Mon Sep 17 00:00:00 2001 From: Stefan Westerfeld Date: Fri, 22 Apr 2016 18:03:37 +0200 Subject: [PATCH 031/176] RCORE: compile fixes for KUbuntu 16.04/gcc 5.3.1-14ubuntu2 Rapicorn uses isnan(...) and isinf(...) from cmath.h, however on KUbuntu 16.04 it should use std::isnan(...) and std::isinf(...) instead. Patch below. Acked-by: Tim Janik --- rcore/strings.cc | 10 +++++----- rcore/tests/benchrcore.cc | 4 ++-- rcore/tests/strings.cc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rcore/strings.cc b/rcore/strings.cc index d5b0216..8b3bc3f 100644 --- a/rcore/strings.cc +++ b/rcore/strings.cc @@ -437,7 +437,7 @@ static long double libc_strtold (const char *nptr, char **endptr) { const long double result = strtold (nptr, endptr); - if (isnan (result) && std::signbit (result) == 0) + if (std::isnan (result) && std::signbit (result) == 0) { const char *p = nptr; while (isspace (*p)) @@ -500,9 +500,9 @@ string_to_double (const char *dblstring, const char **endptr) String string_from_float (float value) { - if (isnan (value)) + if (std::isnan (value)) return std::signbit (value) ? "-NaN" : "+NaN"; - if (isinf (value)) + if (std::isinf (value)) return std::signbit (value) ? "-Infinity" : "+Infinity"; return string_format ("%.7g", value); } @@ -511,9 +511,9 @@ string_from_float (float value) String string_from_double (double value) { - if (isnan (value)) + if (std::isnan (value)) return std::signbit (value) ? "-NaN" : "+NaN"; - if (isinf (value)) + if (std::isinf (value)) return std::signbit (value) ? "-Infinity" : "+Infinity"; return string_format ("%.17g", value); } diff --git a/rcore/tests/benchrcore.cc b/rcore/tests/benchrcore.cc index 3899a08..12fde16 100644 --- a/rcore/tests/benchrcore.cc +++ b/rcore/tests/benchrcore.cc @@ -188,8 +188,8 @@ test_random_numbers() const double rf = random_frange (989617512, 9876547656); TASSERT (rf >= 989617512 && rf < 9876547656); } - TASSERT (isnan (random_frange (NAN, 1))); - TASSERT (isnan (random_frange (0, NAN))); + TASSERT (std::isnan (random_frange (NAN, 1))); + TASSERT (std::isnan (random_frange (0, NAN))); #if 0 // example penalty paid in random_int64() size_t i, j = 0; for (i = 0; i < 100; i++) diff --git a/rcore/tests/strings.cc b/rcore/tests/strings.cc index 468a6e6..dae3e3d 100644 --- a/rcore/tests/strings.cc +++ b/rcore/tests/strings.cc @@ -311,9 +311,9 @@ string_conversions (void) TCMP (string_to_double ("-0.5"), ==, -0.5); double tfloat; tfloat = string_to_double ("+NAN"); - assert (isnan (tfloat) && std::signbit (tfloat) == 0); + assert (std::isnan (tfloat) && std::signbit (tfloat) == 0); tfloat = string_to_double ("-NAN"); - assert (isnan (tfloat) && std::signbit (tfloat) == 1); + assert (std::isnan (tfloat) && std::signbit (tfloat) == 1); TCMP (string_capitalize ("fOO bar"), ==, "Foo Bar"); TCMP (string_capitalize ("foo BAR BAZ", 2), ==, "Foo Bar BAZ"); } -- 2.9.1 10:44:54 +0200'>2024-08-31gnu: ldb: Remove reference to crypt....* gnu/packages/samba.scm (ldb): Remove reference to crypt header. Change-Id: Idcf43ff9b140d5c7e601d853564833525396e565 Josselin Poiret 2024-08-31gnu: tevent: Remove reference to crypt....* gnu/packages/samba.scm (tevent): Remove reference to crypt header. Change-Id: Ic99712c9374dee1fd5b65c29327fe39aa10eed35 Josselin Poiret 2024-08-31gnu: talloc: Remove reference to crypt....* gnu/packages/samba.scm (talloc): Remove reference to crypt header. Change-Id: I370069acdd7992f2660aae0b1840ea7756befe13 Josselin Poiret 2024-08-31gnu: sambda/pinned: Add libxcrypt dependency....* gnu/packages/samba.scm (samba/pinned): Add libxcrypt dependency. Change-Id: Ie3162623818bea08da2588c02930b842de4f13ae Josselin Poiret 2024-08-31gnu: Remove unneeded libxml2 from native-inputs. (libxslt)...XML_CATALOG_FILES is already set within libxslt so it's unnecessary to include libxml2 for the same effect. * gnu/packages/freedesktop.scm (wayland): Remove obsolete comment. (farstream, elogind, packagekit, accountsservice, plymouth)[native-inputs]: Remove libxml2. * gnu/packages/benchmark.scm (sysbench)[native-inputs]: Ditto. * gnu/packages/cluster.scm (drbd-utils)[native-inputs]: Ditto. * gnu/packages/glib.scm (dbus)[native-inputs]: Ditto. * gnu/packages/gnome.scm (gnome-keyring, glade3, dconf, libsecret, colord) (upower, gnome-settings-daemon)[native-inputs]: Ditto. * gnu/packages/linux.scm (eudev)[native-inputs]: Ditto. * gnu/packages/networking.scm (iputils)[native-inputs]: Ditto. * gnu/packages/ocr.scm (tesseract-ocr)[native-inputs]: Ditto. * gnu/packages/polkit.scm (polkit)[native-inputs]: Ditto. * gnu/packages/samba.scm (samba/pinned)[native-inputs]: Ditto. * gnu/packages/sssd.scm (adcli)[native-inputs]: Ditto. * gnu/packages/terminals.scm (kmscon)[native-inputs]: Ditto. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: Ica3fb5a8e23ad928c53ae508c02777d78c635af0 Bruno Victal