Commit Graph

772 Commits

Author SHA1 Message Date
tg b497da1eb4 add 386BSD, thanks to the unbelievable RT 2012-04-14 14:11:07 +00:00
tg b49abfac18 genericise MKSH_NO_SIGSETJMP 2012-04-14 14:07:47 +00:00
tg 0e0b379615 sometimes <stdlib.h> doesn’t provide NULL but <stddef.h> does (386BSD) 2012-04-14 14:04:13 +00:00
tg 29e4269f33 if the OS does not provide sig_atomic_t and/or ssize_t, you can now define
MKSH_TYPEDEF_SIG_ATOMIC_T and MKSH_TYPEDEF_SSIZE_T via CPPFLAGS to the
*correct* definitions (it’s absolutely critical they be correct!)
2012-04-14 14:02:40 +00:00
tg 536bc0463f make -fwrapv common; at least clang also can do it 2012-04-08 20:02:33 +00:00
tg 5b4d0dbbc5 drop all deprecated code, you have been warned 2012-04-07 11:19:53 +00:00
tg 0af5e1f288 can’t forget LynxOS, although it’s still preliminary… 2012-04-06 23:10:50 +00:00
tg 3d3081115b if LDSTATIC is not empty (i.e. "-static" or " "), always add “our” sources:
• strlcpy
• utf_wcwidth
note strchr/strstr from misc.c are still #ifdef DEBUG only, as they are
not eligible: they’re for const-cleanliness debugging purposes

XXX get rid of multiple occurrences of binary search code, too…
2012-04-06 15:20:42 +00:00
tg ab1ba32d0b bring back $LDSTATIC support 2012-04-06 15:03:42 +00:00
tg 30949fe090 use a reverse test for sys_siglist_decl – this one works on Dell UNIX 2012-04-06 13:25:51 +00:00
tg 4a89ae1cd0 drop the need for strcasestr: just uppercase a copy and compare with uppercased 2012-04-06 12:59:28 +00:00
tg 5e12953cfe bring back -DMKSH_UNEMPLOYED default on BeOS as it’s less usable otherwise 2012-04-06 12:57:53 +00:00
tg 6ca4228e7c disabling jobs just when there is no ctty isn’t needed, at least for BeOS
XXX recheck this with all the others, e.g. NeXTstep
2012-04-01 17:48:24 +00:00
tg 3b2d9322ec change signal probing order: prefer e.g. SEGV over BUS when same Nr. (BeOS) 2012-04-01 17:17:45 +00:00
tg c30bf73a56 BeOS has no tty nor uid/gid other than 0, a̲n̲d̲ a broken /bin/sh 2012-04-01 16:55:16 +00:00
tg 412a96d29a speed up Generating list of signal names (XXX can we wrap this into one compile, anyway?) 2012-04-01 16:40:26 +00:00
tg 607a2af260 found the actual reason… cc -E does syntax check and wrap with whitespace ☹
also we can only do NeXTstep 3.3 with -posix, but not 3rdpty egcs or OS 4.2
2012-04-01 04:57:24 +00:00
tg a3fd4f62e6 • move behavioural changes topmost (locale, zsh emulate sh, solaris xpg)
• attempt to handle cpp on nextstep by using -save-temps
• work around another nextstep bug that may or may not hit us, found by RT:
  ‣ http://lists.gnu.org/archive/html/autoconf/2003-11/msg00094.html
• hide "dirname: command not found", scary even if it might help debugging
2012-04-01 02:35:33 +00:00
tg 16732f7e0f add NeXTstep, OpenStep notes 2012-03-31 18:33:16 +00:00
tg ac18ec3752 one more case of cpp(1) wanting C syntax on NeXTstep 2012-03-31 17:42:58 +00:00
tg 307224f143 Use “proper C code” for determining the compiler type even though we use
only cpp for this: NeXTstep things otherwise:
] conftest.c:42: illegal external declaration, missing ;' after `gcc'
| NeXT Computer, Inc. version cc-437.2.6, gcc version 2.5.8
| NeXT DevKit-based CPP 3.1
| GNU Objective-C version 2.5.8 (80386, BSD syntax) compiled by GNU C version 2.5.8.
2012-03-31 17:37:03 +00:00
tg 4e8c5c078d RT suggests to drop sys_siglist and _sys_siglist on *all* SCO products, for now, and whitelist those that do need it (no strsignal) 2012-03-30 10:24:45 +00:00
tg 9cac4c92f6 RT wants to make the awk used configurable, apparently OpenStep 4.2 has a broken default one 2012-03-30 09:27:19 +00:00
tg cf75e7b6ce couple of minor/cosmetic fixes from RT’s compile farm:
• promote SCO OpenServer and UnixWare to !oswarn
• omit trying -O2/-O on OpenServer 5 and USL C
• cast mksh_ari_t to int, mksh_uari_t to unsigned int for printf
• skip ulimit-1 on syllable (which is still too broken)
• write ((mksh_ari_t)-2147483648) ipv UB ((mksh_ari_t)1 << 31)
  and add a comment that that is actually meant
• rewrite functions returning !void ending in NOTREACHED
  so they’ve got a jump target returning an error at the
  end, to aid older compilers and just to be safe
• cast struct stat.st_size to off_t or size_t explicitly when needed
• shorten struct env by two bytes and an alignment, at least

