From 26ba2854a293e2f9f6a53d18e1bd2ae484ea8d8b Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 23 Mar 2008 20:55:18 +0000 Subject: [PATCH] support BSD/OS 3.1 with gcc2, 10x replaced@tnf except MAP_FAILED not being defined, no issues --- Build.sh | 4 +++- sh.h | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Build.sh b/Build.sh index d8f2244..234e438 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.295 2008/03/23 20:21:24 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.296 2008/03/23 20:55:17 tg Exp $' #- # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI @@ -274,6 +274,8 @@ AIX) fi : ${LIBS='-lcrypt'} ;; +BSD/OS) + ;; CYGWIN*) ;; Darwin) diff --git a/sh.h b/sh.h index c81ab9a..82c497b 100644 --- a/sh.h +++ b/sh.h @@ -8,7 +8,7 @@ /* $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.195 2008/03/05 18:49:15 tg Exp $" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.196 2008/03/23 20:55:18 tg Exp $" #define MKSH_VERSION "R33 2008/03/05" #if HAVE_SYS_PARAM_H @@ -178,8 +178,12 @@ typedef int bool; #define RLIMIT_VMEM RLIMIT_AS #endif -#if !defined(MAP_FAILED) && defined(__linux) +#if !defined(MAP_FAILED) +# if defined(__linux) #define MAP_FAILED ((void *)-1) +# elif defined(__bsdi__) +#define MAP_FAILED ((caddr_t)-1) +# endif #endif #ifndef NSIG