tg
94acf23391
tabs, bools
2009-04-07 19:51:47 +00:00
tg
ecef21a50a
switch mail address to .org domain
2009-04-07 19:46:55 +00:00
tg
8cc7fdb834
"evil" workaround to the alignment issues: embed an ALLOC_ITEM into
...
struct env (other structures defined have no "foreign type with pos-
sible alignment constraints" members) and take care of it while dea-
ling in a struct env instance
2009-04-07 19:43:28 +00:00
tg
48ee59ffd0
rename env variable to denv
...
I'm fgrep-w'ing for struct env right now
2009-04-07 19:27:49 +00:00
tg
c841d1513d
of *course* I had to introduce an inverse-logic error
...
d'oh. the XOR check's result needs to be reversed, as it tests for validity
2009-04-07 19:25:41 +00:00
tg
a3cfe7d2cf
this is no longer shared code
2009-04-07 19:15:48 +00:00
tg
d2b5538f55
some int->bool, KNF, ...
2009-04-07 19:13:11 +00:00
tg
31d2796169
simplify
...
if ((flags & (1 | 2) == 0) || (flags & (1 | 2) == (1 | 2)))
to
if (!(flags & 1) ^ !(flags & 2))
which works because ! returns 1 or 0, making the ^ an ^^, and
because XOR survives NOTting its arguments
2009-04-07 19:08:25 +00:00
tg
edeb22fb96
tabs vs spaces
2009-04-07 19:06:44 +00:00
tg
d43f4efe60
employ some "nice" constants and comment lalloc.c
2009-04-07 18:56:51 +00:00
tg
4de58fe6fa
globalise SIZE_MAX definition
2009-04-07 18:46:07 +00:00
tg
18199e20fd
pass LOCPATH environment variable too, might be needed on glibc systems
2009-04-07 18:45:19 +00:00
tg
9e83002841
try to do some optimum struct packing except for struct env
...
(pointers, longs, size_t first; time_t next; int etc. then enum, bool)
2009-04-07 18:41:37 +00:00
tg
c7ccde864e
apply workaround given to me in IRC yesternight, just define away the
...
const keyword to not trigger the famous ACK const bug (no chance it’ll
get fixed, not even in Minix 3’s ACK version)
2009-04-06 08:37:42 +00:00
tg
e88736b5ef
decouple conservative file descriptor use from MKSH_SMALL, with the
...
new MKSH_CONSERVATIVE_FDS præprocessor flag, because Minix 3, for
example, needs it (otherwise “mksh Build.sh” fails)
2009-04-06 08:33:37 +00:00
tg
b6dcee70fd
fix CPPFLAGS detection logic for MKSH_ASSUME_UTF8
2009-04-06 08:29:21 +00:00
tg
2d2b3f0b2d
on Minix 3, <strings.h> needs <ansi.h> (via <sys/types.h>)
2009-04-06 08:24:57 +00:00
tg
5bfb6c97df
remove extra parenthesēs; the error on WIFSIGNALED is still there:
...
unary - and & prios on Minix are correct, but gcc4 warns too much…
2009-04-05 13:37:37 +00:00
tg
7e7c648bd8
more extra parenthesēs (gcc4 strict warnings + broken system headers)
2009-04-05 13:07:11 +00:00
tg
5c76604402
replaced cannot sort
2009-04-05 13:07:06 +00:00
tg
3dc6b813fd
• document new (clarified) macro behaviour – bugfix
...
• make bind ^X vs ^[[ section more clear
2009-04-05 12:45:25 +00:00
tg
43de9f8dff
shorten
2009-04-05 12:42:34 +00:00
tg
398be9867a
fix jobless mksh so much to make it work on Minix 3
2009-04-05 12:35:32 +00:00
tg
97c9d172d7
add comments, remove dead code
2009-04-05 12:35:21 +00:00
tg
5e4ffcbedd
From: Alexander Hall <alexander@beard.se>
...
when following bind key macros, do not so recursively
2009-04-05 12:28:55 +00:00
tg
81b84b63b0
assume Plan 9 will also want a jobless mksh
2009-04-05 12:21:14 +00:00
tg
efbdae7892
add (commented out) compatibility to MidnightBSD 0.1 /bin/sh – not
...
desired, because it defaces standards compliance
cf. https://www.mirbsd.org/permalinks/wlog-10_e20090329-tg-g10024.htm
2009-04-05 11:44:56 +00:00
tg
e8fad467cf
From: Alexander Hall <alexander <at> beard.se>
...
support multi-line bind macros (part 1 of 2 of entire diff)
2009-04-05 11:18:34 +00:00
tg
81c6c80fd6
persistent history needs munmap, not just mmap (Minix 3 lacks only the former, WTF?)
2009-04-03 10:56:32 +00:00
tg
9aec05ce6a
fix compilation
2009-04-03 10:54:58 +00:00
tg
e6a4798170
extra parens around WIFSIGNALLED seem necessary on some OSes (gcc 4.1)
2009-04-03 09:48:10 +00:00
tg
9aff4d78fe
make {get,set}rlimit code depend on RLIM_INFINITY existence (PW32, Minix 3)
2009-04-03 09:45:23 +00:00
tg
cf6109d912
detect ACK, handle Minix better
2009-04-03 09:42:37 +00:00
tg
e64197ba90
experimental: prevent FMONITOR from being set on, say, Minix 3, Plan 9
2009-04-03 09:42:25 +00:00
tg
56c6e384e6
(experimental) implement getrusage via times if not found
2009-04-03 09:39:07 +00:00
tg
d6f6834d0d
add some CPPFLAGS only if setmode.c
2009-03-29 17:50:45 +00:00
tg
40debc6f55
another cast to void to silence gcc1 on BSD/OS
...
XXX rlim_t = quad_t there is not detected
2009-03-26 11:22:53 +00:00
tg
db6ed8be7c
... and it did in fact require DEC ucode cc to spot this!
...
gcc, SUNWcc, pcc, llvm-gcc, clang, etc. all didn't say a thing!
now compiles warning-free (testsuite pass) on ULTRIX 4.5 (1986),
and OSF/1 X2.0-8 (testsuite norun: perl missing) has only the usual
bitchings about "volatile sig_atomic_t" because the latter part is
already volatile, but otherwise warning-free compile, works fine
2009-03-25 21:45:28 +00:00
tg
edf126c810
just assume realloc(NULL, n) is ANSI C89 (for n>0) but provide a
...
define to do otherwise; shrinks the code and optimises for speed
2009-03-24 18:34:39 +00:00
tg
9f37ccb368
fix up a bogus gcc4 uninitialised storage warning
...
(we’d initialise this to NULL anyway if we used realloc-can-take-NULL)
2009-03-24 14:07:41 +00:00
tg
c7b2af502e
further simplify
...
XXX check whose platforms’ realloc(3) don’t take NULL
2009-03-24 08:53:45 +00:00
tg
ebfce0fafd
we do not need the group backpointer, except for a (very little) amount
...
of sanitising; since this is supposed to be the lightweight allocator,
with the guarding allocator coming back in later, remove it
reduces memory consumption below what espie's allocator used ☺
2009-03-24 08:37:37 +00:00
tg
44202462f5
even more clear; ok «gps23»
2009-03-23 12:21:02 +00:00
tg
a6d9fe51dc
give example
2009-03-23 12:16:58 +00:00
tg
c37c7aea61
document somewhat surprising behaviour
...
12:58⎜<gps23:#ksh> someone please tell me why: code=1; if [ "code" -eq 1 ] returns true
13:10⎜<mira|AO:#ksh> hm but I see the problem
13:10⎜<mira|AO:#ksh> code=1; x=code; [ "$x" -eq 1 ]
13:10⎜<mira|AO:#ksh> this is indeed unexpected
13:10⎜«pgas:#ksh» gps23: code=1+1;[ "code" -eq 2 ] && echo true #also works
as of now, we consider
13:13⎜«pgas:#ksh» gps23: when you use -eq there is something like an implicit $(( )) around the
⎜ arguments
13:14⎜«pgas:#ksh» [ code -eq 1 ] is the same as [ $((code)) -eq 1 ]
to be documented.
2009-03-23 12:15:33 +00:00
tg
a8e3154b7a
sometimes I have tomatoes on my eyes (or is it the CRT monitor?)
...
make SIZE_MAX portable, 10x to Jonathan “ciruZ” Schleifer for the hint
2009-03-23 10:31:15 +00:00
tg
004b3b1e08
unbreak with dietlibc, whose <stdint.h> has no SIZE_MAX, defying SUSv3
2009-03-23 09:08:35 +00:00
tg
0d254e4088
make buildable again after memory allocator change
...
(why didn’t anybody report this?)
2009-03-23 08:54:12 +00:00
tg
99a8c2a814
bump to R37; the ;& and ;;& are postponed indefinitively for now,
...
as I don't get to it and it's nontrivial
2009-03-22 18:50:43 +00:00
tg
62b28858d4
sync; fold oksh-seterror test into errexit-*; use print not printf
2009-03-22 18:28:35 +00:00