Commit Graph

699 Commits

Author SHA1 Message Date
tg 8620379fcc * add #ifdef MKSH_NOPWNAM to prevent pulling in getpwnam()
* document possible "functionality omission defines" in Build.sh
* sort and sectionise mirtoconf checks; add big comments
2007-01-17 17:42:22 +00:00
tg c231ab8cc4 * order tests: we want to use correct NOWARN as much as possible
* "$e" and "echo" fixes for if the stuff begins with a -, and
  quoting cleanup (where feasible, feel free to send diffs)
* cosmetics

I hereby name this baby "Mirtoconf".
2007-01-17 17:31:59 +00:00
tg f946d405f8 if both "$CPP" (from parent) and "$CC -E" fail, try "cpp" (from $PATH) and
"/usr/libexec/cpp" and "/lib/cpp" last
2007-01-17 17:14:25 +00:00
tg 8211416e5a make a loop (removes dup code) 2007-01-17 17:12:43 +00:00
tg 478374ba3b autoscan for c præprocessor now prefers $CPP to "$CC -E" 2007-01-17 17:08:34 +00:00
tg da03ad5be2 autoconf for -O2 (if CFLAGS is _empty_), -Wall, -fwrapv, -fno-strict-aliasing
XXX untested
2007-01-17 17:03:59 +00:00
tg d4b4ca5e92 simplify 2007-01-17 16:57:41 +00:00
tg e19a99efaf more creative use of ac_flags() 2007-01-17 16:52:00 +00:00
tg f6dbde5115 thinko 2007-01-17 16:44:19 +00:00
tg bcb0852dcc new shell function for autoconfing compiler flags, reduces redundancy 2007-01-17 16:39:55 +00:00
tg 69584be3bb add two TODOs 2007-01-17 01:59:38 +00:00
tg 263f518dfd * Build.sh: add -fwrapv to standard CFLAGS, just to be on the safe
side (I don't have capacities to scan 71711 files in MirOS for a
  standards-compliance whack)
* copyright: mention CVS changelogs as place of contributors' name
  and credit information, too
* check.t, sh.h: bump
2007-01-17 01:24:29 +00:00
tg c480656076 shrink .data a little 2007-01-15 02:48:28 +00:00
tg dc10f66070 optimise 2007-01-15 02:14:02 +00:00
tg 0c809f3db9 static int (which was const) -> integrated into its only use 2007-01-15 02:11:34 +00:00
tg 981a515287 bump vsn 2007-01-15 00:38:20 +00:00
tg b7978f3bb9 fold POP_INT into code
XXX untested, may break things or have side effects
XXX not optimised and ugly as hell, can't we do it better?
XXX do I understand it entirely?

tested on sun4u -m64 only
2007-01-15 00:37:42 +00:00
tg a712de8e63 ok, -rHEAD shall be unbroken 2007-01-15 00:18:47 +00:00
tg 84085a8747 solaris 8 / gcc 3.4.3 / -m64 warnings 2007-01-14 23:57:44 +00:00
tg a00fbd3eb7 autoconf for -std=gnu99 (not c99 because of brokenness in the field)
from ankon -> solaris 10 with gcc 3.4.6 from sunfreeware
2007-01-14 21:38:25 +00:00
tg 29b62b186d okay, this didn't work out; changing window sizes when we're
actually within a (the emacs) editing mode does not work at
all, whether forced or not, only if we leave the editing mode
(at end of input); probably due to it saving stuff from e.g.
x_cols into xx_cols, etc.

-> remove SIGWINCH handling(!)
-> TIOCGWINSZ is now executed at end of every input line
-> use 'ESC #' if you direly need to change line size
2007-01-14 01:56:23 +00:00
tg 36e761840e * do *not* check the terminal size after each line processing,
only if we got a SIGWINCH -> interactive use speed-up on the
  slower boxen (slowness courtesy of otto@obsd)
* ^L (redraw line) now (always) checks window size; use this
  instead if required while editing the prompt; changes to the
  variables will still be propagated after the line is entered
2007-01-14 01:09:09 +00:00
tg 87f681b488 * revert some of the const-warning cleanup which must be done
with different means (reads, tricky magical kludgery)
  YES, THIS BREAKS -rHEAD, I KNOW.
* while here, fix spelling
2007-01-12 10:18:22 +00:00
tg 03e8f0ec83 CPP is honoured now as well (but only needed for the siglist) 2007-01-12 03:30:40 +00:00
tg 9c888e103a oops… really unbreak -d 2007-01-12 03:20:07 +00:00
tg 22538dcf0d unbreak -d 2007-01-12 03:17:08 +00:00
tg e9d944e825 user should be able to override if he wants setlocale calls in his
extra small mksh…
2007-01-12 02:46:27 +00:00
tg ca7a9c3eb0 ] scn.c:1: warning: ISO C forbids an empty source file
yeaaah, we #error out anyway, but…
2007-01-12 02:40:18 +00:00
tg e768017c58 gcc 4.1.2 pedantic warning free configure 2007-01-12 02:37:32 +00:00
tg 2c46d96042 * instead of setting LDSTATIC='' for OSes which did not support it
until now, set it to '@'
* if LDSTATIC is '@' make it '-static' if MKSH_SMALL, '' otherwise

