From e141cab1acaf461eaef79a4eedc31432909948e6 Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 17 Feb 2013 07:06:15 +0000 Subject: [PATCH] revert cid 10050DD0C8519194AE9 and 100511FC81525949AF7 AT&T SVR4 broke 'cc -c -o foo.o foo.c' totally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Build.sh | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Build.sh b/Build.sh index af44c70..e1961b1 100644 --- a/Build.sh +++ b/Build.sh @@ -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 #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