Commit Graph

61 Commits

Author SHA1 Message Date
tg ab231f3595 new conditional: HAVE_ARC4RANDOM_PUSH 2006-06-21 19:35:38 +00:00
tg 7672b9b346 apply some fixes from OpenBSD and don't apply some others
but sync RCS IDs for easier future adaption:
* Simplify savefd() by removing the "noclose" flag and make noclose
  behavior the default. Almost all uses of savefd() are followed
  by an implicit or explicit close.
* fix typos
* might as well make ksh_getopt() match real getopt(), ie. get rid of that
  stupid EOF concept that was never true. adobriyan@gmail
* use SEEK_* for lseek()
* fix lint comments, no functional changes
* remove excessive optimization; from adobriyan@gmail
* only santa checks things twice; from adobriyan@gmail
* Interpret zero-filled numbers as decimal; PR 4213; from Alexey Dobriyan
2006-05-10 18:54:13 +00:00
tg 5726a50ab9 * shuffle around _*_SOURCE definitions (sh.h -> Build.sh), per OS
* Tonnerre Lombard reports that Solaris 10 needs _BSD_SOURCE
2006-03-19 18:06:32 +00:00
tg 94ee3b388a sync with OpenBSD: remove unused code and vars; name clash with libc
compiles under MirBSD
2006-01-29 20:04:54 +00:00
tg 95cfad6339 * only have one $MirOS RCS ID per file to shrink source size
(this is an exception from normal use)
* bump to R26
2005-11-22 18:40:44 +00:00
tg f38d8299f9 Change interpretation of '\"' in here documents with substitution
according to SUSv3 and other modern shells (POSIX allows both).
Idea for the patch (add another lex state) from OpenBSD, but the
implementation differs slightly (and is better in quality).

Also add two testcases (/bin/sh passes both, old mksh only one),
and document the change in the manual page. Sync RCS IDs with OBSD.
2005-11-22 18:36:20 +00:00
tg 9b97d72d5e * move _all_ #include stuff into sh.h
* sort out #include stuff which isn't necessary on MirOS into compat.h
2005-10-25 19:53:29 +00:00
tg df22a0fb1b Shuffle some stuff around to the compat functions and add glue 2005-10-25 19:46:11 +00:00
tg 2f9687c58a follow OpenBSD and add mknod as mksh builtin (mknod <file> p acts as mkfifo)
but write a good chunk of that code myself (better structured, better error
handling, more gotos, less function calls, int -> bool)

