Commit Graph

1139 Commits

Author SHA1 Message Date
tg
12e371f1af • scanning for integer types: only scan for these we need,
i.e. uint32_t and uint64_t
• faking <stdint.h>: u_int32_t is not part of ISO C99, so
  do not add it there
• add a test if u_int32_t is declared, for the sake of the
  fucked up OpenBSD standard arc4random(3) declaration, and
  define it to uint32_t if the former type is not available,
  e.g. on Solaris or if we fake <stdint.h>
• fix detection of arc4random_pushb(3) and the prototypes
  if one of the things above applied to our system
• fix detection of arc4random function suite prototypes if
  they are added via an arc4random.c file in the srcdir, and
  copy that file into builddir (if it does not already exist)
  to keep these isolated from each other

based on a real-life bug report by cnuke@ at the Croatian restaurant ☺☻
unbreaks “set ±o arc4random” on Solaris, both SUNpro and GCC
2007-09-11 18:12:16 +00:00
tg
699b908b9d do not use “test … -o …” 2007-09-11 17:49:57 +00:00
tg
88bfbeb0f0 make "test $x = 1" into "test 1 = $x" consistently 2007-09-11 17:47:25 +00:00
tg
0904ad7d89 extend the scope of tests run with -Werror for gcc
otherwise, gcc4 on non-propolice-capable targets doesn’t find __attribute__
2007-09-10 20:16:47 +00:00
tg
3d6f318d90 On Debian GNU/kFreeBSD, gcc version 4.2.1 (Debian 4.2.1-5):
../edit.c: In function ‘x_cf_glob’:
../edit.c:508: warning: ‘words’ may be used uninitialized in this function
2007-09-09 20:03:32 +00:00
tg
49c7194ffa • plug in some Digital Taugtnix support, with help from the IceWM coffee pot
maintainer, or, From: Josef 'Jupp' Schugt <schugt@cip.physik.uni-bonn.de>
• www: sync changelog
2007-09-09 19:24:58 +00:00
tg
957291d4b8 sync: “unset” always returns zero as per SUSv3 2007-09-09 19:18:59 +00:00
tg
ccb41ecb4d shut up some gcc warn_unused_result thingies from Fedora 2007-09-09 19:12:10 +00:00
tg
1b7294b564 more cosmetics 2007-09-09 18:31:41 +00:00
tg
9e7a50327f cosmetics - fix missing variable name 2007-09-09 18:30:04 +00:00
tg
cdac7b7d65 clean up our own junk 2007-09-09 18:21:52 +00:00
tg
c1c939e340 • fix memory leaks found by coverity
from netbsd via oksh
  we had the NULL pointer deref already fixed
• avoid a bogus not-setting the return value of edit.c:x_file_glob()
  introduced by the above change in oksh
• escape ? as well (but not ] because that’s wrong)
  reminded by cbiere@netbsd via oksh
• Unsetting a non-existent variable is not an error. See
  http://www.opengroup.org/onlinepubs/009695399/utilities/unset.html
  report from Arkadiusz Miskiewicz; fixed based on
  http://cvs.pld-linux.org diff via oksh but modified slightly
• Be more smart waiting for input for non-interactive scripts.  Fix
  based on a diff from debian:  see their bug#296446 (via oksh)
  modified slightly
  this also fixes cnuke@’s “mksh busy loop” problem, for which I never
  received a bug report, but the Debian bug page contains a set of two
  scripts to reproduce this before (and no longer after) this commit
• some KNF
• bump version
2007-09-09 18:06:42 +00:00
tg
fe65f616e4 some have u_int but not uint32_t 2007-09-09 12:02:38 +00:00
tg
6f30f395bf -std=foo can’t be made fatal even with -Werror, live with it 2007-09-09 11:55:44 +00:00
tg
b06d40f8f2 autoscan for uint32_t et al. if <stdint.h> not present
this un-special-cases PW32 and should help OSF/1
2007-09-09 11:04:30 +00:00
tg
a1afc4e0a7 gcc 2.8.1 (on Digital Taugtnix a.k.a. alpha-dec-osf4.0d) makes -std=foo
failures a warning only
2007-09-09 10:49:20 +00:00
tg
daf019728c fix typo (blsk -> bksl) 2007-09-07 23:57:14 +00:00
tg
6c47b381c2 testing with the Heirloom sh found this… d’oh 2007-09-07 21:58:40 +00:00
tg
7ddc3d788f disable annoying privacy invasion, fight the Überwachungsstaat 2007-09-03 09:25:05 +00:00
tg
87eeeb6da0 revert the -std=gnu99–by–default change until programmes are ready, as this
is too much annoying (for now) – extra commit so that we have a changeset
2007-08-24 14:25:33 +00:00
tg
c8ac9422f9 • add -std=gnu99 to default CFLAGS
• first round of assorted fixes
2007-08-24 14:19:56 +00:00
tg
6b9c277fbc shut up tcc 2007-08-20 14:12:29 +00:00
tg
b82204aa3d proto 2007-08-20 14:06:10 +00:00
tg
bc8ba122a7 cast to quieten gcc/obsd/sparc64 __CRAZY=Yes 2007-08-20 13:57:47 +00:00
tg
1e3783f030 employ string pooling techniques to save off a few more bytes
(probably more than the new “rename” builtin ever required…)
2007-08-19 23:12:23 +00:00
tg
ca46f3dc98 new builtin “rename” (this name sounds better than “mksh_mv_rescue” ☻)
to just call rename(2) directly, e.g. if /bin/mv needs /lib/ld-uClibc.so.0

