From af606537e29c0a4cdaa7bf7c22287cf8fb9051f2 Mon Sep 17 00:00:00 2001 From: tg Date: Wed, 17 Jan 2007 23:18:55 +0000 Subject: [PATCH] if we don't have rlim_t, assume it's long --- Build.sh | 21 ++++++++++++++++----- Makefile | 5 +++-- sh.h | 8 +++++++- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Build.sh b/Build.sh index 8db1958..9fc422f 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $MirOS: src/bin/mksh/Build.sh,v 1.131 2007/01/17 23:04:19 tg Exp $ +# $MirOS: src/bin/mksh/Build.sh,v 1.132 2007/01/17 23:18:55 tg Exp $ #- # Env: CC, CFLAGS, CPP, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF, TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_NOPWNAM @@ -289,26 +289,37 @@ fi # # Environment: headers # -ac_test sys_param_h '' '' <<'EOF' +ac_test sys_param_h '' '' <<-'EOF' #include int main(void) { return (0); } EOF -ac_test sys_sysmacros_h '' '' <<'EOF' +ac_test sys_sysmacros_h '' '' <<-'EOF' #include int main(void) { return (0); } EOF -ac_test libgen_h '' '' <<'EOF' +ac_test libgen_h '' '' <<-'EOF' #include int main(void) { return (0); } EOF -ac_test stdbool_h '' '' <<'EOF' +ac_test stdbool_h '' '' <<-'EOF' #include int main(void) { return (0); } EOF +# +# Environment: types +# +ac_test rlim_t <<-'EOF' + #include + #include + #include + #include + int main(void) { return ((int)(rlim_t)0); } +EOF + # # Environment: signals # diff --git a/Makefile b/Makefile index 544bd23..bf94c60 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ -# $MirOS: src/bin/mksh/Makefile,v 1.24 2007/01/17 22:51:46 tg Exp $ +# $MirOS: src/bin/mksh/Makefile,v 1.25 2007/01/17 23:18:55 tg Exp $ PROG= mksh 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 CPPFLAGS+= -DHAVE_ATTRIBUTE -DHAVE_ATTRIBUTE_BOUNDED -DHAVE_ATTRIBUTE_USED -CPPFLAGS+= -DHAVE_SYS_PARAM_H -DHAVE_LIBGEN_H -DHAVE_STDBOOL_H +CPPFLAGS+= -DHAVE_SYS_PARAM_H -DHAVE_SYS_SYSMACROS_H=0 -DHAVE_LIBGEN_H +CPPFLAGS+= -DHAVE_STDBOOL_H -DHAVE_RLIM_T CPPFLAGS+= -DHAVE_SYS_SIGNAME -DHAVE_SYS_SIGLIST CPPFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_ARC4RANDOM_PUSH -DHAVE_SETLOCALE_CTYPE CPPFLAGS+= -DHAVE_LANGINFO_CODESET -DHAVE_SETMODE -DHAVE_SETRESUGID diff --git a/sh.h b/sh.h index a0ddb1d..d8182c1 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.103 2007/01/17 23:10:14 tg Exp $" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.104 2007/01/17 23:18:55 tg Exp $" #define MKSH_VERSION "R29 2007/01/17" #if HAVE_SYS_PARAM_H @@ -85,6 +85,12 @@ #include #endif +/* extra types */ + +#if !HAVE_RLIM_T +typedef long rlim_t; +#endif + #if !HAVE_STDBOOL_H /* kludge, but enough for mksh */ typedef int bool;