passes all tests on mirbsd; this will become mksh R25 once tested on other
supported OSes
2005-10-21 12:41:56 +00:00
tg 7ee8296628 our test(1) promises we can do string1 < string2, and
our /bin/test uses mksh... so we pee (literally) on
POSIX and don't accept < and > only for [[ ... ]] operator
2005-10-08 19:31:00 +00:00
tg 0651ba008e ^V now is quote, not version, even in emacs mode. (From OpenBSD.)
Also, the "version" command got removed in its entirety.
Shaves off another global variable, even.
2005-08-02 12:35:27 +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 74a942550d it's said newer NetBSDen have arc4random(3) 2005-07-05 22:00:20 +00:00
tg 76c700b3a6 get rid of $PGRP
get rid of special bourne-shell emulating mode
2005-07-04 12:34:24 +00:00
tg 3fb44287d4 mksh now does not look at $EDITOR and $VISUAL any more to determine
the editing mode; default is emacs (vi and gmacs off).
mksh also defaults to emacs-usemeta=OFF now.
2005-07-04 12:07:41 +00:00
tg 37d4f1e874 first step for GNU/Cygwin support 2005-06-24 15:36:57 +00:00
tg 521da70fc8 * major revamp of build system
* whitespace cleanup; junk comment removal
* syndicate debian/copyright file from my port (shrinks sh.h)
* bump to R23
2005-06-08 21:51:22 +00:00
tg 428e27331e forgot a #endif 2005-05-26 23:12:09 +00:00
tg dc22f4da3a * fix logic for srand() I got reversed
* introduce HAVE_ARC4RANDOM tristate (0/1/undef) and fill it appropriately
* NetBSD(R) joins the list of OSes which don't have arc4random
2005-05-26 23:01:30 +00:00
tg cd54ef8f51 * fix emacs [ tabcompletion bug
XXX it's probably a bug in vi mode too, it just doesn't show
* bring manual page and reality into closer sync'd state
* sort ulimits
2005-05-25 23:31:08 +00:00
tg d7c3f0a066 make setuid/setgid scripts and access() work again
by reverting some OpenBSD and applying some Debian diff
2005-05-25 13:46:02 +00:00
tg 16fb264efc aaaand: Interix. 2005-05-23 16:23:19 +00:00
tg 37d3bd813d no persistent history (flock missing), no arc4random, etc. for Solaris 2005-05-23 15:36:56 +00:00
tg dc5614a091 missing preprocessor defines on Solaris 2005-05-23 15:24:43 +00:00
tg b8a06e0fbe * Solaris misses sig_t
* our gmatch becomes gmatchx, it's extended against sh(C)
2005-05-23 15:18:17 +00:00
tg 8266c126ac * add definition of __RCSID if not yet existant (GNU/Linux)
* add declarations of strlcpy and strlcat (for GNU/Linux, again)
* always include <sys/resource.h>
* some more compile / warning fixes
2005-05-23 14:19:14 +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
tg d8d708aa45 * un-hook bin/ksh, usr.bin/xmlwf and lib/libexpat from the build
- expat as discussed with bsiegert@ today on the phone
  - ksh as announced earlier on the lists
* un-hook lib/libexpat from make includes
* remove /usr/include/{,open}ssl upgrade workaround from includes/Makefile
* nuke old bin/ksh
* nuke libexpat and xmlwf
2005-10-21 11:33:15 +00:00
tg a90702a5a1 Initial revision 2005-03-06 15:42:55 +00:00
tg 6625949936 solaris doesn't have sig_t 2004-12-31 19:54:16 +00:00
tg 130367d617 further cleanup 2004-12-31 19:37:03 +00:00
tg 2b6df533b9 Use the BSD sig_t instead of homegrown handler_t
Remove KSH_SA_FLAGS
From: Todd C. Miller <millert@cvs.openbsd.org>

sanitise signal handling a bit (will be revisited)
2004-12-31 17:29:28 +00:00
tg 8f06ee02a7 Use _PATH_BSHELL instead of hardcoding "/bin/sh"
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-31 17:08:29 +00:00
tg 0114af375d Use stdbool.h instead of rolling our own bools.
From: Todd C. Miller <millert@cvs.openbsd.org>

XXX #ifndef HAVE_STDBOOL_H ?
2004-12-28 22:32:09 +00:00
tg cddaa62a46 Flags set in signal handlers should be volatile sig_atomic_t
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-28 22:28:01 +00:00
tg 6354a66090 always BRACE_EXPAND
no binary change
2004-12-18 19:27:21 +00:00
tg cbeac44097 * unifdef EDIT, VI, EMACS, HISTORY
* optimise away 0 ||
no binary changes
2004-12-18 19:17:10 +00:00
tg 4c4a9323f8 unifdef: KSH
no binary change
2004-12-18 18:58:32 +00:00
tg 6d8b225141 make array_index_calc static and don't limit
array indices (well, to 2^31-1, but that's
for integer reasons only)
2004-12-18 18:39:10 +00:00
tg c34add61ff un-OS/2 (sorry)
no binary change
2004-12-13 19:05:09 +00:00
tg 97d9512149 bump to mksh R19 2004-12-10 18:12:32 +00:00
tg 7920708324 Initial revision 2004-12-10 18:12:29 +00:00
tg c53499b45e * Build.sh: bail out early if build failure
* Build.sh: fix manpage name
* chvt.c: Solaris:
   chvt.c:57: `TIOCSCTTY' undeclared (first use in this function)
* chvt.c: GNU/Linux:
   /tmp/ccrAeq0h.o(.text+0x5e): In function `chvt':
   : warning: warning: revoke is not implemented and will always fail
* sh.h: let it only change to .section .comment ifdef __ELF__
2004-11-10 19:58:06 +00:00
tg 53f8234d04 sync with ksh's idea of __attribute__(()) 2004-11-10 17:31:38 +00:00
tg d3e9042073 sync with my idea of __RCSID() 2004-11-10 17:29:55 +00:00
tg ee2d2797a4 an array shalt have 4096 entries max. 2004-10-28 16:49:13 +00:00
tg b2de14e57c run GNU protoize
protect header files
nuke some dead code
regenerate configure script
let silly code die
2004-10-28 11:53:44 +00:00
tg 75e25d6e50 de-register, de-inline, de-__P 2004-10-28 11:11:19 +00:00
tg ecdd4d5568 unify spacing of RCS IDs 2004-09-21 11:57:17 +00:00
tg 60cde7c92e another PATH_MAX 2004-09-21 11:37:29 +00:00