Commit Graph

49 Commits

Author SHA1 Message Date
tg e2dcf35cf5 catch z/OS not having $Config not filling in the __perlpath env correctly 2017-05-05 21:17:31 +00:00
tg 6dc1ab0379 some more small EBCDIC fixes 2017-05-05 19:43:52 +00:00
tg 0ee37a982d move more EBCDIC logic into check.pl 2017-05-03 14:51:15 +00:00
tg d8bd19e23e handle EBCDIC in the testsuite runner (error display)
- move categories for that to test.sh, simplifying it
- $ebcdic in Build.sh is now for the target, not the buildhost
2017-05-03 13:00:10 +00:00
tg 7a68ad12d2 require Config only if it exists, which it reportedly doesn’t on OS/390 2017-05-01 19:43:23 +00:00
tg bcf3130230 clean up OS exclusions somewhat: have Perl substitute the UTF-8 locale 2017-04-29 15:18:25 +00:00
tg 74bd8b61a3 fix accidentally defanged PATHSEP test 2017-04-20 21:43:43 +00:00
tg 124e6693e9 janitorial work 2015-11-29 17:05:02 +00:00
tg 4adcfe8b58 oksh sync, simplify *all* if(x)free(x); constructs, simplify x_push() and sync boilerplate while here 2015-09-05 19:19:12 +00:00
tg ba8a6e9461 merge OS/2 style PATH (absolute with drive letters, ‘;’ as separator)
From: KO Myung-Hun <komh@chollian.net>
2015-07-10 19:36:38 +00:00
tg f460677c77 fix pdksh mistake of using +-= in char class; move - to end and add \d 2015-04-29 19:01:03 +00:00
tg 8f53c68265 • protect POSIX builtins and utilities from aliases, e.g:
‣ : → \:
  ‣ alias → \alias
    ⇒ except in some internally used cases, where we use \builtin alias
  ‣ command . → \command .
• protect Korn Shell builtins from aliases and functions, e.g:
  ‣ typeset → \builtin typeset
    ⇒ also unravels the “local” alias used
  ‣ print → \builtin print
• protect internally-used things from aliases
  ‣ “let]” is not a valid function name
  ‣ “set” is POSIX so we don’t expect anyone to override it in a function
• use “command -v” instead of “whence -p” (“which”) in most
  places; thanks izabera from #ed on IRC for pointing out
  that “command -v” is POSIX – except, “whence -p” a̲l̲w̲a̲y̲s̲ looks
  for an executable and shows its full pathname; “command -v”
  also resolves to aliases, functions and builtins, so only use
  it where it makes any sense (both never output to stderr)
• make most of dot.mkshrc work in the face of such aliases
  ‣ “ulimit -c” is used; this is not POSIX, and not portable;
    maybe we should make ulimit accept-and-ignore the most
    common limits even if the OS doesn’t use them?
• update list of builtin aliases in the manpage
2015-03-08 22:54:36 +00:00
tg 609a89968f better output in the face of both expected-fail:yes and need-pass:no tests 2014-08-19 07:43:32 +00:00
tg 7330970bfa fix some of the signal stuff (still didn’t get rid of awk(1) and printf(1)
calls in Build.sh, we need HOSTCC for that… which we should do, using BER
or something encoded for integers, and pregenerated hashtables as planned)

also, bump to R50 beta, due to today’s language changes
2014-06-09 13:25:53 +00:00
tg 14e2537d50 improved debugging, and chop the input
discovered while debugging lewellyn’s issue on Interix
2014-01-25 22:45:49 +00:00
tg 70233e4cd4 play catchup with weird obsd reorg (in which they lost a few tests, even…) 2013-12-15 15:45:31 +00:00
tg 6e1ab32be6 don’t use File::Temp because it’s Perl >= 5.6.1 only
spotted by RT
2013-11-30 17:11:06 +00:00
tg bd795a83ae partial merge and full RCS ID sync with oksh
merged:
• new regression tests
• check.pl (tests/th) better tmpfile handling
• exec.c 1.50: POSIX specifies that for an AND/OR list,
  only the last command's exit status matters for "set -e"
