commit 194178b5788a09379e01e8ff8bff391b8a8d5c18 from: Martin Kühl via: Dan Cross date: Tue Jan 07 23:13:02 2020 UTC 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) commit - e6ed10f25e4b2ea791d8e52253f7d806316420e9 commit + 194178b5788a09379e01e8ff8bff391b8a8d5c18 blob - 7e6e3ab812de115c5e3abeda32a5331218542327 blob + f21ea754496b9f12dd1264d682c75a7d78c31d9d --- bin/9c +++ 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"