also, optimise control flow and fix more paren matching cases
2012-03-29 19:23:01 +00:00
tg 25745883a9 move USL C detection to after GCC detection, apparently the latter
masquerades as the former on SCO systems
2012-03-28 11:15:04 +00:00
tg df8881b9c8 fix embarrassing typo (and I thought I had tested them all), 10x RT 2012-03-28 11:14:20 +00:00
tg 914c1d816f drop call to "custom", SCO says to use it to identify system,
but RT says it opens a GUI window, and we obviously cannot have this
2012-03-28 11:13:45 +00:00
tg 6dd03ddfad pass the version to avoid stale Makefile.inc files 2012-03-27 23:13:42 +00:00
tg ed28f9fd24 unknown OS or compiler? be loud! 2012-03-27 23:01:51 +00:00
tg 340cd95cf0 #undef flock (LP: #912691) 2012-03-27 22:41:17 +00:00
tg 95a2c63096 • implement fcntl(2)-based advisory locking as an alternative iff flock(2)
is not found, from a suggestion by RT (LP: #912691)
• try harder (in a loop) to acquire a file lock if the locking mechanism
  documents EINTR is a possibility (fcntl always, flock on Linux not .Ox)
• use -std=c99 not -std=gnu99 if it must be at all
2012-03-27 22:36:53 +00:00
tg e3b9f14d88 You have this ↓ guy a lot to thank for.
00:45 -!- variable [root@freebsd/developer/variable] has joined #!/bin/mksh

• +b *!*root@*, +b $a:root, +b $r:root on one more channel
• certain checks to prevent:
00:47 < variable> wjcw: sh.h:308: error: conflicting types for 'getrusage'
01:19 < variable> oh
01:19 < variable> I needed to run Build.sh
2012-03-27 21:23:52 +00:00
tg a901abc470 update on SCO OpenServer, SCO UnixWare and USL C, from RT 2012-03-27 21:01:55 +00:00
tg 5f450c97bb be more loud in Build.sh to aid me 2012-03-26 20:14:58 +00:00
tg 36199d66ab RT confirmed we need this workaround on SCO OpenServer 6.0 2012-03-26 19:54:54 +00:00
tg 258a1fc4c4 BeOS has quite some issues by now, several minor combined, no major 2012-03-26 19:48:06 +00:00
tg 82ebd9320b distinguish between Minix 3 and Ninix 3 2012-03-03 21:30:13 +00:00
tg 3e0abff926 -DMKSH_SMALL no longer implies -fno-inline 2012-03-03 19:27:07 +00:00
tg 9f3299df4d fix regression in mirtoconf output introduced in cid 1004EFE6D783E94B328 2012-02-17 13:59:56 +00:00
tg 753891419d 10:41⎜«RT|Chatzilla:#!/bin/mksh» mira|AO: 12:08 < RT|AO> a bit fun compiling mksh in SkyOS 5.0.6753 ;-)
http://pastebin.com/GHPm1B7B
10:41⎜<mira|AO:#!/bin/mksh> .oO(wtf is SkyOS?)
10:42⎜<mira|AO:#!/bin/mksh> shf.c:453: warning: format '%zd' expects type 'signed size_t', but argument 4
     ⎜    has type 'ssize_t'
10:42⎜<mira|AO:#!/bin/mksh> lol…
10:42⎜<mira|AO:#!/bin/mksh> I’ve seen (and fixed!) that in dietlibc too, recently
10:43⎜«RT|Chatzilla:#!/bin/mksh» http://en.wikipedia.org/wiki/SkyOS
10:43⎜<mira|AO:#!/bin/mksh> shell-init: error retrieving current directory: getcwd: cannot access parent
     ⎜    directories: Not a character device ←←← huh?!?!?!
10:46⎜<mira|AO:#!/bin/mksh> looks like their POSIX layer has got issues (other than this shell-init
     ⎜    thing, umask and checks for existence upon open() are broken)
10:46⎜<mira|AO:#!/bin/mksh> but mksh is usable, I'd say
10:46⎜<mira|AO:#!/bin/mksh> “mostly”
10:46⎜<mira|AO:#!/bin/mksh> let me commit that
10:46⎜«RT|Chatzilla:#!/bin/mksh» funny posix layer bug, just like "unexpected exit status 1 (signal 1),
     ⎜    expected 1" signal bug in BeOS5
2012-02-17 09:49:45 +00:00
tg 801fdb10ca DTRT when commenting out the only instruction in an if block; spotted by RT 2012-01-04 08:56:27 +00:00
tg d7d41d9210 disable tcc’s bounds checker for now; fixes SIGSEGV-on-start on i386 (Total failed: 0; Total passed: 424) 2012-01-03 16:14:39 +00:00
tg 7ff96c3086 fix gccism; found during testing with tcc 2012-01-03 16:03:22 +00:00
tg 34036ec32e MSYS implies -DMKSH_ASSUME_UTF8=0 and thus can skip the test that’d fail 2012-01-03 01:40:15 +00:00
tg e1fa966570 if tcfn=a.exe pass mksh.exe, not mksh, to check.pl
also spotted by RT
2012-01-03 01:30:16 +00:00
tg 2578c66b61 move linkage check (which uses sh.h INCLUDES_ONLY) to when all of its
prerequisites are actually fulfilled, i.e. evrn further down than with
the last commit doing this, and move some prerequisites of stuff that
has wandered outside the !INCLUDES_ONLY block with the compile-time
assert changes to the outside, too