• ksh.1 1.147: document the above
• eval.c 1.39: “Make $(< /nonexistent) have the same behaviour
  as $(cat /nonexistent) wrt. errors (do not unwind and do not
  treat this as fatal if set -e is used).”
  ‣ additionally make shf_open() return errno and actually show
    the error message from the system
• regression-39 test: remove the “maybe” marker
  ‣ but decide on correct POSIX behaviour

already been fixed in mksh:
• check.pl (tests/th) exit 1 if tests fail

not merged:
• main.c 1.52: run traps in unwind() before exiting;
  I’m pretty sure this is already working as-should in mksh
• eval.c 1.38: “Commands executed via `foo` or $( bar ) should
  not inherit "set -e" status.” As discussed in IRC, this is
  just plainly WRONG.
2013-07-21 18:36:03 +00:00
tg ff0d8cd3e9 rewrite the EINTR importing code with help of stsc from #nosec on IRC,
and add a semicolon to the end of the BEGIN block (RT says it fixes LynxOS)
2012-04-06 12:22:14 +00:00
tg 820b6e905c make even Errno.pm optional 2012-04-01 04:03:08 +00:00
tg 3c4d2602ac use Errno, not POSIX, to get EINTR; maybe this is more portable 2012-03-31 18:47:20 +00:00
tg 80becae42d I have reason to assume this fixes a Cygwin warning (false-positive) seen by RT 2012-03-26 21:06:34 +00:00
tg 2cfc3e5c3d mksh R40 Release Candidate 1
Testsuite:
• add new need-pass: {yes|no} attribute, default yes
• exit with 1 if a need-pass test failed unexpectedly
  idea by Kacper Kornet <draenog@pld-linux.org>
• mark utf8bom-2 as need-pass: no
Infrstructure:
• add housekeeping function for making a tty raw
• switch functions with unused results to void
• struct op: u.charflag contains last char of ;; in TPAT
• var.c:arraysearch is now a global function
Language:
• add ;& (fall through) and ;| (examine next) delimiters
  in addition to ;; (end case) as zsh extensions, because
  POSIX standardised on ;& already
• add -A (read into array), -N (read exactly n bytes),
  -n (read up to n bytes), -t (timeout) flags for read
  from ksh93
• allow read -N -1 or -n -1 to slurp the entire input
• add -a (read into array the input characters) extension
  specific to mksh to read, idea by David Korn
• add -e (exit with error if PWD was not set correctly
  after a physical cd) to cd builtin, mandated by next
  POSIX, and change error codes accordingly
Rewrites:
• full rewrite of read builtin and its manpage section
• add regression tetss for most of the new functionality
• duplicate hexdump demo tests for use of read -a
• use read -raN-1 in dot.mkshrc to get NUL safe base64,
  DJB cdb hash and Jenkins one-at-a-time hash functions
2011-05-29 02:18:57 +00:00
tg a7091123aa Add “-C regress:no-ctty” option to test.sh for Fedora chroots
STRONGLY DISCOURAGED
2011-03-28 21:58:06 +00:00
tg 6784af6dbd • use mksh getopts to parse options in test.sh, collapse multiple -C args
• sort arguments
2011-03-28 21:15:05 +00:00
tg e0c4ad7fa9 port to FreeMiNT: add OS uname and flags; 2>&- is evil™; $UNIXMODE must be preserved; unlink(2) is weird 2011-02-27 19:29:20 +00:00
tg 0432f97ffe more KNF, mostly whitespace, this time more manual labour applying style(9) 2009-06-10 18:12:51 +00:00
tg b145ca5c9f • sync distrib/special/mksh/Makefile with bin/mksh/Build.sh and
fix the regression test’s results while here, which have been
  broken since cid 10049D9BE5254CE65B8
