• 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
This commit is contained in:
tg
2008-03-25 21:34:45 +00:00
parent b8b52a7c92
commit def9c172df
5 changed files with 69 additions and 22 deletions

11
sh.h
View File

@@ -8,8 +8,8 @@
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.197 2008/03/23 22:09:59 tg Exp $"
#define MKSH_VERSION "R33 2008/03/23"
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.198 2008/03/25 21:34:45 tg Exp $"
#define MKSH_VERSION "R33 2008/03/25"
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
@@ -167,6 +167,9 @@ typedef int bool;
#ifndef S_ISTXT
#define S_ISTXT 0001000
#endif
#ifndef S_ISLNK
#define S_ISLNK(m) ((m & 0170000) == 0120000)
#endif
#ifndef S_ISSOCK
#define S_ISSOCK(m) ((m & 0170000) == 0140000)
#endif
@@ -221,6 +224,10 @@ mode_t getmode(const void *, mode_t);
void *setmode(const char *);
#endif
#ifdef __ultrix
int strcasecmp(const char *, const char *);
#endif
#if !HAVE_STRCASESTR
const char *stristr(const char *, const char *);
#endif