fixes FTBFS on MSYS which has neither <stdint.h> nor uint32_t
reported by RT
2012-01-03 00:58:09 +00:00
tg 7564594bb8 bunch of warning fixes 2011-12-31 02:54:15 +00:00
tg 7ec1ae3771 followup for cid 1004EE408E1382C1752 and 1004EE40DDD498FBB0D:
do a mirtoconf run-time check (ugh) to see whether the CPU designers
smoked/were brain-dead or if we don’t actually need the manual check
2011-12-31 02:04:18 +00:00
tg 5dbff1d56c clang doesn’t decide whether -version or --version is to be used, grml… 2011-12-31 00:31:25 +00:00
tg 68e8b5ab7c disable looking for C99 support flag in compilers (and GCC extensions)
laffer1 just pointed me to n1570 and I must say I am shocked but not surprised
2011-12-18 02:20:09 +00:00
tg ee73f691f0 clearer messages 2011-12-10 14:16:09 +00:00
tg 63b9d60b31 MKSH_DISABLE_DEPRECATED needs testsuite handling 2011-12-08 22:19:04 +00:00
tg 9b04bd65b7 rework Perl interpreter finding logic; *buntu/dietlibc-arm{el,hf} are broken 2011-12-08 22:16:42 +00:00
tg 6e010a59fb MFC recent changes to R40-stable, validate it, fix a pedantic warning 2011-12-04 19:59:33 +00:00
tg b12d31ccca improve installation instructions 2011-12-04 19:38:36 +00:00
tg da83890648 move compile-time assertions out of misc.c(#ifdef DEBUG) into Build.sh 2011-12-03 00:01:28 +00:00
tg 1ac636670f • improve comments
• do shave off 20 bytes from c_test() and get rid of the ugly stack
  variable and double “using” despite not parsing
2011-12-02 22:55:49 +00:00
tg b3f4c69f05 #ifdef MKSH_DISABLE_DEPRECATED do not compile in features scheduled for removal 2011-11-26 17:56:30 +00:00
tg 2ff9255f39 add a -f option to test.sh that runs tests of class fastbox
plus a test in that category for a bug spotted during development of
https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=shellsnippets/shellsnippets.git;a=blob;f=mksh/sysadmin/getjpics.cgi;h=d74018cbc1ae4e88408267ecc73a6df19aa4c99a;hb=HEAD
2011-11-25 23:29:31 +00:00
tg f92108dccc make MSYS match Cygwin more closely; ignore its broken <stdint.h> 2011-11-05 23:39:02 +00:00
tg d6bf9c197b better handling of eval and CPPFLAGS in build system 2011-10-07 19:51:44 +00:00
tg da80c56acb 12:23⎜<cnuke:#bosng> angefangen damit, dass es kein uname unter OPENSTEP gibt :) 2011-08-26 10:24:51 +00:00
tg 6f76d7f2fe fix… pasto, I think, from some time ago, spotted by cnuke@
12:17⎜<cnuke:#bosng> OPENSTEP hat kein dirname und $srcdir/sh.h wird dann /sh.h
2011-08-26 10:20:28 +00:00
tg 1b9bee46fc check later whether the final link may succeed, and include "sh.h" → catch inlining bugs in system headers fighting with -c combine 2011-07-16 18:03:04 +00:00
tg 851f8fb7d8 introduce MKSH_NO_EXTERNAL_CAT skipping the “call /bin/cat if we have an
option” nonsense, intended for Android, Plan 9, and other systems which
honour that cat -v is deemed harmful
2011-07-07 21:24:53 +00:00
tg 6524812f6b drop more long-deprecated things 2011-06-12 15:54:42 +00:00
tg 3589604dea Minix 3 has no _setrlimit (XXX mirtoconf that in R41) 2011-06-12 14:37:00 +00:00
tg 3695f9b259 TenDRA on Debian workaround 2011-06-05 19:55:22 +00:00
tg 4af79953d2 automatically add -fplugin=dragonegg if not there 2011-06-05 18:23:43 +00:00
tg f1661e5545 new "-c lto" (with fallback to "-c combine"), and catch build failures (lto broken, llc ENOENT, …) early 2011-06-05 18:16:19 +00:00
tg d1b8800ee8 • AIX: display OS version better (tested on 5.3 by cnuke@)
• IBM XL C: display version better (tested on V7.0 by cnuke@)
• do not 'IFS=: read nr name', Cygwin 1.7 dash fails it
• disable cd-pe, glob-range-3 on Cygwin (the former cannot
  succeed because the mv fails, the latter fails from 1.7 on)
• mark heredoc-tmpfile-8 as need-pass: no
• apply __attribute__ only to a function prototype, not to
  the body (even if static), since xlC fails that
• bump version to R40 (beta)
2011-05-29 16:31:42 +00:00
tg 6c45e3e764 avoid namespace conflicts with __attribute__(…) 2011-04-09 21:01:03 +00:00
tg d57a033057 • no longer use <stdbool.h> even if it’s available
• ensure that bool/true/false are cpp macros, overriding any pre-defined
• document the requirement that tobool(x) must map any-type 'x' into bool
• document the requirement that a bool must only be true or false, and
  that it (tobool() rather) must have an identity mapping to 'short'
• possibly fix ksh_func for/and fpFUNCTf – maybe spotted by cnuke@
2011-04-09 15:14:55 +00:00
tg 6784af6dbd • use mksh getopts to parse options in test.sh, collapse multiple -C args
• sort arguments
2011-03-28 21:15:05 +00:00
tg 79c6d6043e • introduce a virtual TARGET_OS=Android that just sets a check category
and switches to the TARGET_OS=Linux
• introduce android as regression test suite category
• add an android specific standard alias
• clean up redundant ‘-o sh’ arg in a few checks
2011-03-16 20:26:36 +00:00
tg 750ad16f3d “__attribute__((format (printf, 1, 2)))” and “#define printf printfoo”
don’t play well with each other – Bionic uses the former, unlike most…
2011-03-16 20:03:21 +00:00
tg e0c4ad7fa9 port to FreeMiNT: add OS uname and flags; 2>&- is evil™; $UNIXMODE must be preserved; unlink(2) is weird 2011-02-27 19:29:20 +00:00
tg 81b80af47a quell a warning when running with __CRAZY=Yes MKC_DEBG=cpp 2011-02-11 00:49:03 +00:00
tg 8b73363c20 query for select(2) in preparation of sleep and read-with-timeout builtins; ualarm(3) and friends are too awkward to use so we ifdef these builtins on select support ☹ 2011-02-09 19:32:26 +00:00
tg 45d99b9ec9 Scan for existence of <sys/file.h> which is not ubiquitous; allows
klibc-mksh (despite no hope to get a signal of a job) persistent history
2011-01-30 02:18:20 +00:00
tg bdfcdc56c8 introduce MKSH_NOPROSPECTOFWORK which is like pdksh’s JOB_SIGS in reverse, like MKSH_UNEMPLOYED is pdksh’s JOBS in reverse; allows mksh to work (hah! no pun intended…) with klibc (and possibly, Syllable Desktop and Plan 9) for now, until they fix their bugs 2011-01-30 01:35:35 +00:00
tg 07889fb0eb -DIN_MKSH is not used by anything 2011-01-29 19:07:16 +00:00
tg 1d6e0470e0 use header only if found 2011-01-21 20:51:56 +00:00
tg 7326331f30 RT|Chatzilla said in #!/bin/mksh that MSYS probably does mksh 2011-01-15 21:56:36 +00:00
tg ce160a8155 MKSH_SMALL need not imply !HAVE_REVOKE as default 2010-12-12 14:06:35 +00:00
tg 29de79c7bf mknod’s now demoted and only used as special-case builtin, in MirBSD only
built for the installer, to save time, as the original OpenBSD hack wanted
2010-10-08 17:56:57 +00:00
tg 3365cb8d0f • Build.sh: fix a compiler warning which, had it not been irrelevant in
a mirtoconf check, would’ve been a real problem on an LP64 platform
• sh.h: work around a bad interaction between -Wformat on gcc and manual
  string pooling for T_synerr, which is used in place of a format string
  in some places
2010-10-01 19:04:38 +00:00
tg 667d792d6a • Address concerns of Chris Palmer from the Android security team
– possible integer overflows in memory allocation, mostly
    ‣ multiplication: all are checked now
    ‣ addition: reviewed them, most were “proven” or guessed to be
      “almost” impossible to run over (e.g. when we have a string
      whose length is taken it is assumed that the length will be
      more than only a few bytes below SIZE_MAX, since code and
      stack have to fit); some are checked now (e.g. when one of
      the summands is an off_t); most of the unchecked ones are
      annotated now
    ⇒ cost (MirBSD/i386 static): +76 .text
    ⇒ cost (Debian sid/i386): +779 .text  -4 .data
  – on Linux targets, setuid() setresuid() setresgid() can fail
    with EAGAIN; check for that and, if so, warn once and retry
    infinitely (other targets to be added later once we know that
    they are “insane”)
    ⇒ cost (Debian sid/i386): +192 .text (includes .rodata)
• setmode.c: Do overflow checking for realloc() too; switch back
  from calloc() to a checked malloc() for simplification while there
• define -DIN_MKSH and let setmode.c look a tad nicer while here
2010-09-14 21:26:19 +00:00
tg 08862021ee add size optimisation hacks by me from Android except ifdef’d
(note, I’d prefer everyone to keep IDSTRINGs around though)
2010-09-14 21:15:11 +00:00
tg 79623f9ceb avoid more compiler warnings in mirtoconf phase 2010-08-24 15:46:06 +00:00
tg a0d43a99fd it’s ugly to write a ./stdint.h file if we can instead define the
types from sh.h; sync clog
2010-08-24 15:19:54 +00:00
tg 8b946de857 u_int32_t was only ever needed for OpenBSD’s pre-ISO-C arc4random API
since we don’t have that any longer, nuke it
2010-08-15 00:43:55 +00:00
tg 52f565f527 Tonnerre says his Linux 1.2 doesn’t have uint8_t, so check for it
and provide if necessary
2010-08-15 00:41:05 +00:00
tg f10186fedd new MKSH_A4PB cppflag: force use of arc4random_pushb(3) during seeding
just the way sysctl KERN_ARND currently is used on OpenBSD/MirBSD (for
manual packager overrides only, no mirtoconf check; e.g. for Cygwin)
2010-07-18 17:29:50 +00:00
tg 30046ffcf2 implement “live” SIGWINCH handling in the Emacs editing mode
for winstonw from IRC #!/bin/mksh
2010-07-04 17:45:17 +00:00
tg 4cbb5a9d46 to speed up mksh, get rid of arc4random(3) uses and use the LCG always;
depend on ASLR for seeding
2010-07-04 17:33:58 +00:00
tg faaa517636 • deprecate¹ -longoptions in favour of short options
‣ -combine → -c combine
  ‣ -llvm → -c llvm -O
  ‣ -llvm=x → -c llvm -o x
  ‣ -valgrind → -g²
• new option -v (version)
• new options -c (compile mode³), -o (opt flags), -O (reset opt flags)
• opt flags default to -std-compile-opts (llvm) now
• support⁴ the LLVM dragonegg plugin for GCC
• sync list of removed files (*.bc, *.ll, add missing Rebuild.sh)

① old options still valid but emit a warning
② except this one
③ compile modes are:
  • normal
  • makefile (-M)
  • combine (old -combine, new -c combine)
  • dragonegg (new -c dragonegg)
  • llvm (old -llvm, old -llvm=*, new -c llvm)
  the first two are not settable via -c though…
④ sample use:
  tg@seduxbox:~/x$ export PATH=$PATH:/opt/llvm/bin
  tg@seduxbox:~/x$ CC='/opt/gcc-4.5.1/bin/gcc-4.5.1 -fplugin=/opt/llvm/lib/dragonegg.so' sh ../mksh/Build.sh -c dragonegg -r

Thanks to «dileX:#grml» for giving ssh access.
2010-05-13 18:41:13 +00:00
tg 5abce90817 add MKSH_DEFAULT_TMPDIR 2010-04-20 17:28:20 +00:00
tg d23b94aaa0 newer SUNWcc has different error messages ☹ 2010-03-30 13:29:03 +00:00
tg f41d5ba82f allow MKSHRC_PATH to change from 「"~/.mkshrc"」, for Android &c. 2010-03-27 20:36:26 +00:00
tg ab1af5bdaf disable BGNICE by default for MKSH_SMALL 2010-03-27 15:32:58 +00:00
tg 52e9469a82 make MKSH_DEFAULT_EXECSHELL (/bin/sh) configurable, for Android 2010-03-27 15:29:00 +00:00
tg 50f081c369 even better on Haiku:
* let ulimits work
* add a Haiku-specific ulimit
* always use UTF-8, they have no locales but a UTF-8 terminal
2010-03-14 11:58:33 +00:00
tg e0f952eeda work when there is no dirname(1), e.g. 4.3 BSD Quasijarus VAX 2010-03-14 11:56:07 +00:00
tg 6f0892b3cc now, skip LDFLAGS and LIBS when using $CPP _for real_ this time 2010-03-01 08:57:45 +00:00
tg 2b2b76d1f5 here no LDFLAGS, LIBS (for cpp) 2010-02-23 22:02:35 +00:00
tg 396ebbb675 (semi-tested) clean up removing; prevent accidental rm of mksh.1 2010-02-23 22:02:19 +00:00
tg 532159415c no longer pull in libcrypt on AIX, only Interix (where it has arc4random)
tested by cnuke@ – 10x
2010-02-18 17:21:19 +00:00
tg 64044f0716 revert 1.371 and just tell people to whitelist conftest.c
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)
2010-02-16 23:53:28 +00:00
tg 9ed7b897a9 place -xipo check at right position 2010-01-28 19:46:53 +00:00
tg e63c70dbf9 provide -valgrind Build.sh option which defines -g3 -DDEBUG -fno-builtin;
the latter is required to work around gcc’s strlen() reading past end of
buffer (multi-byte reads)
2010-01-28 17:03:22 +00:00
tg 6eed6635e9 check for -xipo on SUNWcc (needs -xO4 though, which I refuse to enable
automatically)
2010-01-28 15:12:34 +00:00
tg c9ac50df02 use conftest.c ipv scn.c since that’s recognised by at least ccache as magic 2010-01-25 12:16:04 +00:00
tg a82dc41e99 add an explicit message when mirtoconf+siglist generation are done 2010-01-19 14:26:24 +00:00
tg 18754d1cf8 __attribute__((used)) is not for pcc (but unused works) 2010-01-01 18:27:42 +00:00
tg 769e222586 re-vamp __attribute__ handling; let this pass on HP-UX bundled compiler
as well as HP aCC
2009-12-12 22:27:10 +00:00
tg 0c3acb2374 HP-UX IA64: +DD64 is no longer necessary with aCC (no gcc available…) 2009-12-12 21:17:25 +00:00
tg 37b1260d13 unbreak test.sh in some cases 2009-12-05 16:19:59 +00:00
tg dc98ec23a6 do not use PATH_MAX on GNU/Hurd (even if it *was* defined), but use
some glibc-only functions that don’t require its use instead

