commit: 528c677a371ba28f988f317c314f8f0abb378d17
parent: 00aa354279d355c749c6c5bb0375d5c90c7b3452
author: Brian Callahan <bcallah@openbsd.org>
date: Mon, 30 Oct 2017 20:20:36 -0400
Allow build on OpenBSD. Make compiling easier for everyone.
Add a .gitignore so I don't inadvertently commit a binary.
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1,2 @@
+oksh
+*.o
diff --git a/GNUmakefile b/GNUmakefile
@@ -10,7 +10,7 @@ DOCDIR ?= ${PREFIX}/share/doc/oksh
INSTALL = /usr/bin/install
CFLAGS ?= -O2 -pipe
-CFLAGS += -Wall -DEMACS -DVI
+CFLAGS += -Wall -DEMACS -DVI -Iportable/common
OBJS = alloc.o c_ksh.o c_sh.o c_test.o c_ulimit.o edit.o emacs.o eval.o \
exec.o expr.o history.o io.o jobs.o lex.o mail.o main.o misc.o \
@@ -39,6 +39,8 @@ else ifeq ($(UNAME_S),Darwin)
GROUP = bin
OBJS += portable/common/reallocarray.o portable/common/strtonum.o \
portable/darwin/vis.o
+else ifeq ($(UNAME_S),OpenBSD)
+GROUP = bin
else ifeq ($(findstring CYGWIN,$(UNAME_S)),CYGWIN)
OBJS += portable/common/reallocarray.o portable/linux/setmode.o \
portable/linux/signame.o portable/linux/strlcat.o \
diff --git a/README.md b/README.md
@@ -19,4 +19,4 @@ The rest are BSD or ISC licensed.
Get a tarball
-------------
-http://devio.us/~bcallah/oksh/oksh-20171027.tar.gz
+http://devio.us/~bcallah/oksh/oksh-20171030.tar.gz
diff --git a/misc.c b/misc.c
@@ -13,11 +13,7 @@
#include <unistd.h>
#include "sh.h"
-#ifdef __OpenBSD__
#include "charclass.h"
-#else
-#include "portable/common/charclass.h"
-#endif
short ctypes [UCHAR_MAX+1]; /* type bits for unsigned char */