Skip to content

Commit

Permalink
Don't pretend to determine whether ansi2knr is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
arc committed Oct 21, 2017
1 parent 01f1810 commit c9db53f
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 63 deletions.
70 changes: 22 additions & 48 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ rm_try=''
afs=''
afsroot=''
alignbytes=''
ansi2knr=''
archlib=''
archlibexp=''
d_archlib=''
Expand Down Expand Up @@ -8105,52 +8104,6 @@ esac
set d_perl_otherlibdirs
eval $setvar

: Cruising for prototypes
echo " "
echo "Checking out function prototypes..." >&4
$cat >prototype.c <<EOCP
#$i_stdlib I_STDLIB
#ifdef I_STDLIB
#include <stdlib.h>
#endif
int main(int argc, char *argv[]) {
exit(0);}
EOCP
if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
echo "Your C compiler appears to support function prototypes."
val="$define"
else
echo "Your C compiler doesn't seem to understand function prototypes."
val="$undef"
fi
set prototype
eval $setvar
$rm -f prototype*

: Check if ansi2knr is required
case "$prototype" in
"$define") ;;
*) ansi2knr='ansi2knr'
echo " "
cat <<EOM >&4

$me: FATAL ERROR:
This version of $package can only be compiled by a compiler that
understands function prototypes. Unfortunately, your C compiler
$cc $ccflags
doesn't seem to understand them. Sorry about that.

If GNU cc is available for your system, perhaps you could try that instead.

Eventually, we hope to support building Perl with pre-ANSI compilers.
If you would like to help in that effort, please contact <perlbug@perl.org>.

Aborting Configure now.
EOM
exit 2
;;
esac

: DTrace support
dflt_dtrace='/usr/sbin/dtrace'
$test -x /usr/bin/dtrace && dflt_dtrace='/usr/bin/dtrace'
Expand Down Expand Up @@ -10789,6 +10742,28 @@ eval $inlibc
set asctime64 d_asctime64
eval $inlibc

: Cruising for prototypes
echo " "
echo "Checking out function prototypes..." >&4
$cat >prototype.c <<EOCP
#$i_stdlib I_STDLIB
#ifdef I_STDLIB
#include <stdlib.h>
#endif
int main(int argc, char *argv[]) {
exit(0);}
EOCP
if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
echo "Your C compiler appears to support function prototypes."
val="$define"
else
echo "Your C compiler doesn't seem to understand function prototypes."
val="$undef"
fi
set prototype
eval $setvar
$rm -f prototype*

: see if POSIX threads are available
set pthread.h i_pthread
eval $inhdr
Expand Down Expand Up @@ -24120,7 +24095,6 @@ _o='$_o'
afs='$afs'
afsroot='$afsroot'
alignbytes='$alignbytes'
ansi2knr='$ansi2knr'
aphostname='$aphostname'
api_revision='$api_revision'
api_subversion='$api_subversion'
Expand Down
1 change: 0 additions & 1 deletion Cross/cflags-cross-arm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ if test -f .patch; then
ccflags="-DPERL_PATCHNUM=`cat .patch` $ccflags"
fi

: Can we perhaps use $ansi2knr here
echo "$CROSSCC -c -DUSE_CROSS_COMPILE -DPERL_CORE $ccflags $stdflags $optimize $warn $extra"
eval "$also "'"$CROSSCC -DUSE_CROSS_COMPILE -DPERL_CORE -c $ccflags $stdflags $optimize $warn $extra"'

Expand Down
1 change: 0 additions & 1 deletion Cross/config.sh-arm-linux
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ _o='.o'
afs='false'
afsroot='/afs'
alignbytes='4'
ansi2knr=''
aphostname='/bin/hostname'
api_revision='5'
api_subversion='6'
Expand Down
1 change: 0 additions & 1 deletion Cross/config.sh-arm-linux-n770
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ _o='.armo'
afs='false'
afsroot='/afs'
alignbytes='4'
ansi2knr=''
aphostname='/bin/hostname'
api_revision='5'
api_subversion='6'
Expand Down
1 change: 0 additions & 1 deletion NetWare/config.wc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ _nlp='.nlp'
_o='.obj'
afs='false'
alignbytes='8'
ansi2knr=''
aphostname=''
api_revision='~PERL_API_REVISION~'
api_subversion='~PERL_API_SUBVERSION~'
Expand Down
4 changes: 0 additions & 4 deletions Porting/Glossary
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ alignbytes (alignbytes.U):
double-- or a long double when applicable. Usual values are
2, 4 and 8. The default is eight, for safety.

ansi2knr (ansi2knr.U):
This variable is set if the user needs to run ansi2knr.
Currently, this is not supported, so we just abort.

aphostname (d_gethname.U):
This variable contains the command which can be used to compute the
host name. The command is fully qualified by its absolute path, to make
Expand Down
1 change: 0 additions & 1 deletion Porting/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ _o='.o'
afs='false'
afsroot='/afs'
alignbytes='8'
ansi2knr=''
aphostname='/bin/hostname'
api_revision='5'
api_subversion='6'
Expand Down
1 change: 0 additions & 1 deletion cflags.SH
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ for file do
toke) optimize=-O0 ;;
esac
# Can we perhaps use $ansi2knr here
echo "$cc -c -DPERL_CORE $ccflags $stdflags $optimize $warn $extra"
. $TOP/config.sh
Expand Down
1 change: 0 additions & 1 deletion plan9/config_sh.sample
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ _o='.o'
afs='false'
afsroot='/afs'
alignbytes='4'
ansi2knr=''
aphostname='/bin/uname -n'
api_revision='5'
api_subversion='6'
Expand Down
1 change: 0 additions & 1 deletion uconfig64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ _o='.o'
afs='false'
afsroot='/afs'
alignbytes='8'
ansi2knr=''
aphostname='/bin/hostname'
archlib='/usr/local/lib/perl5/5.27/unknown'
archlibexp='/usr/local/lib/perl5/5.27/unknown'
Expand Down
1 change: 0 additions & 1 deletion win32/config.ce
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ _exe='.exe'
_o='.obj'
afs='false'
alignbytes='8'
ansi2knr=''
aphostname=''
api_revision='~PERL_API_REVISION~'
api_subversion='~PERL_API_SUBVERSION~'
Expand Down
1 change: 0 additions & 1 deletion win32/config.gc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ _o='.o'
afs='false'
afsroot='/afs'
alignbytes='8'
ansi2knr=''
aphostname=''
api_revision='~PERL_API_REVISION~'
api_subversion='~PERL_API_SUBVERSION~'
Expand Down
1 change: 0 additions & 1 deletion win32/config.vc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ _o='.obj'
afs='false'
afsroot='/afs'
alignbytes='8'
ansi2knr=''
aphostname=''
api_revision='~PERL_API_REVISION~'
api_subversion='~PERL_API_SUBVERSION~'
Expand Down

0 comments on commit c9db53f

Please # to comment.