tested on gnubber, where (admittedly) sysconf(_PC_PATH_MAX) == 1024…
2009-10-27 17:00:02 +00:00
tg 9f4376d2ad GNU make needs VPATH with the for-all-make(1)s thing (at least if
the sources are in different directories, despite being listed in
${SRCS_FP} with full paths) - XXX can this work with nmake or so?
2009-10-16 18:51:30 +00:00
tg 990c9eaf0c tentatively add new -M option to generate a "Makefrag.inc" instead
of doing the actual compile (along with the usual Rebuild.sh, test.sh
and, if necessary, things such as signames.inc) for Android integration
2009-10-16 18:45:31 +00:00
tg 18c470fb3b since mksh uses /* comments with apo'strophes */ both in the copyright
and code, we MUST check if they work, since C99 apparently forbids it…
2009-10-15 16:50:21 +00:00
tg 8f3f520725 AIX {,/usr}/bin/bsh is an SVR3 Bourne Shell, according to Sven Mascheck,
so I must not use foo="…`…"…"…`…" at all
2009-10-15 12:58:34 +00:00
tg 1dfb13b603 change undef/def MKSH_NOVI into 0/1 MKSH_S_NOVI flag (with more to come:
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)
2009-09-24 17:15:33 +00:00
tg f00db85c98 SUNWcc related fixes for normal and MKSH_SMALL 2009-09-23 18:22:38 +00:00
tg 31e02e59f7 add a do_realpath() implementation replacing the use of the external
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()
2009-08-30 13:22:39 +00:00
tg aec424e631 rpmlint says that one scn.c is compiled without rpm’s $CFLAGS
it’s probably right, except, maybe it was from a CPP invocation
nevertheless it now will never call $CC without $CFLAGS et al.
2009-08-28 17:37:47 +00:00
tg 56d51abd1f need <sys/types.h> for mode_t 2009-08-08 13:52:35 +00:00
tg 0e1266ef90 While mksh R39 builds fine on MirOS #7s8E on my trusty sparc, pgcc 2.95.3
throws out quite some warnings – fix most of them except most emitted via
-Wconversion; work around some others; discard bogus warnings.

