Commit Graph

523 Commits

Author SHA1 Message Date
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