• check for flock decl too (weird on OSF/1: if !POSIX and BSD)

• un-experimental Tru64
This commit is contained in:
tg 2008-03-05 18:49:15 +00:00
parent 194972394d
commit 845f6f0d64
3 changed files with 14 additions and 5 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.287 2008/03/05 18:25:57 tg Exp $'
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.288 2008/03/05 18:49:14 tg Exp $'
#-
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
@ -315,7 +315,6 @@ OSF1)
HAVE_SIG_T=0 # incompatible
CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE -D_POSIX_C_SOURCE=200112L"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED"
warn=' and is still experimental'
;;
Plan9)
CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_LIMITS_EXTENSION"
@ -954,6 +953,12 @@ ac_test '!' arc4random_pushb_decl arc4random_pushb 1 'if arc4random_pushb() does
int arc4random_pushb(char, int); /* this clashes if defined before */
int main(int ac, char *av[]) { return (arc4random_pushb(**av, ac)); }
EOF
ac_test '!' flock_decl flock_ex 1 'if flock() does not need to be declared' <<-'EOF'
#define MKSH_INCLUDES_ONLY
#include "sh.h"
long flock(void); /* this clashes if defined before */
int main(void) { return (flock()); }
EOF
ac_test '!' revoke_decl revoke 1 'if revoke() does not need to be declared' <<-'EOF'
#define MKSH_INCLUDES_ONLY
#include "sh.h"

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/Makefile,v 1.53 2008/03/05 17:06:50 tg Exp $
# $MirOS: src/bin/mksh/Makefile,v 1.54 2008/03/05 18:49:15 tg Exp $
#-
# use CPPFLAGS=-DDEBUG __CRAZY=Yes to check for certain more stuff
@ -21,7 +21,7 @@ CPPFLAGS+= -DMKSH_ASSUME_UTF8 \
-DHAVE_SETLOCALE_CTYPE=0 -DHAVE_LANGINFO_CODESET=0 \
-DHAVE_MKNOD=1 -DHAVE_REVOKE=1 -DHAVE_SETMODE=1 \
-DHAVE_SETRESUGID=1 -DHAVE_SETGROUPS=1 -DHAVE_STRCASESTR=1 \
-DHAVE_STRLCPY=1 -DHAVE_ARC4RANDOM_DECL=1 \
-DHAVE_STRLCPY=1 -DHAVE_ARC4RANDOM_DECL=1 -DHAVE_FLOCK_DECL=1 \
-DHAVE_ARC4RANDOM_PUSHB_DECL=1 -DHAVE_REVOKE_DECL=1 \
-DHAVE_SYS_SIGLIST_DECL=1 -DHAVE_PERSISTENT_HISTORY=1
COPTS+= -std=gnu99 -Wall

6
sh.h
View File

@ -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.194 2008/03/05 18:21:45 tg Exp $"
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.195 2008/03/05 18:49:15 tg Exp $"
#define MKSH_VERSION "R33 2008/03/05"
#if HAVE_SYS_PARAM_H
@ -204,6 +204,10 @@ extern void arc4random_addrandom(unsigned char *, int)
extern uint32_t arc4random_pushb(void *, size_t);
#endif
#if !HAVE_FLOCK_DECL
extern int flock(int, int);
#endif
#if !HAVE_REVOKE_DECL
extern int revoke(const char *);
#endif