sync clog
2009-08-08 13:08:53 +00:00
tg 0d750bba12 Linux libc5 has some function protos in weird places 2009-08-01 21:58:06 +00:00
tg 5cc1722967 ULTRIX, OSF/1, Tru64, Linux 2.0: uint8_t check must come *before* the
arc4random.c source file is added to $LIBS (and related checks)
2009-08-01 21:52:02 +00:00
tg a49d855ab2 ash 0.2 (ecce!GNU/Linux 1.05) chokes on such "long" echo statements... 2009-08-01 21:51:24 +00:00
tg 587822eb4a *curses* ensure all ‘!’ are quoted, ash 0.2, ecce!GNU/Linux 1.05 2009-08-01 20:58:07 +00:00
tg cfa64cebd1 arc4random.c needs uint8_t
tested on ULTRIX
2009-08-01 20:29:02 +00:00
tg 7f5ce5e5ba oops, fix adding arc4random.c to SRCS 2009-08-01 14:12:13 +00:00
tg cb2fd22c38 "official" but unsupported printf-as-builtin code, cleaner API than
in the branch; USE_PRINTF_BUILTIN=1 to enable it (Build.sh + Makefile)
2009-07-30 19:11:12 +00:00
tg 758dc5c6fe * improve CPPFLAGS vs #define handling again: do not touch CPPFLAGS from
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
2009-07-25 21:31:27 +00:00
tg cfe6688a36 in an interesting piece of self humour, remove the stop and suspend
aliases from shells requiring the Arbeitsamt to get a job ;-)
2009-07-25 20:52:41 +00:00
tg 5e3aba8b00 simplify MKSH_SMALL => MKSH_CONSERVATIVE_FDS handling 2009-07-25 20:18:13 +00:00
tg 0a77903f53 allow overriding -DMKSH_SMALL with HAVE_PERSISTENT_HISTORY=x too 2009-07-25 20:04:09 +00:00
tg c7b8b512a8 restructure the build system: new ac_ifcpp macro for _reliably_ determining
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
2009-07-19 14:59:40 +00:00
tg db98d5e964 Nils Weller says to not use nwcc -stackprotect 2009-07-07 20:36:58 +00:00
tg 649eaa7244 nwcc accepts -std=gnu99 (but doesn't process it yet) and -Wall 2009-07-07 18:42:47 +00:00
tg fca27ce872 fix cast warnings discovered by nwcc, and work around const optimisation
related over-zealous warnings by using a non-const integer value
2009-07-07 18:39:51 +00:00
tg d162ed09a4 remove tack workarounds, for now 2009-07-07 18:38:49 +00:00
tg 30b1c9b2c0 prepare for ACK on GNU/Linux 2009-07-07 18:34:21 +00:00
tg be7764778f die, gcc, die! if main is called with 2 args, I can very well
use just the first one, grml...
2009-06-10 21:25:39 +00:00
tg 632ddd50a7 Add MKSH_NO_LIMITS, to define which has the same effect as the
absence of RLIM_INFINITY, namely make c_ulimit() into a true
2009-06-08 20:52:28 +00:00
tg 571546c562 • Check if killpg(3) is available; if not, use kill(2) with negative
process ID and hope it works (is POSIXly killpg-endowed)
• bump version
• sync clog
2009-06-08 20:34:40 +00:00
tg f4ed74a610 allow HAVE_REALPATH=x in the environment if MKSH_SMALL to enable the
feature if possible, like HAVE_MKNOD does. same for revoke.
2009-06-07 22:26:00 +00:00
tg 72c8f3c70d MKSH_BINSHREDUCED is independent from MKSH_SMALL, has been for a while
this is to accomodate e.g. Debian
2009-06-07 22:21:39 +00:00
tg d5d8fb0d40 naaina provided me with a patch from Sean Boudreau, QNX Software Systems,
which I applied slightly tuned: QNX 6.4.2 ed(1) is said to fix the issues
that made it unusable by our regression test suite
2009-06-07 14:50:58 +00:00
tg cda3cc93f1 From André “naaina” Wösten via IRC:
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.
2009-05-29 14:41:37 +00:00
tg b90007d784 • Build.sh, strlcpy.c: gcc-current conversion &c. warnings cleanup
• histrap.c, lex.c, misc.c: get average stack frame size to <= 768 bytes
• check.t, sh.h: bump version
2009-05-27 09:58:24 +00:00
tg b051f52dd4 we’re getting closer, but even a jobless mksh behaves the same 2009-05-20 10:10:35 +00:00
tg b6ce748064 • remove “#if 0” and “#ifdef notdef” style old debugging code
• 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)
2009-05-16 18:40:09 +00:00
tg b145ca5c9f • sync distrib/special/mksh/Makefile with bin/mksh/Build.sh and
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
2009-05-16 16:59:42 +00:00
tg b122cd2b74 since <libutil.h> needs <sys/types.h> e.g. on mnbsd, use it later too
when checking for revoke()
2009-04-10 16:09:53 +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 5c76604402 replaced cannot sort 2009-04-05 13:07:06 +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 81b84b63b0 assume Plan 9 will also want a jobless mksh 2009-04-05 12:21:14 +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 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 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 0d254e4088 make buildable again after memory allocator change
(why didn’t anybody report this?)
2009-03-23 08:54:12 +00:00
tg ca539f08f0 remove espie's double-linked-list based allocator and write a
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
2009-03-22 16:55:38 +00:00
tg 6aa594849a with Build.sh -combine, only do it if it is usable (gcc only too)
XXX do other compilers support such thing?

