Commit Graph

61 Commits

Author SHA1 Message Date
tg c79cacdfa5 • from a MirOS point of view:
place most stuff from /etc/profile in /etc/skel/.mkshrc; admins must make
  sure to copy this file to users' homes on upgrade (benefit: non-login but
  interactive shells also get all the goodies); fix some quoting; simplify,
  reformat, change comments
• from an mksh point of view:
  slight internal changes in dot.mkshrc; external commands are now prefixed
  with “ulimit -c 0”; $TERM is defined; improvement in determining the host
  name (e.g. on Debian if a FQDN is not given); declare locals as such both
  in $PS1 and outside; remove superfluous quoting, quote properly; simplify
  hd alias, add rot13 alias; place RCS ID at the bottom
2007-04-16 18:54:37 +00:00
tg 0a20bb8dd4 • Minix 3 doesn't have <sys/mman.h>
• Some OSes might need <stdint.h> for int32_t (Minix 3 with GCC)
2007-03-04 04:36:45 +00:00
tg 83c2ee87f4 • remove strcasestr.c, use home-grown implementation¹, call it stricmp,
and have it return an API-correct const char *
• enhance and stylify comments
• a little KNF and simplifications
• #ifdef DEBUG: replace strchr and strstr with ucstrchr and ucstrstr
  that take and return a non-const char *, and fix the violations
• new cstrchr, cstrstr (take and give const char *)
• new vstrchr, vstrstr (take const or not, give boolean value)
• new afreechk(x) = afreechv(x,x) = if (x1) afree(x2, ATEMP)
• new ksh_isdash(str) = (str != NULL) && !strcmp(str, "-")
• replace the only use of strrchr with inlined code to shrink
• minor man page fixes
• Minix 3 signames are autogenerated with gcc
• rename strlfun.c to strlcpy.c since we don't do strlcat(3) anyway,
  only strlcpy(3), and shorten it
• dot.mkshrc: move MKSH=… down to the export line
  to not disturb the PS1 visual impression ☺
• dot.mkshrc: Lstripcom(): optimise
• bump version

¹) side effect from creating API-correct cstrchr, cstrstr, etc.
   uses goto so it must be better ☻

