diff --git a/Build.sh b/Build.sh index a0f81c5..18412a2 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $MirOS: src/bin/mksh/Build.sh,v 1.172 2007/04/23 20:17:58 tg Exp $ +# $MirOS: src/bin/mksh/Build.sh,v 1.173 2007/04/23 20:37:15 tg Exp $ #- # Environment used: CC CFLAGS CPP CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NEED_MKNOD MKSH_NOPWNAM @@ -613,6 +613,15 @@ ac_test strlcpy <<-'EOF' int main(int ac, char *av[]) { return (strlcpy(*av, av[1], ac)); } EOF +# +# checks for function definitions in headers +# +ac_test sys_siglist_defn sys_siglist 1 'if sys_siglist[] is defined' <<-'EOF' + #define MKSH_INCLUDES_ONLY + #include "sh.h" + int main(void) { return (sys_siglist[0][0]); } +EOF + # # other checks # @@ -627,7 +636,7 @@ test 1 = $HAVE_PERSISTENT_HISTORY || \ # Should be the _last_ one ac_test multi_idstring '' 'if we can use __RCSID(x) multiple times' <<-'EOF' - #define HAVE_MULTI_IDSTRING 1 + #define MKSH_INCLUDES_ONLY #include "sh.h" __RCSID("one"); __RCSID("two"); diff --git a/Makefile b/Makefile index d6ed849..1c65208 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/Makefile,v 1.36 2007/04/16 18:54:37 tg Exp $ +# $MirOS: src/bin/mksh/Makefile,v 1.37 2007/04/23 20:37:16 tg Exp $ #- # use CPPFLAGS=-DDEBUG __CRAZY=Yes to check for certain more stuff @@ -21,7 +21,8 @@ CPPFLAGS+= -DMKSH_ASSUME_UTF8 \ -DHAVE_SETLOCALE_CTYPE=0 -DHAVE_LANGINFO_CODESET=0 \ -DHAVE_REVOKE=1 -DHAVE_SETMODE=1 -DHAVE_SETRESUGID=1 \ -DHAVE_SETGROUPS=1 -DHAVE_STRCASESTR=1 -DHAVE_STRLCPY=1 \ - -DHAVE_PERSISTENT_HISTORY=1 -DHAVE_MULTI_IDSTRING=1 + -DHAVE_SYS_SIGLIST_DEFN=1 -DHAVE_PERSISTENT_HISTORY=1 \ + -DHAVE_MULTI_IDSTRING=1 COPTS+= -std=gnu99 -Wall .endif diff --git a/sh.h b/sh.h index edf4326..8854835 100644 --- a/sh.h +++ b/sh.h @@ -8,14 +8,14 @@ /* $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.125 2007/04/23 14:04:38 tg Exp $" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.126 2007/04/23 20:37:16 tg Exp $" #define MKSH_VERSION "R29 2007/04/17" #if HAVE_SYS_PARAM_H #include #endif #include -#if !HAVE_MULTI_IDSTRING +#if defined(MKSH_INCLUDES_ONLY) || !HAVE_MULTI_IDSTRING #undef __RCSID #endif #if !defined(__RCSID) || !defined(__SCCSID) @@ -87,6 +87,8 @@ #include #endif +#ifndef MKSH_INCLUDES_ONLY + /* extra types */ #if !HAVE_RLIM_T @@ -203,6 +205,10 @@ extern int __cdecl seteuid(uid_t); extern int __cdecl setegid(gid_t); #endif +#if !HAVE_SYS_SIGLIST_DEFN +extern const char *const sys_siglist[]; +#endif + /* some useful #defines */ #ifdef EXTERN # define I__(i) = i @@ -1513,3 +1519,5 @@ extern void tty_close(void); # undef EXTERN #endif #undef I__ + +#endif /* !MKSH_INCLUDES_ONLY */