sync clog
2008-12-31 16:09:51 +00:00
tg dc79b9b118 new option -combine (complementary to -llvm):
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
2008-12-20 20:39:05 +00:00
tg 03acb8ce51 this was NOT intended to be committed; my sincere apologies 2008-11-13 00:36:07 +00:00
tg d099b00b53 leave at least a working tree, with zero-penalty -DAALLOC_NO_COOKIES
XXX cookies are still broken?

cost for aalloc.c: data -= (4, 0, 4, 0); text += (1665, ?, 2115, 2217)
2008-11-12 07:36:19 +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 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 2697deb55c say hello to QNX, sync clog 2008-11-02 23:06:36 +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 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
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 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 9fca87b9c3 replace some cat with echo for speed 2008-10-24 21:35:21 +00:00
tg 19b711692f fix mis-reporting gcc on OSF/1 V5.1 as dec due to the
rule we need to use to identify dec c on OSF/1 V2.0
2008-10-24 20:01:42 +00:00
tg 099cc33236 ucode is very similar to dec c; improve version reporting 2008-10-24 19:59:54 +00:00
tg e2b13ffeae say hello to mksh on OSF/1 V2.0
the trick is to use static linking…
2008-10-24 19:55:35 +00:00
tg a82a5e57f7 /bin/sh on DEC OSF/1 V2.0 (Digital UNIX) is a true Bourne Shell, so it sucks 2008-10-24 19:55:06 +00:00
tg 0c2de1902c • change mksh to only then behave more POSuXish when called as /bin/sh or
“-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
2008-10-20 19:29:25 +00:00
tg ea72bd1b76 improve version reporting on modern AIX/xlC
XXX both cc -qversion and ld -V give errors on AIX 5.2 / xlC V7.0…
2008-10-10 21:57:16 +00:00
tg 25a8d9095d AIX has no UTF-8 locale:
aixuser@pscp520v5:~/bcc $ locale -a
C
POSIX
en_US
en_US.8859-15
en_US.ISO8859-1
aixuser@pscp520v5:~/bcc $ uname -a
AIX pscp520v5 3 5 00C56E7D4C00
2008-10-10 21:36:04 +00:00
tg 78a49e8faf miwi noticed that <libutil.h> on ViehBSE has a prerequisite header, but
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
2008-10-04 19:13:22 +00:00
tg 8f5eda8859 remove the problematic ‘-q’ option, which causes trouble under unclear
circumstances, like some FreeBSD 8 (beta) incarnations (yet not others)
2008-09-30 17:34:25 +00:00
tg 024f0e161d heirloom-sh and Solaris /bin/sh caught use of $NROFF before definition
10x Elias Pipping for noticing
2008-07-21 21:00:25 +00:00
tg a125045432 ptrdiff_t needs <stddef.h> 2008-07-18 11:42:52 +00:00
tg cae7468fe6 (possible) warning cleanup 2008-07-18 11:34:20 +00:00
tg eff47cf33b this isn't needed, from pdksh 2008-07-17 15:17:46 +00:00
tg 79de8c1eb0 add some cppflags from pdksh 2008-07-17 14:50:24 +00:00
tg f894288204 BSDi BSD/OS 3.1’s /bin/ksh (PD KSH v5.2.8 96/08/19) is horridly broken and
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::
2008-07-15 23:44:51 +00:00
tg 31145570ef with dietlibc, <ulimit.h> requires <sys/types.h>, and as we unconditionally
include the latter anyway, just add it as a scan time requirement header

