mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-17 00:35:25 +01:00
Enable additional tools in coreutils-5.0 phase 1
These utilities can be enabled with only a small amount of additional patches. In particular sort, expr, uniq,and hostname are used by some ./configure.sh scripts.
This commit is contained in:
parent
dd7905c05c
commit
7a13158e79
5 changed files with 76 additions and 2 deletions
26
sysa/coreutils-5.0/patches/expr-strcmp.patch
Normal file
26
sysa/coreutils-5.0/patches/expr-strcmp.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
SPDX-FileCopyrightText: 2023 Emily Trau <emily@downunderctf.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
strcoll() does not exist in mes libc, change it to strcmp.
|
||||
|
||||
--- src/expr.c
|
||||
+++ src/expr.c
|
||||
@@ -332,7 +332,7 @@ nextarg (char *str)
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
- int r = strcoll (*args, str) == 0;
|
||||
+ int r = strcmp (*args, str) == 0;
|
||||
args += r;
|
||||
return r;
|
||||
}
|
||||
@@ -668,7 +668,7 @@ eval2 (void)
|
||||
r = eval3 ();
|
||||
tostring (l);
|
||||
tostring (r);
|
||||
- lval = strcoll (l->u.s, r->u.s);
|
||||
+ lval = strcmp (l->u.s, r->u.s);
|
||||
rval = 0;
|
||||
if (toarith (l) && toarith (r))
|
||||
{
|
||||
37
sysa/coreutils-5.0/patches/sort-locale.patch
Normal file
37
sysa/coreutils-5.0/patches/sort-locale.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
SPDX-FileCopyrightText: 2023 Emily Trau <emily@downunderctf.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
strcoll() does not exist in mes libc, change it to strcmp.
|
||||
hard_LC_COLLATE is used but not declared when HAVE_SETLOCALE is unset.
|
||||
|
||||
--- lib/memcoll.c
|
||||
+++ lib/memcoll.c
|
||||
@@ -47,7 +47,7 @@ memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
|
||||
s1[s1len++] = '\0';
|
||||
s2[s2len++] = '\0';
|
||||
|
||||
- while (! (errno = 0, (diff = strcoll (s1, s2)) || errno))
|
||||
+ while (! (errno = 0, (diff = strcmp (s1, s2)) || errno))
|
||||
{
|
||||
/* strcoll found no difference, but perhaps it was fooled by NUL
|
||||
characters in the data. Work around this problem by advancing
|
||||
|
||||
--- src/sort.c
|
||||
+++ src/sort.c
|
||||
@@ -91,13 +91,13 @@ double strtod ();
|
||||
#define NEGATION_SIGN '-'
|
||||
#define NUMERIC_ZERO '0'
|
||||
|
||||
+/* Nonzero if the corresponding locales are hard. */
|
||||
+static int hard_LC_COLLATE;
|
||||
#if HAVE_SETLOCALE
|
||||
|
||||
static char decimal_point;
|
||||
static int th_sep; /* if CHAR_MAX + 1, then there is no thousands separator */
|
||||
|
||||
-/* Nonzero if the corresponding locales are hard. */
|
||||
-static int hard_LC_COLLATE;
|
||||
# if HAVE_NL_LANGINFO
|
||||
static int hard_LC_TIME;
|
||||
# endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue