summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/recipes-core/coreutils/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/recipes-core/coreutils/coreutils')
-rwxr-xr-xexternal/poky/meta/recipes-core/coreutils/coreutils/run-ptest17
-rw-r--r--external/poky/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch56
2 files changed, 73 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-core/coreutils/coreutils/run-ptest b/external/poky/meta/recipes-core/coreutils/coreutils/run-ptest
new file mode 100755
index 00000000..6d4a7b36
--- /dev/null
+++ b/external/poky/meta/recipes-core/coreutils/coreutils/run-ptest
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# remove any stale lock files so that the calls to groupadd/useradd don't stop
+# the ptest if re-using the same image
+rm -rf /etc/passwd.lock /etc/group.lock /etc/gshadow.lock
+
+COREUTILSLIB=@libdir@/coreutils
+LOG="${COREUTILSLIB}/ptest/coreutils_ptest_$(date +%Y%m%d-%H%M%S).log"
+USERNAME="tester"
+groupadd ugroup1
+groupadd ugroup2
+useradd -G ugroup1,ugroup2 $USERNAME || echo "user $USERNAME already exists"
+
+su tester -c "cd ${COREUTILSLIB}/ptest && make check-TESTS top_srcdir=. srcdir=." 2>&1 | tee -a ${LOG}
+userdel $USERNAME
+groupdel ugroup1
+groupdel ugroup2
diff --git a/external/poky/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch b/external/poky/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch
new file mode 100644
index 00000000..77770093
--- /dev/null
+++ b/external/poky/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch
@@ -0,0 +1,56 @@
+From 0562b040fa17f1722ba2b3096067b45d0582ca53 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Mon, 11 Mar 2019 16:40:29 -0700
+Subject: [PATCH] strtod: fix clash with strtold
+
+Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
+* lib/strtod.c (compute_minus_zero, minus_zero):
+Simplify by remving the macro / external variable,
+and having just a function. User changed. This avoids
+the need for an external variable that might clash.
+
+Upstream-Status: Backport [rhel5]
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+
+---
+ ChangeLog | 9 +++++++++
+ lib/strtod.c | 11 +++++------
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/lib/strtod.c b/lib/strtod.c
+index b9eaa51b4..69b1564e1 100644
+--- a/lib/strtod.c
++++ b/lib/strtod.c
+@@ -294,16 +294,15 @@ parse_number (const char *nptr,
+ ICC 10.0 has a bug when optimizing the expression -zero.
+ The expression -MIN * MIN does not work when cross-compiling
+ to PowerPC on Mac OS X 10.5. */
+-#if defined __hpux || defined __sgi || defined __ICC
+ static DOUBLE
+-compute_minus_zero (void)
++minus_zero (void)
+ {
++#if defined __hpux || defined __sgi || defined __ICC
+ return -MIN * MIN;
+-}
+-# define minus_zero compute_minus_zero ()
+ #else
+-DOUBLE minus_zero = -0.0;
++ return -0.0;
+ #endif
++}
+
+ /* Convert NPTR to a DOUBLE. If ENDPTR is not NULL, a pointer to the
+ character after the last one used in the number is put in *ENDPTR. */
+@@ -479,6 +478,6 @@ STRTOD (const char *nptr, char **endptr)
+ /* Special case -0.0, since at least ICC miscompiles negation. We
+ can't use copysign(), as that drags in -lm on some platforms. */
+ if (!num && negative)
+- return minus_zero;
++ return minus_zero ();
+ return negative ? -num : num;
+ }
+--
+2.20.1
+