oksh-noxz

[fork] Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh).
git clone https://noxz.tech/git/oksh-noxz.git
oksh-noxz

commit: 182d9fc45e4c5bc06b8e105d13207afa657ae3a7
parent: 18d5ab4db23502554ada3c03138dcc83ca812303
author: Brian Callahan <bcallah@openbsd.org>
date:   Sat, 4 Dec 2021 15:05:40 -0500
Support vbcc compiler.
MREADME.md1+
Mconfigure8++++++++
Memacs.c2+-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
@@ -57,6 +57,7 @@ Supported compilers
 * [CompCert](https://compcert.org/)
 * [Nils Weller's C compiler](http://nwcc.sourceforge.net/)
 * [cproc](https://sr.ht/~mcf/cproc/) (Currently requires a small tweak to ignore a volatile store error)
+* [vbcc](http://www.compilers.de/vbcc.html) (Only tested on OpenBSD/i386)
 
 Building with a compiler not listed here? Add it and send a pull request!
 
diff --git a/configure b/configure
@@ -963,6 +963,11 @@ else
   echo "$cc"
 fi
 
+if [ "x$cc" = "xvc" ] ; then
+  echo "using vbcc, setting CFLAGS to -g -O=990"
+  cflags="-g -O=990 -DEMACS -DVI"
+fi
+
 if [ "x$cflags" = "x-DEMACS -DVI" ] ; then
   printf "checking if the compiler accepts -g -O2... "
   defaultcflagscheck
@@ -1030,6 +1035,9 @@ case "x$os" in
       "xnwcc")
 	ldflags="$ldflags -Wl,-nopie"
 	;;
+      "xvc")
+	cflags="$cflags -D_ANSI_LIBRARY"
+	;;
     esac
     ;;
   "xAIX"|"xOS400")
diff --git a/emacs.c b/emacs.c
@@ -277,7 +277,7 @@ static const struct x_ftab x_ftab[] = {
 	{ 0, 0, 0 },
 };
 
-int
+static int
 isu8cont(unsigned char c)
 {
 	return (c & (0x80 | 0x40)) == 0x80;