tested on mirbsd-current via both Makefile and Build.sh
2007-03-04 03:04:28 +00:00
tg 62b347a1b0 merge the const branch +- a few 2007-03-04 00:13:17 +00:00
tg 90af366ee0 sync 2007-03-03 21:48:33 +00:00
tg e0e4c992fc • embed MKSH_ASSUME_UTF8 and MKSH_NEED_MKNOD in Build.sh
• have mksh with BSD makefiles always enable MKSH_ASSUME_UTF8
• sync BSD makefiles with Build.sh output
2007-02-18 16:24:13 +00:00
tg a0fcdecb75 add new #ifdef MKSH_ASSUME_UTF8 which saves us from needing to
call setlocale() if we know the result will always be UTF-8
2007-02-10 21:59:15 +00:00
tg 6d157ffe47 autoscan for persistent history support 2007-01-18 16:05:05 +00:00
tg 7b903e4aa9 header overhaul: replace all #ifdef __OS__ with mirtoconf checks
(except the persistent history one)
2007-01-18 15:50:32 +00:00
tg 8df4639675 * new target 'test-build' to easily check Build.sh operation from mbsd
* regen CPPFLAGS+= stuff with 'test-build'
2007-01-18 01:24:46 +00:00
tg 65a2806e81 scan for revoke() 2007-01-17 23:27:47 +00:00
tg af606537e2 if we don't have rlim_t, assume it's long 2007-01-17 23:18:55 +00:00
tg ddd2dac47d * support old environments without libgen.h (ancient GNU/Linux)
and stdbool.h (ancient GNU/Linux; NetBSD® 1.6.1)
* __dead must come after, not before, to accomodate gcc 2.7.2.3
2007-01-17 22:51:47 +00:00
tg ceb5a7dba0 check if __RCSID() can be used multiple times; req'd eg. on Mac 2007-01-17 21:42:23 +00:00
tg cff011696e clean regress-dir before re-using 2007-01-12 01:11:03 +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 623bf49f19 order the same way as Build.sh outputs them 2006-11-12 13:21:50 +00:00
tg df01c5b051 strcasestr, oops 2006-11-12 13:19:06 +00:00
tg a799f50fea scan for setresuid/setresgid and setgroups
no alternative implementation yet
2006-11-12 12:56:10 +00:00
tg 617950554f missed these 2006-11-09 15:03:56 +00:00
tg 0307ecb492 * instead of including <sys/cdefs.h> (not in Solaris), we hope <sys/types.h>
includes it for us
* autoconf-test for <sys/param.h> (not in SUSv3) existence
2006-11-09 00:11:39 +00:00
tg 11fbdb4378 implement autoconf tests for langstuff; sync date 2006-11-08 23:45:47 +00:00
tg adbd7f4b74 fix native build 2006-11-08 23:24:49 +00:00
tg 1547b04e66 add new "set -o utf8-hack", currently no effect
set automatically on startup if we have locale functions (on MirOS)
2006-11-05 12:11:14 +00:00
tg 695503952f use an autoconf-like approach to check for arc4random(3)
after gecko2 told me his mac recently has it and I found
out that Interix has it in -lcrypt and soon -lmirmake (:
2006-08-26 20:30:27 +00:00
tg d121622e84 remove GNUish 'check' target, we always use 'regress' 2006-08-01 12:46:01 +00:00
tg 85a4745978 switch /bin/sh to mksh
this at least gets us rid of a bunch of segfaults on freewrt openssl builds
2006-07-23 19:10:59 +00:00
tg 301066165b auto-test check.t:mkshrc-1 as well (verified to work) 2006-05-08 12:18:49 +00:00
tg 0b85dc1e81 remove USE_PRINTF hooks, it never worked anyway, and probably nobody
is going to fix it...
2005-10-21 11:44:25 +00:00
tg 30aed785bc fix up DEBUGLIBS and DEBUGPROGS 2005-10-20 12:47:49 +00:00
tg 1b081938fb * bump version
* disable DEBUGPROGS
2005-10-08 18:53:10 +00:00
tg ef41b5dbdc disable printf(1) builtin for now, it's broken (yet irreproducible)
probably multiple i/o redirection, or stuff like that
2005-08-29 01:16:22 +00:00
tg 6c5d08ea6f * add printf(1) as mksh(1) builtin on MirOS
(or, more general, all systems using Makefile
  instead of Build.sh)
* document this fact
2005-08-26 22:03:56 +00:00
tg 5b1a2fe3a9 fix running of all tests 2005-05-23 14:48:21 +00:00
tg 7af5be731b * if __CRAZY, automatically add CDIAGFLAGS, and add them AFTER our
crazy warning options
* use it for mksh
2005-05-23 11:59:06 +00:00
tg cd7b8bd79b Add mirbsdksh R21, which was developed in a temporary external CVS repo-
sitory whose ChangeLog follows. mksh R21 is licenced under the MirOS li-
cence, shown in "sh.h", and a two-clause UCB-style licence by Marc Espie
as shown in "alloc.c".

This executable is a fair bit smaller and shorter than our /bin/ksh that
it is designed to eventually replace (as /bin/sh hardlink), with the old
/bin/ksh to completely vanish. It is still in beta testing though, and I
don't think it will compile on other operating systems.

mksh R21 is a completely new port, bringing together the OpenBSD-current
/bin/ksh, the MirOS-current /bin/ksh and the older mksh R20 (which still
was portable, ocvs-based).
2005-05-23 03:06:10 +00:00
tg d8d708aa45 * un-hook bin/ksh, usr.bin/xmlwf and lib/libexpat from the build
- expat as discussed with bsiegert@ today on the phone
  - ksh as announced earlier on the lists
* un-hook lib/libexpat from make includes
* remove /usr/include/{,open}ssl upgrade workaround from includes/Makefile
* nuke old bin/ksh
* nuke libexpat and xmlwf
2005-10-21 11:33:15 +00:00
tg b65ac4d1e3 * merge bin and lib completely
* convert some ancient RCSID styles etc. to more modern stuff
* fix use of CDIAGFLAGS+=, CFLAGS+= and COPTS+= to the correct
  variant (include bsd.own.mk _then_ COPTS+=) so they're added
  after any user-specified flags
  (this is probably lurking in more places than I can imagine)
* fix some indenting, comments, etc.
* make stuff compile (fix warnings/errors)
* add script to review _all_ shlib_version after an openbsd import
* remove two more obsolete /usr/lib/debug/ references
* bin/ps: comment out some SMP code
2005-10-21 11:02:33 +00:00
tg 386c302d84 switch /bin/sh to nb-ash (without command line editing) 2005-08-29 20:54:39 +00:00
tg 34f975017d use "beforedepend" 2005-03-15 19:05:11 +00:00
tg 230e0aec14 CFLAGS vs COPTS vs CPPFLAGS cleanup 2005-03-15 18:58:32 +00:00
tg a90702a5a1 Initial revision 2005-03-06 15:42:55 +00:00
tg e8307f4a45 get rid of manually generated signal lists 2004-12-31 19:24:20 +00:00
tg 4c4a9323f8 unifdef: KSH
no binary change
2004-12-18 18:58:32 +00:00
tg 978a1d53a1 * reduce amount of empty lines
* replace some spaces by tabs
* shuffle code around (shrink)
2004-12-13 18:53:25 +00:00
tg 429f327c0a nuke some dead code 2004-12-13 16:50:52 +00:00
tg 97d9512149 bump to mksh R19 2004-12-10 18:12:32 +00:00
tg 7920708324 Initial revision 2004-12-10 18:12:29 +00:00
tg ff8192c9b9 remove mail check functionality (everybody SANE uses uw, imaps and mbx now)
update notes
fix Build.sh
2004-11-10 17:13:11 +00:00
tg 582bb62b81 add to mksh the unique ability to spawn on a different VT 2004-10-31 22:28:43 +00:00