From 194178b5788a09379e01e8ff8bff391b8a8d5c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BChl?= Date: Tue, 7 Jan 2020 23:27:39 +0100 Subject: 9c: Fix case patterns for DragonFly and other BSDs POSIX does not support grouping in case item patterns. Installing with a strict POSIX shell fails with: /usr/local/plan9/bin/9c: line 82: syntax error near unexpected token `(' /usr/local/plan9/bin/9c: line 82: `*(DragonFly|BSD)*gcc*) usegcc ;;' This change expands the patterns to work around the limitation. See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10 (and search for case_clause) --- bin/9c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/9c') diff --git a/bin/9c b/bin/9c index 7e6e3ab8..f21ea754 100755 --- a/bin/9c +++ b/bin/9c @@ -79,8 +79,8 @@ useclang() tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}-${CC9:-cc}" case "$tag" in -*(DragonFly|BSD)*gcc*) usegcc ;; -*(DragonFly|BSD)*clang*) useclang ;; +*DragonFly*gcc*|*BSD*gcc*) usegcc ;; +*DragonFly*clang|*BSD*clang*) useclang ;; *Darwin-x86_64*) useclang cflags="$ngflags -g3 -m64" -- cgit v1.2.3