Commit Graph

1520 Commits

Author SHA1 Message Date
tg 518d37b6bf same fuckup as in commitid 100491A793F1CA8D9CA, different place 2008-11-12 06:58:49 +00:00
tg 1cf58ac17e more silently 2008-11-12 06:44:04 +00:00
tg bfec7328d4 allow mksh to leak silently 2008-11-12 06:42:22 +00:00
tg 28a0e28b1d adelete is supposed to be quiet on valid pointers 2008-11-12 06:38:08 +00:00
tg 3c07bc66f0 fix up the fuckage in afree() 2008-11-12 06:35:27 +00:00
tg c6bcbc7bb0 improve error reporting 2008-11-12 06:14:26 +00:00
tg 364a7d116a mergo 2008-11-12 06:12:56 +00:00
tg 548c86147e more careful about disabling cookies 2008-11-12 06:10:51 +00:00
tg 4d62063eca and fix another set of CPPFLAGS for debugging 2008-11-12 06:05:54 +00:00
tg 42b789fc04 no %t and %z specifiers in shf_vfprintf ☹ so use %p and %l instead 2008-11-12 05:55:43 +00:00
tg c113091e2d forgot to charge for the extra size in the abstraction 2008-11-12 05:46:45 +00:00
tg b08956d6a7 raise AALLOC_INITSZ to be less expensive 2008-11-12 05:46:14 +00:00
tg 18b38ac5c7 if the address of bp changes, all backpointers must be adjusted as well ☹
pretty expensive
2008-11-12 05:45:28 +00:00
tg 7f17e3fc91 temporarily disable cookies for debugging 2008-11-12 05:40:23 +00:00
tg b1673ff1a3 with other combinations too 2008-11-12 05:34:20 +00:00
tg c3e17d8f0b get the debugging methods to build 2008-11-12 05:32:34 +00:00
tg 1211cf79cc • bp->last == bp->endp is allowed
• do the realloc properly
2008-11-12 05:27:01 +00:00
tg 4b456b1457 __CRAZY cleanliness: pointer arithmetic 2008-11-12 05:11:05 +00:00
tg 7cbc0b6fa2 this one I could have seen by myself if not for the late time of the day 2008-11-12 05:05:17 +00:00
tg e56b1f628e alloc.c is now not always included any more, aalloc.c is MirOS licenced 2008-11-12 05:00:40 +00:00
tg d15671f6f6 fix first batch of compile warnings, enable aalloc for mirbsd 2008-11-12 04:59:42 +00:00
tg 3c1e46ee4d prepare for aalloc.c, which I have just written myself, as an area-based
allocator using malloc and free, with mmap malloc and omalloc in mind,
not counterfeiting its security measures such as guard pages, and having
some of our own, e.g. XOR random cookies, optional mprotect, etc.

zero cost (for we have arc4random())
2008-11-12 04:55:19 +00:00
tg 8d5d720f08 get rid of tempting sizeofN macro 2008-11-12 00:55:32 +00:00
tg 4d3fc2413e switch to a (nmemb,size) API from a (nmemb*size) API
cost: text += (308, 256, 4, -100)
2008-11-12 00:54:52 +00:00
tg 246b762af7 isolate all knowledge of the area-based allocator from the rest of the code
cost: bss -= (0, 0, 16, 16); text += (520, 504, 516, 480)
[ gcc,pcc X full,small ]
2008-11-12 00:27:57 +00:00
tg c80c28633b change use of “Area *” to “PArea” and “struct Area” to “TArea”
no change in size (mgcc and pcc, small and full)
2008-11-11 23:50:31 +00:00
tg 6a4afdde05 add the workaround for Debian #492377 into the main mirtoconf function,
because Hanno Böck has something similar triggered on Gentoo as well
2008-11-11 23:20:08 +00:00
tg f4f4f64492 if ‘-DMKSH_ASSUME_UTF8’, default HAVE_SETLOCALE_CTYPE to 0 since it’s
unused then anyway, to save two followup mirtoconf checks and headers
2008-11-11 21:52:51 +00:00
tg 6c02c37e52 add new Build.sh option -llvm for bytecode compilation and link-time
intra-module optimisation
2008-11-10 20:25:04 +00:00
tg 2a0e181a70 work around even more format string warning stuff 2008-11-10 19:33:08 +00:00
tg 65b1923b61 build warning-free with LLVM+Clang on MirBSD itself
$ (CCC_LD=mgcc CC=ccc sh Build.sh -r && ./test.sh -v) 2>&1 | tee log
Total failed: 2 (as expected)
Total passed: 278