some assorted code cleanup
2007-08-19 22:06:27 +00:00
tg
49c95a8938 put clear-screen on ESC ^L as suggested by the AT&T ksh people in
http://www.opensolaris.org/os/community/on/flag-days/pages/2007081701/
2007-08-18 01:20:28 +00:00
tg
e99f988aae feature freeze for mksh R31, to be released as part of MirOS #10 2007-08-18 00:22:09 +00:00
tg
f684b0ceb1 Implement the “source” command, as requested by some and agreed bsiegert@
In contrast to AT&T ksh93, its semantics are like GNU bash in that it ap-
pends the current working directory to the search path; it is implemented
as a shell alias instead of enhancing funcs.c:shbuiltins[] like in ksh93.
2007-08-13 19:39:21 +00:00
tg
7381c6c274 mention that $RANDOM is _always_ 15-bit unsigned integer, even arc4random’s 2007-08-12 14:01:38 +00:00
tg
f3bb1472df Debian warning cleanup 2007-08-12 13:52:03 +00:00
tg
499327f7b8 add “set -o arc4random”, RTFM for details 2007-08-12 13:42:23 +00:00
tg
cf2eb697e2 use bounds check for function that calls read
prompted by lina output, 10x tarzeau
not a bug
2007-08-06 12:02:39 +00:00
tg
45cadd2abf make sure we don't show any junk in MKSH_CLS_STRING even if the terminal is
not standards compatible
2007-07-31 15:42:50 +00:00
tg
47836e45e7 add a new bindable command “clear-screen”, which can be bound to the ^L key
so that archite@midnightbsd won’t have to add evil kludges to oksh again if
they switch their ksh to mksh ☺

both “clear-screen” and “error” aren’t bound; default binding for ^L stays,
as usual, “redraw” (principle of least surprise); however GNU bash converts
also might want to put “bind ^L=clear-screen” into their ~/.mkshrc.
2007-07-31 15:29:40 +00:00
tg
73fa4622ef do the rlim_t for tcc cast dance for Debian GNU/kFreeBSD 2007-07-31 13:55:26 +00:00
tg
496b8f4dc3 • new way of checking for mknod & friends, due to tcc vs glibc weirdness
• bump vsn for the code restructuring
2007-07-31 11:11:25 +00:00
tg
809c1446b2 some steps towards building with tcc 2007-07-31 10:42:15 +00:00
tg
9884efef00 • implement some (not yet tested) kludges for tcc
• define $CPP internally
2007-07-31 10:17:52 +00:00
tg
735ec12dfd • TenDRA (testsuite pass)
• Fabrice Bellard’s tcc (not supported yet, may follow later)

reminded by tarzeau (Gürkan Sengün)
2007-07-31 10:04:46 +00:00
tg
3e5b234965 these are actually cool people, I think 2007-07-26 22:38:31 +00:00
tg
b9da9d4ea3 if the shell doesn't know the cwd, “builtin pwd” won't either 2007-07-26 13:37:21 +00:00
tg
8c958b410d small textual nits 2007-07-26 13:35:58 +00:00
tg
b8a693ed68 mention ${foo:2:3} limitations 2007-07-26 13:32:16 +00:00
tg
3718a00106 • test on HURD (gnubber)
• fix unreachable code (break stmt) cought by suncc on yofuh's E420
• bump vsn to today
2007-07-26 13:23:52 +00:00
tg
7374f12176 some more not-so working platforms
can't extend the working ones better since my UWIN decided to break
after MSVC++ Expreß seems to have “upgraded” some libraries… *sigh*
2007-07-24 21:54:46 +00:00
tg
b20e5a90ce initial support for PW32, not quite working yet (same issues as Minix 3 and Plan 9, I think) 2007-07-24 21:47:14 +00:00
tg
e37577de42 fix another errexit bug: unwind() is __dead, so the pseudo-signal was never
delivered to the process
• regression test by Clint Pachl, verified against Debian ksh93 by me
• place to fix it in the code discovered by Otto Moerbeek
2007-07-24 11:22:04 +00:00
tg
f2a52c65fa … and fix that bug.
Guvf pbzzvg haxabjvatyl fcbafberq
ol NheVFC ToE, fvapr jr hfr zxfu,
naq zl bgure gnfxf ner jnvgvat...
2007-07-23 14:28:52 +00:00
tg
7c0209771c more testcase – currently broken… had thought of this but apparently not done 2007-07-23 14:10:48 +00:00