from Debian package
2008-07-15 20:54:47 +00:00
tg 5d25a177a2 better 2008-07-14 15:06:02 +00:00
tg 66e1416bb4 • handle perls without $^O better
• allow user to specify $PERL environment variable containing path to the
  perl5 interpreter to use, for Elias Pipping
2008-07-14 14:59:20 +00:00
tg e171d0fc11 protect test.sh some from being called by !mksh, as homsn did… 2008-07-14 14:40:47 +00:00
tg a9f219dd60 if MKSH_AFREE_DEBUG is defined, guard against wrong frees 2008-07-13 16:43:55 +00:00
tg 1619fa2538 • Build.sh, check.t: bring back the 'smksh' check category, which was
missing for a while yet its disappearance was unnoticed because…
• distrib/special/mksh/Makefile: sync check categories, this was missed
• mksh.hts: sync clog
2008-07-11 19:51:23 +00:00
tg a36a925ea6 IRIX also does not have any UTF-8 locale at all
confirmed by Elias Pipping, 10x
2008-07-11 18:31:10 +00:00
tg 7c239cd369 no UTF-8 locales on OSF/1 V5.1B, either 2008-07-10 18:55:43 +00:00
tg 7530a147e6 let’s find sizer on OSF/1 if it’s not in the PATH 2008-07-10 18:49:22 +00:00
tg b8980a59c1 gcc -v also accepts a file argument, and 'diet gcc -v' croaks, so… 2008-07-08 21:14:42 +00:00
tg 1f0e071c6d dump the perl $^O string in the logs… all Debian GNU/kFreeBSD developers
I can ping right now “need to refresh their keys on io/asdfasdf” or have
their machines unreachable… and I lost my VM to fsck recently (remember)
2008-07-08 21:05:01 +00:00
tg 077dbf2dd4 fix HP aCC compiler version identification 2008-07-06 23:19:31 +00:00
tg 667f309387 support arc4random.c in build but not src dir, too 2008-06-29 19:46:56 +00:00
tg 941d228f99 some basic LLVM+clang (with “ccc” driver example) support 2008-06-29 18:18:56 +00:00
tg d20bb52049 remove llvm-clang artefacts in more places 2008-06-29 18:08:55 +00:00
tg edb83bf872 remove a.out.s and a.out.bc (llvm-clang fallout) too 2008-06-28 23:00:43 +00:00
tg 1863471854 improve Mac OSX version reporting 2008-06-22 20:51:31 +00:00
tg 9fabfb278f SUNw,cc is one of the compilers whose version reporting works better when
compiling a demo programme at the same time
2008-06-21 19:38:41 +00:00
tg 5d73013c02 remove check_category “pdksh”, it starts to make trouble and was never
taken seriously anyway, just historic ballast
2008-06-21 19:20:15 +00:00
tg f7d5a16363 What is valid for Build.sh should be valid for test.sh too.
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.
2008-05-20 18:47:06 +00:00
tg b41a72ac2e add new builtin “realpath” calling realpath(3) on its argument, skipping
over “--” for compatibility to Debian realpath(1) and possibly busybox’

