Hi/2. Paul Eggert wrote: > Assaf Gordon wrote: >> Trying to isolate it, gives (on that OpenSolaris 5.10 i86pc machine): >> === >> $ cat 1.sh >> #!/bin/sh >> test -z "${host_os##os2*}" >> >> $ ./1.sh >> ./1.sh: bad substitution >> === >> >> Just a guess, but perhaps the recent OS/2 patches to gnulib are the >> source > > Thanks for the diagnosis; your guess is correct. Apparently OpenSolaris > is still using the old SunOS /bin/sh, which doesn't support parameter > substitution with # or % operators, and the test that 'configure' uses > for shells (generated by Autoconf) doesn't catch this POSIX > incompatibility. > > I installed the attached patch into gnulib, which should fix this > problem when grep gets the latest gnulib version. Using traditional > 'case' is easier to read for this sort of thing anyway. > > 0001-closedir-dirfd-opendir-port-to-OpenSolaris-5.10.patch > > > From a93faea3bd057b0ef6d2dfdc1a98e24b057a229e Mon Sep 17 00:00:00 2001 > From: Paul Eggert <egg...@cs.ucla.edu> > Date: Sun, 24 Jan 2016 00:28:19 -0800 > Subject: [PATCH] closedir, dirfd, opendir: port to OpenSolaris 5.10 > > * m4/closedir.m4 (gl_FUNC_CLOSEDIR): > * m4/dirfd.m4 (gl_FUNC_DIRFD): > * m4/opendir.m4 (gl_FUNC_OPENDIR): > Don't use ${word##pat} substitution, as it doesn't work in > OpenSolaris 5.10 /bin/sh. Problem reported by Assaf Gordon in: > http://bugs.gnu.org/22443#11 > --- > ChangeLog | 10 ++++++++++ > m4/closedir.m4 | 11 +++++------ > m4/dirfd.m4 | 14 ++++++-------- > m4/opendir.m4 | 11 +++++------ > 4 files changed, 26 insertions(+), 20 deletions(-) > > diff --git a/ChangeLog b/ChangeLog > index 839c222..2da850c 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,13 @@ > +2016-01-24 Paul Eggert <egg...@cs.ucla.edu> > + > + closedir, dirfd, opendir: port to OpenSolaris 5.10 > + * m4/closedir.m4 (gl_FUNC_CLOSEDIR): > + * m4/dirfd.m4 (gl_FUNC_DIRFD): > + * m4/opendir.m4 (gl_FUNC_OPENDIR): > + Don't use ${word##pat} substitution, as it doesn't work in > + OpenSolaris 5.10 /bin/sh. Problem reported by Assaf Gordon in: > + http://bugs.gnu.org/22443#11 > + > 2016-01-23 Paul Eggert <egg...@cs.ucla.edu> > > bootstrap: use American spelling > diff --git a/m4/closedir.m4 b/m4/closedir.m4 > index 15a5cc8..e679694 100644 > --- a/m4/closedir.m4 > +++ b/m4/closedir.m4 > @@ -1,4 +1,4 @@ > -# closedir.m4 serial 3 > +# closedir.m4 serial 4 > dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. > dnl This file is free software; the Free Software Foundation > dnl gives unlimited permission to copy and/or distribute it, > @@ -23,9 +23,8 @@ AC_DEFUN([gl_FUNC_CLOSEDIR], > fi > ]) > dnl Replace closedir() for supporting the gnulib-defined dirfd() function. > - if test -z "${host_os##os2*}"; then > - if test $HAVE_OPENDIR = 1; then > - REPLACE_OPENDIR=1 > - fi > - fi > + case $host_os,$HAVE_OPENDIR in > + os2,1) > + REPLACE_OPENDIR=1;; > + esac > ])
Ooops... typos at the beginning... s/OPENDIR/CLOSEDIR/g And s/os2/os2*/, please... -- KO Myung-Hun Using Mozilla SeaMonkey 2.7.2 Under OS/2 Warp 4 for Korean with FixPak #15 In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM Korean OS/2 User Community : http://www.ecomstation.co.kr