From f948c13a78a3494dd18f287fa6e5318847b1ff06 Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 1 Jul 2007 21:47:08 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=A2=20fix=20display=20problem=20=E2=80=A2?= =?UTF-8?q?=20add=20=20if=20it=20exists=20=E2=80=93=20revoke(2)?= =?UTF-8?q?=20on=20UWIN=20=E2=80=A2=20add=20=20for=20NULL=20in?= =?UTF-8?q?=20test=20of=20mmap(2)=20=E2=80=A2=20regen=20CPPFLAGS=20for=20M?= =?UTF-8?q?irBSD=20native=20builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build.sh | 10 +++++++++- Makefile | 18 +++++++++--------- sh.h | 5 ++++- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Build.sh b/Build.sh index 5a776a2..5d5827d 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $MirOS: src/bin/mksh/Build.sh,v 1.233 2007/07/01 21:27:02 tg Exp $ +# $MirOS: src/bin/mksh/Build.sh,v 1.234 2007/07/01 21:47:07 tg Exp $ #- # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NEED_MKNOD MKSH_NOPWNAM @@ -77,6 +77,9 @@ ac_cache() { # returns 1 if value was cached/implied, 0 otherwise: call ac_testdone ac_testinit() { if ac_cache $1; then + test x"$2" = x"!" && shift + test x"$2" = x"" || shift + fd=$3 ac_testdone return 1 fi @@ -571,6 +574,7 @@ ac_header sys/mkdev.h ac_header sys/mman.h sys/types.h ac_header sys/sysmacros.h ac_header libgen.h +ac_header libutil.h ac_header paths.h ac_header stdbool.h ac_header stdint.h stdarg.h @@ -702,6 +706,7 @@ ac_test flock_ex '' 'flock and mmap' <<-'EOF' #include #include #include + #include int main(void) { return (mmap(NULL, flock(0, LOCK_EX), PROT_READ, MAP_FILE | MAP_PRIVATE, 0, 0) == NULL ? 1 : 0); } EOF @@ -719,6 +724,9 @@ ac_test langinfo_codeset setlocale_ctype 0 'nl_langinfo(CODESET)' <<-'EOF' EOF ac_test revoke mksh_full 0 <<-'EOF' + #if HAVE_LIBUTIL_H + #include + #endif #include int main(int ac, char *av[]) { return (ac + revoke(av[0])); } EOF diff --git a/Makefile b/Makefile index 350dc4d..159ddb5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/Makefile,v 1.43 2007/06/05 21:47:48 tg Exp $ +# $MirOS: src/bin/mksh/Makefile,v 1.44 2007/07/01 21:47:07 tg Exp $ #- # use CPPFLAGS=-DDEBUG __CRAZY=Yes to check for certain more stuff @@ -9,14 +9,14 @@ SRCS= alloc.c edit.c eval.c exec.c expr.c funcs.c histrap.c \ jobs.c lex.c main.c misc.c shf.c syn.c tree.c var.c .if !make(test-build) CPPFLAGS+= -DMKSH_ASSUME_UTF8 \ - -DHAVE_ATTRIBUTE=1 -DHAVE_ATTRIBUTE_BOUNDED=1 \ - -DHAVE_ATTRIBUTE_USED=1 -DHAVE_EXPSTMT=1 -DHAVE_SYS_PARAM_H=1 \ - -DHAVE_SYS_MKDEV_H=0 -DHAVE_SYS_MMAN_H=1 \ - -DHAVE_SYS_SYSMACROS_H=0 -DHAVE_LIBGEN_H=1 -DHAVE_PATHS_H=1 \ - -DHAVE_STDBOOL_H=1 -DHAVE_STDINT_H=1 -DHAVE_GRP_H=1 \ - -DHAVE_ULIMIT_H=0 -DHAVE_VALUES_H=0 -DHAVE_RLIM_T=1 \ - -DHAVE_SIG_T=1 -DHAVE_SYS_SIGNAME=1 -DHAVE_SYS_SIGLIST=1 \ - -DHAVE_STRSIGNAL=0 -DHAVE_ARC4RANDOM=1 \ + -DHAVE_EXPSTMT=1 -DHAVE_ATTRIBUTE=1 \ + -DHAVE_ATTRIBUTE_BOUNDED=1 -DHAVE_ATTRIBUTE_USED=1 \ + -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_MKDEV_H=0 -DHAVE_SYS_MMAN_H=1 \ + -DHAVE_SYS_SYSMACROS_H=0 -DHAVE_LIBGEN_H=1 -DHAVE_LIBUTIL_H=0 \ + -DHAVE_PATHS_H=1 -DHAVE_STDBOOL_H=1 -DHAVE_STDINT_H=1 \ + -DHAVE_GRP_H=1 -DHAVE_ULIMIT_H=0 -DHAVE_VALUES_H=0 \ + -DHAVE_RLIM_T=1 -DHAVE_SIG_T=1 -DHAVE_SYS_SIGNAME=1 \ + -DHAVE_SYS_SIGLIST=1 -DHAVE_STRSIGNAL=0 -DHAVE_ARC4RANDOM=1 \ -DHAVE_ARC4RANDOM_PUSH=1 -DHAVE_FLOCK_EX=1 \ -DHAVE_SETLOCALE_CTYPE=0 -DHAVE_LANGINFO_CODESET=0 \ -DHAVE_REVOKE=1 -DHAVE_SETMODE=1 -DHAVE_SETRESUGID=1 \ diff --git a/sh.h b/sh.h index 67bbb0e..c353c11 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.153 2007/07/01 21:27:03 tg Exp $" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.154 2007/07/01 21:47:08 tg Exp $" #define MKSH_VERSION "R29 2007/07/01" #if HAVE_SYS_PARAM_H @@ -36,6 +36,9 @@ #if HAVE_LIBGEN_H #include #endif +#if HAVE_LIBUTIL_H +#include +#endif #include #if HAVE_PATHS_H #include