gnulib: update to latest; also update tests/init.sh from gnulib
authorJim Meyering <meyering@fb.com>
Wed, 25 Oct 2017 14:28:21 +0000 (07:28 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 29 Oct 2017 17:05:27 +0000 (10:05 -0700)
gnulib
m4/.gitignore
tests/init.sh

diff --git a/gnulib b/gnulib
index 4f0a093a593d37233c262c66ba82d8bc6b780b23..cf6bbbf90f411995637fd45e81816b2d7007bbba 160000 (submodule)
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 4f0a093a593d37233c262c66ba82d8bc6b780b23
+Subproject commit cf6bbbf90f411995637fd45e81816b2d7007bbba
index 38ebad029a5131cebb2d301350e868d8dccd898d..9216223cc4dd8c4c2a1e446df848d2a628ec85cc 100644 (file)
 /xalloc.m4
 /xsize.m4
 /yesno.m4
+/host-cpu-c-abi.m4
index 470605c116631af8d1950d6615f63e53e93d5416..24fb51219a1c65ad1ef85256e01da3dc3f072ef4 100644 (file)
 
 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_" \