• get rid of separate copyright file which was intended for De-
  bian; track down commits in all files of oksh-mirbsd and mksh
  to get correct copyright years per-file, as is BSD custom
2009-05-16 16:59:42 +00:00
tg 18199e20fd pass LOCPATH environment variable too, might be needed on glibc systems 2009-04-07 18:45:19 +00:00
tg 2427e028c0 spelling fixes, from oksh 2009-03-22 16:59:18 +00:00
tg d363c6a729 revision 1.13 told lies and was an incomplete commit
d’oh, nobody noticed, as nobody uses icc anyway… but
MirPorts llvm-gcc currently is similarily broken ;-)
2008-12-20 20:21:19 +00:00
tg efc4971c9a prevent using a possibly undefined variable
(although the perl installation in question is probably broken)
2008-07-14 14:53:23 +00:00
tg 4738940ded … and $__perlname (for perl5 ipv perl, etc.) 2008-04-01 16:26:42 +00:00
tg 018d44cf4c export __progname as environment to the test script,
so that the "$0" abuse can stop
2008-04-01 16:01:45 +00:00
tg d18e58e74d fix environment handling for perl 5.003_02
gotta love 1997’s software
2008-03-23 20:54:29 +00:00
tg c7594709db mention only one -e works 2008-02-29 12:48:09 +00:00
tg 20f32015d0 icc needs this 2008-02-29 12:47:03 +00:00
tg f69f2664df spacing 2007-10-25 14:44:45 +00:00
tg e60d1db958 use binmode to fix on UWIN 2007-07-01 18:00:00 +00:00
tg a207b0eda5 this doesn't need a shebang line, especially not one hardcoding /usr/bin/perl 2007-02-13 12:59:03 +00:00
tg 87f681b488 * revert some of the const-warning cleanup which must be done
with different means (reads, tricky magical kludgery)
  YES, THIS BREAKS -rHEAD, I KNOW.
* while here, fix spelling
2007-01-12 10:18:22 +00:00
tg b0eb8f5b5e * check.t: add two mkshrc-tests (turn on, turn off)
* check.pl, check.t: add mkshrc-test whether "real" $HOME/.mkshrc interfers
* mksh.1: sync with reality: $ENV unset isn't needed, $ENV='' is enough
  to turn on ~/.mkshrc processing
2006-05-08 11:59:41 +00:00
tg ee7992988b * move <sys/param.h> include to sh.h
* fix compilation and invocation of test suite with whitespace in
  the pathnames for real, this time
* clean up (especially whitespace)
2005-07-07 23:27:52 +00:00
tg faecfafee7 beautify 2005-06-08 21:39:59 +00:00
tg 1f32407004 use modern modules and blahblah
from openbsd, by Han Boetes originally

also, clean up comments a bit
2005-06-08 11:06:45 +00:00
tg 0df992276b mksh R22d 2005-06-05 16:38:20 +00:00
tg f860e80cbc this commit made my dedicated server reboot spontaneously,
but the Pentium 120 with a Hercules graphics card (anno 1981)
survives it:

allow building and running the testsuite if the source or
build directory contain spaces (not unusual on Windows®)
2005-05-30 07:05:29 +00:00
tg 5b1a2fe3a9 fix running of all tests 2005-05-23 14:48:21 +00:00
tg cd7b8bd79b Add mirbsdksh R21, which was developed in a temporary external CVS repo-
sitory whose ChangeLog follows. mksh R21 is licenced under the MirOS li-
cence, shown in "sh.h", and a two-clause UCB-style licence by Marc Espie
as shown in "alloc.c".

This executable is a fair bit smaller and shorter than our /bin/ksh that
it is designed to eventually replace (as /bin/sh hardlink), with the old
/bin/ksh to completely vanish. It is still in beta testing though, and I
don't think it will compile on other operating systems.

mksh R21 is a completely new port, bringing together the OpenBSD-current
/bin/ksh, the MirOS-current /bin/ksh and the older mksh R20 (which still
was portable, ocvs-based).
2005-05-23 03:06:10 +00:00