On 11/11/2017 03:30 PM, Bruno Haible wrote:
Hi Pádraig, Bernhard,
You may have seen that Paul made the gnulib module 'year2038' [1] useful for all
platforms, especially Linux/i386.
I think it would be a good idea for coreutils and findutils to include this
module,
in order to raise awareness of the year 2038 problem for those people who build
binaries that will be in use for a long time (e.g. embedded and busybox
environments).
Bruno
[1]
https://www.gnu.org/software/gnulib/manual/html_node/Avoiding-the-year-2038-problem.html
... and here the same for coreutils.
Have a nice day,
Berny
>From 92e8626807d46019ebc7079053f54fec339d7b60 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <[email protected]>
Date: Mon, 13 Nov 2017 08:42:30 +0100
Subject: [PATCH 1/2] maint: update gnulib to latest
* gnulib: Update - mainly for the recent year2038 changes.
* tests/init.sh: Update from gnulib/tests/init.sh.
---
gnulib | 2 +-
tests/init.sh | 21 +++++++++++++++++----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/gnulib b/gnulib
index a20922f10..2a3dbe99a 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit a20922f1055979e45de0a42a091f08009acfa99a
+Subproject commit 2a3dbe99a2aeb058ecb033d7d830e6600e16c91c
diff --git a/tests/init.sh b/tests/init.sh
index 470605c11..24fb51219 100755
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -62,6 +62,19 @@
ME_=`expr "./$0" : '.*/\(.*\)$'`
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
# We use a trap below for cleanup. This requires us to go through
# hoops to get the right exit status transported through the handler.
# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
@@ -250,7 +263,7 @@ test -n "$BASH_VERSION" && unalias -a
# That is part of the shell-selection test above. Why use aliases rather
# than functions? Because support for hyphen-containing aliases is more
# widespread than that for hyphen-containing function names.
-test -n "$EXEEXT" && shopt -s expand_aliases
+test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases
# Enable glibc's malloc-perturbing option.
# This is useful for exposing code that depends on the fact that
@@ -429,13 +442,13 @@ path_prepend_ ()
path_dir_=$1
case $path_dir_ in
'') fail_ "invalid path dir: '$1'";;
- /*) abs_path_dir_=$path_dir_;;
+ /* | ?:*) abs_path_dir_=$path_dir_;;
*) abs_path_dir_=$initial_cwd_/$path_dir_;;
esac
case $abs_path_dir_ in
- *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
+ *$PATH_SEPARATOR*) fail_ "invalid path dir: '$abs_path_dir_'";;
esac
- PATH="$abs_path_dir_:$PATH"
+ PATH="$abs_path_dir_$PATH_SEPARATOR$PATH"
# Create an alias, FOO, for each FOO.exe in this directory.
create_exe_shims_ "$abs_path_dir_" \
--
2.15.0
>From 1ee4259263a735a6c2cefe44306352d96d1695ca Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <[email protected]>
Date: Mon, 13 Nov 2017 08:44:38 +0100
Subject: [PATCH 2/2] maint: include the module year2038 from gnulib
* bootstrap.conf (gnulib_modules): Add 'year2038' to ensure that time_t
is 64-bit (and thus works after 2038).
Suggested by Bruno Haible in
https://lists.gnu.org/r/bug-gnulib/2017-11/msg00022.html
---
bootstrap.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/bootstrap.conf b/bootstrap.conf
index ce1689a7e..5556a0c5d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -294,6 +294,7 @@ gnulib_modules="
xstrtol
xstrtold
xstrtoumax
+ year2038
yesno
"
--
2.15.0