• remove strcasestr.c, use home-grown implementation¹, call it stricmp,
and have it return an API-correct const char * • enhance and stylify comments • a little KNF and simplifications • #ifdef DEBUG: replace strchr and strstr with ucstrchr and ucstrstr that take and return a non-const char *, and fix the violations • new cstrchr, cstrstr (take and give const char *) • new vstrchr, vstrstr (take const or not, give boolean value) • new afreechk(x) = afreechv(x,x) = if (x1) afree(x2, ATEMP) • new ksh_isdash(str) = (str != NULL) && !strcmp(str, "-") • replace the only use of strrchr with inlined code to shrink • minor man page fixes • Minix 3 signames are autogenerated with gcc • rename strlfun.c to strlcpy.c since we don't do strlcat(3) anyway, only strlcpy(3), and shorten it • dot.mkshrc: move MKSH=… down to the export line to not disturb the PS1 visual impression ☺ • dot.mkshrc: Lstripcom(): optimise • bump version ¹) side effect from creating API-correct cstrchr, cstrstr, etc. uses goto so it must be better ☻ tested on mirbsd-current via both Makefile and Build.sh
This commit is contained in:
7
Build.sh
7
Build.sh
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# $MirOS: src/bin/mksh/Build.sh,v 1.154 2007/03/03 21:36:06 tg Exp $
|
||||
# $MirOS: src/bin/mksh/Build.sh,v 1.155 2007/03/04 03:04:22 tg Exp $
|
||||
#-
|
||||
# Env: CC, CFLAGS, CPP, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF, TARGET_OS
|
||||
# Environment used: CC CFLAGS CPP CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
||||
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NEED_MKNOD MKSH_NOPWNAM
|
||||
|
||||
v()
|
||||
@ -597,8 +597,7 @@ if test 1 = $NEED_MKSH_SIGNAME; then
|
||||
fi
|
||||
|
||||
addsrcs HAVE_SETMODE setmode.c
|
||||
addsrcs HAVE_STRCASESTR strcasestr.c
|
||||
addsrcs HAVE_STRLCPY strlfun.c
|
||||
addsrcs HAVE_STRLCPY strlcpy.c
|
||||
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -DCONFIG_H_FILENAME=\\\"sh.h\\\""
|
||||
|
||||
case $s:$HAVE_MKSH_NOPAM in
|
||||
|
Reference in New Issue
Block a user