Yep, this might break, e.g. Darwin or Cygwin. But let's test that.
2007-01-12 02:34:46 +00:00
tg 21e2397c1b disallow the user to specify (overload) SRCS, if there is special
target platform specific crap, it belongs into LIBS instead
2007-01-12 02:27:40 +00:00
tg 6e5437f86b interesting way to break things… oeps ☺ 2007-01-12 02:12:16 +00:00
tg 552aebd24f more verbose 2007-01-12 02:09:10 +00:00
tg 0b7376a1ad * histrap.c: picky /a1/sw/pkgs/gcc-3.4.3/bin/../lib/gcc/sparc-sun-solaris2.8/3.4.3/
* main.c: thinko
2007-01-12 02:06:34 +00:00
tg 4867c8dcef pasto 2007-01-12 02:02:21 +00:00
tg 80393db1b6 fix configuration on solaris 8 with whitespaces in both curdir and
srcdir, mostly due to 'eval' issues and a picky /bin/sh (yeaaah…)
2007-01-12 02:01:48 +00:00
tg 5891915f1b * Scan for __attribute__((...)) in general (the earliest was 2.5,
where we had 'noreturn' etc. but no '__noreturn__')
* Scan for __attribute__((bounded)) and __attribute__((used))
  if we have __attribute__((noreturn))
* To be able to scan if certain attributes give warnings,
  scan for -Werror with a simple programme which hopefully triggers none
* Convert __attribute__((unused)) to __unused, noreturn -> __dead
* Unify other attributes
* Clean up typography a little more
2007-01-12 01:49:29 +00:00
tg 70eb6d19c2 solaris /bin/sh:
| v() { ... }
| v=1
undefines v()
2007-01-12 01:44:32 +00:00
tg 636ef70a24 underline actual autoconf results (test names are in bold)
FWIW, works ATM, even with spaces in directory name
2007-01-12 01:32:27 +00:00
tg c430db0b00 constify 2007-01-12 01:30:35 +00:00
tg 6fb4af0a9d * typo
* include path
2007-01-12 01:27:28 +00:00
tg 5309e33974 implement colouring of "autoconf" output. yay!
NB: only if stdout isatty
2007-01-12 01:17:10 +00:00
tg cff011696e clean regress-dir before re-using 2007-01-12 01:11:03 +00:00
tg 0e4bbd4bf6 * inittraps: convert signal _names_ to uppercase, we're matching
case-sensitively in the 'trap' builtin, and Mac OSX has them
  in lowercase at sys_signame[]…
* gettraps: optimise
2007-01-12 00:37:09 +00:00
tg 2f15a11c55 Clean up the signal mess, saves 172 Bytes:
* 'sigseen' in Build.sh goes away
* Signal name existence is checked in this order:
  have our own¹ -> sys_signame[] -> _sys_signame[] -> build our own²
* Signal description existence is checked in this order:
  sys_siglist[] -> _sys_siglist[] -> strsignal() -> NULL³
¹ Predefined list of items, for operating systems where we
  cannot build² them, i.e. Plan 9 and Minix 3 (e.g. no $CPP -dD)
² The usual cpp(1) stuff
³ Changed later, see below
* Make $CPP test dependent on $NEED_MKSH_SIGNAME (others can
  be added here, this is not absolute)
* Make signal name list generation² dependent on $NEED_MKSH_SIGNAME
* Fix check if the generation worked
* Guarantee that sigtraps[*].name and sigtraps[*].mess are valid
  C strings; this makes the code shorter *and* removes a few pos-
  sible nil pointer dereferences
* Embed autoconf'd usages of sys_sig* / strsignal / mksh_sigpairs
  into inittraps()
* Check for each signal 0<=i<=NSIG that
  name is not NULL or "" -> replace with ("%d", i)
  mess is not NULL or "" -> replace with ("Signal %d", i)
  name does not start (case-insensitive) with "SIG" -> name += 3
* In gettrap(), fix check if signal name starts, case-sensitive
  or case-insensitive, depending on need, with "SIG" (bug from millert@)

Other changes:
* Build.sh: ac_test[n]() are documented
* Build.sh: ac_test[n]() can have negative prereqs as well now
* Build.sh: use <<-'EOF' consistently
* bump patchlevel to today
2007-01-12 00:25:40 +00:00
tg 3b63b986c3 * pasto (patcho?)
* improve output readability

I wonder if I should use ANSI escapes to make the results
from the configuration bold… but then, this'd look worse
in e.g. mc or less. Suggestions?
2007-01-11 03:03:34 +00:00
tg 3b6b37c671 make use of the new $CPP variable (and enable the cpp check if needed)
@Benny:	this is why I don't use GNU autoconf: writing configure.in
	files is, supposedly, easy - but nobody teaches you which
	changes you have to apply to your source files. Here I know.
2007-01-11 02:41:53 +00:00
tg 4d2624fd1d add test how to run the C preprocessor and fix the $NOWARN check and docs 2007-01-11 02:37:40 +00:00
tg 546e97621a small mkshs also shouldn't pull in the entire locale package,
so don't even call setlocale, lest alone nl_langinfo (already
disabled before)
2007-01-11 02:11:46 +00:00
tg e269c4ed29 if building a small mksh, don't check for persistent history,
since it's not supported anyway; makes regression tests pass there
2007-01-11 02:08:50 +00:00