now that we use the same name as quiet-by-design autoconf
to please ccache anyway (and no we will not become quiet,
I can't usually get my hand on a buildd's conftest.log)
MKSH_S_EDIT for small (Emacs) editing mode, MKSH_S_FEAT for all the dis-
abled language features), which can be set to 0 despite MKSH_SMALL being
defined to re-enable the Vi command line editing mode (which I wouldn't,
but fits into the general mastermind scheme)
libc function realpath(3) which may not be available on the target
system; compile the realpath builtin unconditionally
looks fine to me, but review is appreciated; this is (very) lightly
based upon MirBSD libc’s realpath(3) and pdksh’s get_phys_path()
Build.sh but use 'if defined(PRECOND) && !defined(TOBEDEFINED)'if possible
* for all of the source code, drop annotations "imake style" (if we check
for specific OSes, bad, instead of using mirtoconf checks proper) and
"conditions correct?" (if I'm not entirely sure if that #if catches all
cases and no false positives) where I can see it by grepping immediately
* bump mksh patchlevel
* refresh Makefiles
the state of the C Præprocessor at configuration time (simple checks, i.e.
set/unset, set+1/set+!1/unset, and more complex checks), including verbose
output; related cosmetics and variable naming cleanup
QNX 6.4 is out, which has a different waitfor() in <libutil.h>, which
we by definition of __NO_EXT_QNX do not want to use. They are in the
process of porting the NetBSD® pkgsrc® repository to it.
The /bin/ed situation hasn’t improved yet though.
• expose “#ifdef MKSH_MIDNIGHTBSD01ASH_COMPAT” just in case they decide to
require it and show it in the ksh version automatically
• sync the use of non-ASCII characters over files (unification)
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
similarily simple one from scratch, which however performs
better than espie's with AFREE_DEBUG enabled which took away
the benefit of the double-linked-list approach
all of (core) mksh is now MirOS licenced
compile all source files at once using -fwhole-program --combine,
similarily to how it used to be done in older mksh versions, except
that the flags are now hardcoded; tested with llvm-gcc4.2 from MirPorts
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)
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
“-sh” if -DMKSH_BINSHREDUCED was passed during compilation, for example
for Debian, but d̲e̲f̲i̲n̲i̲t̲i̲v̲e̲l̲y̲ n̲̲o̲̲t̲̲ for MirBSD™
• split up regression test to force this behaviour
• remove the gunk from our MirBSD™ startup scripts again
• mention arc4random.c changes on website, sync clog, warn packagers
didn’t tell me which one (T H A N K S !)… since I have no FleaBSD shell
account, I tried on DragonFly and MidnightBSD, which both are content
when adding <sys/types.h> first… let’s hope this fixes all 386BSD derivates
removes the \n part of a “\\\n” sequence, but not the backslash ⇒ we can’t
use line continuation in a here document
someone might want to add this to *(autoconf) Portable Shell::
missing for a while yet its disappearance was unnoticed because…
• distrib/special/mksh/Makefile: sync check categories, this was missed
• mksh.hts: sync clog
In this case: reset the locale to “C” at start.
Otherwise, perl/OpenBSD fails in an UTF-8 environment, just
because OpenBSD 4.3/zaurus still has no locales in 2008.
change – this might affect other OSes too in time for R34
• one of the regression tests had an unexpected failure if running as root
• www: sync clog; log newer mksh built on newer OpenBSD works fine
act strange… 10x Adam “replaced” Hoka for helping to find this
00:51⎜<replaced_> it needs -A
00:52⎜<mirabilos> heh. locale?
00:52⎜<replaced_> -A Translates on a byte-by-byte basis. When this flag
00:52⎜<replaced_> is specified tr does not support extended
00:52⎜<replaced_> characters.
00:52⎜<replaced_> LC_CTYPE=en_US.utf8
00:52⎜<mirabilos> hmmm
00:52⎜<mirabilos> but that is weird too
00:52⎜<mirabilos> I don't see why it shouldn't work
00:52⎜<replaced_> yeah, it should act the same
00:53⎜<mirabilos> try this please:
00:53⎜<mirabilos> without -A
00:53⎜<mirabilos> echo sys/param.h | env LC_ALL=C /bin/tr -c
⎜ qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789
⎜ ______________________________________________________________
00:53⎜<replaced_> this works of course
• more int → bool
• more regression tests: check if the utf8-hack flag is really disabled
at non-interactive startup, enabled at interactive startup, if the
current locale is a UTF-8 one
• make the mksh-local multibyte handling functions globally accessible,
change their names, syntax and semantics a little (XXX more work needed)
• optimise
• utf_wctomb: src → dst, as we’re writing to that char array (pasto?)
• edit.c:x_e_getmbc(): if the second byte of a 2- or 3-byte multibyte
sequence is invalid utf-8, ungetc it (not possible for the 3rd byte yet)
• edit.c:x_zotc3(): easier (and faster) handling of UTF-8
• implement, document and test for base-1 numbers: they just get the
ASCII (8-bit) or Unicode (UTF-8) value of the octet(s) after the ‘1#’,
or do the same as print \x## or \u#### (depending on the utf8-hack flag),
plus support the PUA assignment of EF80‥EFFF for the MirBSD encoding “hack”
(print doesn’t, as it has \x## and \u#### to distinguish, but we cannot use
base-0 numbers which I had planned to use for raw octets first, as they are
used internally): http://thread.gmane.org/gmane.os.miros.general/7938
• as an application example, add a hexdumper to the regression tests ☺
• apply diff from mirbsdksh-1.11:
#ifdef DUP2_BROKEN
/* Ultrix systems like to preserve the close-on-exec flag */
‣ XXX we do #ifdef __ultrix here (imake-style) instead of mirtoconfing it
(but does anyone know of any other OS with the same problem? plus we’d
see it as we now know the symptoms)
• remove ultrix Build.hs warn=' but might work…' in the hope it DOES
• detecting a lot more compilers (stolen from CMake, admittedly, as they
were the first coming up at G**gle with usable #ifdefs)
• handling MIPSpro
• more system info on IRIX
‣ I/O redirection seems broken:
$ (date; date >/dev/null; date) | wc -l
1 (expected: 2)
‣ other than that: working fine
‣ -YBSD (default) and -YSYSTEM_FIVE don’t work, just -YPOSIX, somehow
• Fix $(…) to `…` for OSF/1 V2.0 /bin/sh
‣ this compiler is FUBAR though:
$ cat >t.c
main() { return (foo()); }
$ cc t.c
ld:
Unresolved :
foo
$ echo $?
0
$ ls -l a.out
-rwxr-xr-x 1 mirbsd users 10835 Jul 21 17:12 a.out
‣ it seems to have ucode, but man is not installed
• new mirtoconf check: mkstemp(3)
• if !HAVE_MKSTEMP (Ultrix), use tempnam(3)
• only use printf(1) if it exists (it doesn’t on Ultrix)
• a few more signals
• add S_ISLNK if the OS doesn’t define it
• add strcasecmp(3) proto for Ultrix (it _is_ in <portability.h>, but
only for -YBSD I think)
• fgrep(1) on Ultrix doesn’t do “-e ① -e ②”
10x DEChengst:#UnixNL for giving access
it can’t do -Werror, that’s why it mis-detects attribute support.
ignore the warnings (unused variables, uninitialised values, control flow)
as I checked them and they are not valid. gcc 1.42 (BSDi modified) compiles
a very fine mksh
| OSF1 rubbereendje.dechengst.nl V5.1 2650 alpha
with the vendor compiler:
| Compaq C V6.5-011 on HP Tru64 UNIX V5.1B (Rev. 2650)
| Compiler Driver V6.5-003 (sys) cc Driver
• the platform’s sig_t is incompatible too (simplify check)
• no compile warnings at all
• results in:
$ size mksh
| text data bss dec hex
| 327680 16384 17808 361872 58590
$ file mksh
| mksh: COFF format alpha dynamically linked, demand paged executable or object module not stripped - version 3.13-14
$ ldd mksh
|
| Main => mksh
| libc.so => /usr/shlib/libc.so
$ ls -l mksh
| -rwxr-xr-x 1 mirbsd users 395200 Mar 5 19:18 mksh
• minor testsuite issues:
FAIL ./check.t:regression-13
unexpected stderr - got too much output
wanted nothing
got:
Successful
cat: output error
⇒ probably harmless
• works like a charm!
• DEC C on OSF/1 (10x Jupp the IceWM coffee pot maintainer)
• other stuff which doesn’t nuke a.out on failure
XXX this must be tested on *ALL* supported platforms!
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
• use DOWARN semantically correct
• support the Microsoft® C Compiler
• on Interix, disable msc's security checks, as it relies on
library functions not provided by Interix' libc (XXX mirtoconf this)
| cpp.ansi: HP92453-01 B.11.31.01 HP C Preprocessor (ANSI)
| ccom: HP92453-01 B.11.X.36086-36089-36092.GP HP C Compiler
| /usr/ccs/bin/ld: 92453-07 linker linker ld B.11.60 070209
on
| mirbsd@td191:~/mksh $ uname -a
| HP-UX td191 B.11.31 U 9000/800 3397116299 unlimited-user license
resulting in
| Total failed: 1 (as expected)
| Total passed: 220
so I suppose it's no longer experimental on HP-UX… it also works on/with
| HP-UX td192 B.11.11 U 9000/800 1839940656 unlimited-user license
| gcc version 3.4.2
| Can't locate POSIX.pm in @INC…
and
| HP-UX td192 B.11.11 U 9000/800 1839940656 unlimited-user license
| cpp.ansi: HP92453-01 B.11.X.35175-35176.GP HP C Preprocessor (ANSI)
| ccom: HP92453-01 B.11.X.36086-36089-36092.GP HP C Compiler
| /usr/ccs/bin/ld: 92453-07 linker linker ld B.11.60 070209
and
| HP-UX td176 B.11.23 U ia64 1928826293 unlimited-user license
| Reading specs from /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/specs
| Total failed: 1 (as expected)
| Total passed: 219
still work to do for HP C on IA64
| tglaser@hephaistos:~ $ /usr/local/intel/cc/9.1.042/bin/icc -V
| Intel(R) C Compiler for 32-bit applications, Version 9.1 Build 20060706Z Package ID: l_cc_c_9.1.042
this one is muuuuch too verbose IMHO, _and_ it #defines __GNUC__ (eek)
any more either, and can make use of code sharing between detection
of sys_siglist and sys_signame (and the underscored variants); nuke
the now-useless signames.c file too (merge struct into histrap.c)
SIGABRT to SIGIOT (good), SIGCHLD to SIGCLD (necessary and reason),
SIGIO to SIGPOLL (the former also exists on mirbsd so okay); changes
on other OSes should be monitored by porters