* instead of including <sys/cdefs.h> (not in Solaris), we hope <sys/types.h>

includes it for us
* autoconf-test for <sys/param.h> (not in SUSv3) existence
This commit is contained in:
tg 2006-11-09 00:11:39 +00:00
parent 9b0dbaddbf
commit 0307ecb492
3 changed files with 13 additions and 6 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $MirOS: src/bin/mksh/Build.sh,v 1.65 2006/11/09 00:08:25 tg Exp $ # $MirOS: src/bin/mksh/Build.sh,v 1.66 2006/11/09 00:11:38 tg Exp $
#- #-
# Environment: CC, CFLAGS, CPPFLAGS, LDFLAGS, LIBS, NROFF # Environment: CC, CFLAGS, CPPFLAGS, LDFLAGS, LIBS, NROFF
@ -191,6 +191,11 @@ ac_test strlcpy <<-'EOF'
int main(int ac, char *av[]) { strlcpy(av[0], av[1], 1); return (ac); } int main(int ac, char *av[]) { strlcpy(av[0], av[1], 1); return (ac); }
EOF EOF
ac_test sys_param_h '' '<sys/param.h>' <<'EOF'
#include <sys/param.h>
int main(void) { return (0); }
EOF
$e ... done. $e ... done.
addsrcs HAVE_SETMODE setmode.c addsrcs HAVE_SETMODE setmode.c
addsrcs HAVE_STRLCAT strlfun.c addsrcs HAVE_STRLCAT strlfun.c

View File

@ -1,9 +1,9 @@
# $MirOS: src/bin/mksh/Makefile,v 1.15 2006/11/08 23:45:46 tg Exp $ # $MirOS: src/bin/mksh/Makefile,v 1.16 2006/11/09 00:11:39 tg Exp $
PROG= mksh PROG= mksh
SRCS= alloc.c edit.c eval.c exec.c expr.c funcs.c histrap.c \ 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 jobs.c lex.c main.c misc.c shf.c syn.c tree.c var.c
CPPFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_ARC4RANDOM_PUSH CPPFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_ARC4RANDOM_PUSH -DHAVE_SYS_PARAM_H
CPPFLAGS+= -DHAVE_LANGINFO_CODESET -DHAVE_SETLOCALE_CTYPE CPPFLAGS+= -DHAVE_LANGINFO_CODESET -DHAVE_SETLOCALE_CTYPE
CPPFLAGS+= -DHAVE_SETMODE -DHAVE_STRLCAT -DHAVE_STRLCPY CPPFLAGS+= -DHAVE_SETMODE -DHAVE_STRLCAT -DHAVE_STRLCPY
CDIAGFLAGS+= -Wno-cast-qual CDIAGFLAGS+= -Wno-cast-qual

8
sh.h
View File

@ -8,10 +8,13 @@
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */ /* $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 $ */ /* $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.53 2006/11/08 23:50:47 tg Exp $" #define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.54 2006/11/09 00:11:39 tg Exp $"
#define MKSH_VERSION "R29 2006/11/08" #define MKSH_VERSION "R29 2006/11/08"
#include <sys/cdefs.h> #if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <sys/types.h>
#if !defined(__RCSID) || !defined(__SCCSID) #if !defined(__RCSID) || !defined(__SCCSID)
#if !defined(__GNUC__) || defined(lint) #if !defined(__GNUC__) || defined(lint)
#define __attribute__(x) /* deleted */ #define __attribute__(x) /* deleted */
@ -30,7 +33,6 @@
#define __SCCSID(x) __IDSTRING(sccsid,x) #define __SCCSID(x) __IDSTRING(sccsid,x)
#endif #endif
#include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/file.h> #include <sys/file.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>