Just the result is huge, and we could of course build to intermediate
byte code to optimise globally…
2008-11-09 20:32:18 +00:00
tg c6e2845d63 remove dead nested assignment, result from first llvm+clang scan-build
run native on mirbsd
2008-11-09 19:48:02 +00:00
tg 446e019c07 the QNX /bin/ed problem is worse than thought; use a new mechanism,
because categories in check.t are OR’d:
• no-stderr-ed disables the newish-ed tests (tried using testcase)
• stdout-ed enables the oldish-ed tests (variable, if the above
  testcase succeeds, it’s added, but QNX overrides the variable)
2008-11-08 17:36:35 +00:00
tg 5206ddcc65 much simplify and shorten default $PS1 (uses even more magick now) 2008-11-07 20:07:10 +00:00
tg 2697deb55c say hello to QNX, sync clog 2008-11-02 23:06:36 +00:00
tg 6e490218ca On QNX, do not run the tests involving /bin/ed at all, because it appears
oldish but is in fact broken. However, if /bin/ed is MirBSD ed(1), these
actually pass.
2008-11-02 23:03:45 +00:00
tg 17ecb986c8 regenerate CPPFLAGS 2008-11-02 22:42:37 +00:00
tg 89e96b6c86 experimental support for <strings.h>
cf. http://www.opengroup.org/onlinepubs/009695399/basedefs/strings.h.html
QNX seems to bury some functions in there
2008-11-02 22:29:36 +00:00
tg e561d9adfe say hello to nwcc, slightly b0rken though 2008-10-30 17:11:14 +00:00
tg bf3194e937 save 1640 .text bytes in MKSH_SMALL case by not inlining strdupx, strndupx 2008-10-28 14:51:06 +00:00
tg 88d7b7d08b • rewrite code to no longer use statements-as-expressions
• optimise a little
• Build.sh: remove HAVE_EXPSTMT test
• Build.sh, */Makefile: sort tests, regenerate
• mksh.hts: sync clog
2008-10-28 14:32:43 +00:00
tg 5167e7398b sync MirBSD-specific mksh Makefiles after recent Build.sh changes 2008-10-26 22:03:05 +00:00
ahoka d5415fb04f Add BeOS/Haiku platform.
Compiles OK on Haiku pre-alpha as of 2008 October,
but currently hangs for unknown reason (could be OS bug).
2008-10-26 21:57:47 +00:00
ahoka 776cc76ccb Add check for the nice(3) system call.
It may be not implemented on some plaforms, though it's usually present.

Required to compile on Haiku as of 2008 October.
2008-10-26 21:51:27 +00:00
tg 8230c9d8ae • do not use __typeof__ even if we have statements-as-expressions, to
please pcc, prompted for by Anders “ragge” Magnusson, problem spotted
  originally by Adam “replaced” Hoka
  ⇒ rewrote x_bs2() and utf_backch() into a combined x_bs3() function,
    since these are never used in any other way
• whitespace cleanup, while here
2008-10-26 20:59:40 +00:00
tg 00cbdc2d2e 12:51⎜«replaced:#!/bin/mksh» mirabilos: btw haiku port?
12:51⎜<mirabilos:#!/bin/mksh> dunno, I run no haiku
12:51⎜<mirabilos:#!/bin/mksh> I don't know anyone who does, either
12:51⎜«replaced:#!/bin/mksh» only caveat it creates nor .aout. nor a.exe by deafult
12:52⎜<mirabilos:#!/bin/mksh> so I focus on more widely-used things such as DEC ULTRIX 4.5 and Digital UNIX
     ⎜    2.0 ;)
12:52⎜«replaced:#!/bin/mksh» the problem was
12:52⎜«replaced:#!/bin/mksh» it creates src when you give hime src.c
12:53⎜«replaced:#!/bin/mksh» and it confused your Build.sh
12:54⎜<mirabilos:#!/bin/mksh> which compiler does it use?
12:55⎜«replaced:#!/bin/mksh» gcc 2.95

this might(!) be enough to support this weirdity. untested.

12:57⎜«replaced:#!/bin/mksh» can you commit that?
12:57⎜«replaced:#!/bin/mksh» i will try it
12:57⎜«replaced:#!/bin/mksh» but a bit later
2008-10-25 12:58:41 +00:00
tg 102811e7fa standardise the Unicode version of our licence 2008-10-24 21:53:01 +00:00
tg bc046dd8f2 this will most certainly be mksh R36 2008-10-24 21:35:43 +00:00
tg 9fca87b9c3 replace some cat with echo for speed 2008-10-24 21:35:21 +00:00
tg 5ac371071d replaced (TNF: ahoka) insists on me mentioning that we specify integer
silent wrapping (gcc -fwrapv) as expected behaviour
2008-10-24 21:27:20 +00:00