AIX has sys_siglist[] but doesn't define it anywhere, so add a means to

scan for defns and use it here; bug reported by Kurt Telep
This commit is contained in:
tg 2007-04-23 20:37:16 +00:00
parent 24f650213a
commit 615a7794a6
3 changed files with 24 additions and 6 deletions

View File

@ -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");

View File

@ -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

12
sh.h
View File

@ -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 <sys/param.h>
#endif
#include <sys/types.h>
#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 <values.h>
#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 */