revert cid 10050DD0C8519194AE9 and 100511FC81525949AF7

AT&T SVR4 broke 'cc -c -o foo.o foo.c' totally

switch to an alternative method of finding out the prototypes
provided in IRC by dalias (thanks); RT says this fixes his
issues on SVR4 – let’s just ignore the ominous message from
cid 1004713D70A5362BACF about needing to be a compile-time
check unless something else pops up, I can’t think of something
that isn’t already covered
This commit is contained in:
tg 2013-02-17 07:06:15 +00:00
parent e21a2166f7
commit e141cab1ac
1 changed files with 6 additions and 15 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.619 2013/02/17 05:40:11 tg Exp $'
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.620 2013/02/17 07:06:15 tg Exp $'
#-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013
@ -1529,7 +1529,7 @@ else
#define EXTERN
#define MKSH_INCLUDES_ONLY
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.619 2013/02/17 05:40:11 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.620 2013/02/17 07:06:15 tg Exp $");
int main(void) { printf("Hello, World!\n"); return (0); }
EOF
case $cm in
@ -1809,38 +1809,29 @@ EOF
#
# check headers for declarations
#
save_tcfn=$tcfn; save_CC=$CC; save_LDFLAGS=$LDFLAGS; save_LIBS=$LIBS
tcfn=conftest.o; CC="$CC -c -o $tcfn"; LDFLAGS=; LIBS=
rm -f conftest.o
ac_test '!' flock_decl flock 1 'if flock() does not need to be declared' <<-'EOF'
ac_test flock_decl flock 1 'for declaration of flock()' <<-'EOF'
#define MKSH_INCLUDES_ONLY
#include "sh.h"
#if HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
long flock(void); /* this clashes if defined before */
int main(void) { return ((int)flock()); }
int main(void) { return ((flock)(0, 0)); }
EOF
rm -f conftest.o
ac_test '!' revoke_decl revoke 1 'if revoke() does not need to be declared' <<-'EOF'
ac_test revoke_decl revoke 1 'for declaration of revoke()' <<-'EOF'
#define MKSH_INCLUDES_ONLY
#include "sh.h"
long revoke(void); /* this clashes if defined before */
int main(void) { return ((int)revoke()); }
int main(void) { return ((revoke)("")); }
EOF
rm -f conftest.o
ac_test sys_errlist_decl sys_errlist 0 "for declaration of sys_errlist[] and sys_nerr" <<-'EOF'
#define MKSH_INCLUDES_ONLY
#include "sh.h"
int main(void) { return (*sys_errlist[sys_nerr - 1]); }
EOF
rm -f conftest.o
ac_test sys_siglist_decl sys_siglist 0 'for declaration of sys_siglist[]' <<-'EOF'
#define MKSH_INCLUDES_ONLY
#include "sh.h"
int main(void) { return (sys_siglist[0][0]); }
EOF
tcfn=$save_tcfn; CC=$save_CC; LDFLAGS=$save_LDFLAGS; LIBS=$save_LIBS
#
# other checks