“sounds handy” replaced@TNF
2008-05-17 18:27:57 +00:00
tg b40ba2c8d1 beauty error: clear LDFLAGS and LIBS while using -c 2008-05-17 18:19:11 +00:00
tg 67b4dc8731 * default to no setlocale for a couple more platforms
* default to UTF-8 on Plan 9
2008-05-13 00:08:12 +00:00
tg 512bee8c32 • GNU/Cygwin has, according to G**gle, only stubbed locale support, like
OpenBSD
• update testsuite results and clog, again
2008-05-11 14:47:04 +00:00
tg f6b7a09146 • on OpenBSD, default to HAVE_SETLOCALE_CTYPE=0… I wonder if that’ll ever
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
2008-05-10 03:16:07 +00:00
tg 06ff8540a0 remove more dead mirtoconf code 2008-05-04 01:59:46 +00:00
tg c5db7903dd if we don't have setlocale(), just look at the env vars ourselves 2008-05-04 01:58:15 +00:00
tg 604ec0ff6c remove dead code and ifdefs, speed up configuring 2008-05-04 01:51:31 +00:00
tg e27ae086d2 set the "C" locale during runs… otherwise, some OSes’ tr(1) or so might
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
2008-05-04 00:55:18 +00:00
tg d6f3f726a6 clean up unused defines 2008-04-20 02:15:12 +00:00
tg 9b62cf15bf • more unsigned → unsigned int
• 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 ☺
2008-04-19 22:15:06 +00:00
tg acc2e9a67a • Ultrix doesn’t define MAP_FAILED either
• on Ultrix, mmap() returns a caddr_t instead of a void*, so cast
2008-04-02 16:55:06 +00:00
tg e8d61a1d99 • unify ksh_dup2() usage, use bool where appropriate
• 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
2008-04-01 20:40:22 +00:00
tg 47a7d246ca easier way to fix it, WFM on BSD/OS 2008-04-01 17:25:37 +00:00
tg 5198f4c358 work around problems with old perl 2008-04-01 17:22:54 +00:00
tg 18f38ad75a abort if perl is not working in test.sh 2008-04-01 17:14:31 +00:00
tg 448496a74e use cat with here document instead of a couple of echos for
generation of test.sh (which grew...)
2008-04-01 17:13:49 +00:00
tg 506326f051 yaloki just mentioned IBM VisualAge, and I found out that it’s
not, as I thought, their Wintel compiler but AIX’s xlC…

no breakage, just redundancy.
2008-03-28 22:56:15 +00:00
tg 0a35cabb31 more detailled gcc output, idea from Elias Pipping 2008-03-28 14:04:23 +00:00
tg 9a7ea00e9c don’t use #error: MIPSpro only warns, but doesn’t abort compilation… 2008-03-28 13:55:11 +00:00
tg aacc0b2179 • Build.sh: be a little more explicit about the unknown compilers
• Build.sh: add another one
• */Makefile: sync CPPFLAGS
2008-03-27 22:44:17 +00:00
tg 180883417e tentatively commit support for
• 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
2008-03-27 22:17:01 +00:00
tg 351104715e ignore failure to define MAP_FILE 2008-03-27 17:59:28 +00:00
tg dbc159a491 From: Elias Pipping <elias@pipping.org>
| >Maybe add <sys/types.h> as first line? I could imagine that.
|
| That did the trick indeed (that's where dev_t is defined).
2008-03-27 17:55:31 +00:00
tg 5ff5b4b03f Elias Pipping reports success of mksh R33 on IRIX64 mips-sgi-irix6.5 gcc3.4.1 2008-03-27 13:08:37 +00:00
tg def9c172df • Add support for Ultrix 4.5 and ucode cc (?)
‣ 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
2008-03-25 21:34:45 +00:00