On 03/27/2018 05:27 PM, Nelson H. F. Beebe wrote:
        test=${1##*/}

I would strongly urge removal of such shell extensions.

That syntax has been standard ever since POSIX formalized the shell in IEEE Std 1003.2-1992 (I just pulled out my trusty printed copy and checked). It's a bit of a stretch to call it an "extension" 26 years after standardization.

That being said, I too have a soft spot in my heart for Solaris, and regularly check portability to the Solaris 10 server that is still the central server in our department. If it's easy to port to Solaris 10, which I think is still the case, we might as well do it. I'll see if I can pry some time free to fix the glitches. The first thing I noticed, I fixed as per the attached (cc'ing bug-gnulib).

>From dd27ae2a74ceb26fc70c4a15b299b68c5b33899e Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 27 Mar 2018 18:20:18 -0700
Subject: [PATCH] havelib: port to Solaris 10 /bin/sh

* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Use 'test ! EXPR'
instead of '! test EXPR'.
---
 ChangeLog      | 6 ++++++
 m4/lib-link.m4 | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 99f219c26..74f3bfc71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-03-27  Paul Eggert  <egg...@cs.ucla.edu>
+
+	havelib: port to Solaris 10 /bin/sh
+	* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Use 'test ! EXPR'
+	instead of '! test EXPR'.
+
 2018-03-26  Paul Eggert  <egg...@cs.ucla.edu>
 
 	time_rz: work around Mac OS X 10.6 infloop
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index 4a4a185e3..df77db982 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -211,7 +211,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
         additional_includedir="$withval/include"
         additional_libdir="$withval/$acl_libdirstem"
         if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
+           && test ! -d "$withval/$acl_libdirstem"; then
           additional_libdir="$withval/$acl_libdirstem2"
         fi
       fi
-- 
2.14.3

Reply via email to