OSF/1 doesn’t seem to declare revoke(2) anywhere

This commit is contained in:
tg 2008-03-05 17:06:50 +00:00
parent 227a5af8bc
commit 3d9bd0e1f0
3 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.281 2008/03/05 17:00:33 tg Exp $'
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.282 2008/03/05 17:06:49 tg Exp $'
#-
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
@ -950,6 +950,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 '!' revoke_decl revoke 1 'if revoke() does not need to be declared' <<-'EOF'
#define MKSH_INCLUDES_ONLY
#include "sh.h"
long revoke(void); /* this clashes if defined before */
int main(void) { return (revoke()); }
EOF
ac_test sys_siglist_decl sys_siglist 1 'if sys_siglist[] 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.52 2008/02/29 16:38:40 tg Exp $
# $MirOS: src/bin/mksh/Makefile,v 1.53 2008/03/05 17:06:50 tg Exp $
#-
# use CPPFLAGS=-DDEBUG __CRAZY=Yes to check for certain more stuff
@ -22,8 +22,8 @@ CPPFLAGS+= -DMKSH_ASSUME_UTF8 \
-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_ARC4RANDOM_PUSHB_DECL=1 -DHAVE_SYS_SIGLIST_DECL=1 \
-DHAVE_PERSISTENT_HISTORY=1
-DHAVE_ARC4RANDOM_PUSHB_DECL=1 -DHAVE_REVOKE_DECL=1 \
-DHAVE_SYS_SIGLIST_DECL=1 -DHAVE_PERSISTENT_HISTORY=1
COPTS+= -std=gnu99 -Wall
.endif

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.192 2008/03/01 21:10:26 tg Exp $"
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.193 2008/03/05 17:06:50 tg Exp $"
#define MKSH_VERSION "R33 2008/03/01"
#if HAVE_SYS_PARAM_H
@ -200,6 +200,10 @@ extern void arc4random_addrandom(unsigned char *, int)
extern uint32_t arc4random_pushb(void *, size_t);
#endif
#if !HAVE_REVOKE_DECL
extern int revoke(const char *);
#endif
#if !HAVE_SETMODE
mode_t getmode(const void *, mode_t);
void *setmode(const char *);