diff options
author | obrien <obrien@FreeBSD.org> | 1999-09-19 05:59:11 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-09-19 05:59:11 +0000 |
commit | c53c47e769827bb2d6d596865051a4af89d246fd (patch) | |
tree | 354ca5598013982362bb6e08cf4b5d6b79b0c370 /contrib/libf2c/libI77 | |
parent | 98e51635e2084da6cfe0d3b1782cb95b80fd2caa (diff) | |
download | FreeBSD-src-c53c47e769827bb2d6d596865051a4af89d246fd.zip FreeBSD-src-c53c47e769827bb2d6d596865051a4af89d246fd.tar.gz |
Virgin import of GCC 2.95.1's libf2c
Diffstat (limited to 'contrib/libf2c/libI77')
-rw-r--r-- | contrib/libf2c/libI77/Makefile.in | 63 | ||||
-rw-r--r-- | contrib/libf2c/libI77/Version.c | 12 | ||||
-rw-r--r-- | contrib/libf2c/libI77/backspace.c | 1 | ||||
-rwxr-xr-x | contrib/libf2c/libI77/configure | 234 | ||||
-rw-r--r-- | contrib/libf2c/libI77/configure.in | 1 | ||||
-rw-r--r-- | contrib/libf2c/libI77/dfe.c | 8 | ||||
-rw-r--r-- | contrib/libf2c/libI77/endfile.c | 2 | ||||
-rw-r--r-- | contrib/libf2c/libI77/err.c | 3 | ||||
-rw-r--r-- | contrib/libf2c/libI77/lread.c | 7 | ||||
-rw-r--r-- | contrib/libf2c/libI77/open.c | 5 | ||||
-rw-r--r-- | contrib/libf2c/libI77/rdfmt.c | 135 | ||||
-rw-r--r-- | contrib/libf2c/libI77/rsne.c | 2 | ||||
-rw-r--r-- | contrib/libf2c/libI77/sfe.c | 6 |
13 files changed, 319 insertions, 160 deletions
diff --git a/contrib/libf2c/libI77/Makefile.in b/contrib/libf2c/libI77/Makefile.in index 2625bf5..1ff6b60 100644 --- a/contrib/libf2c/libI77/Makefile.in +++ b/contrib/libf2c/libI77/Makefile.in @@ -84,58 +84,61 @@ ${srcdir}/configure: configure.in VersionI.o: Version.c $(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c -backspace.o: fio.h -close.o: fio.h +backspace.o: backspace.c fio.h +close.o: close.c fio.h dfe.o: fio.h -dfe.o: fmt.h -due.o: fio.h -endfile.o: fio.h rawio.h -err.o: fio.h rawio.h +dfe.o: dfe.c fmt.h +dolio.o: dolio.c +due.o: due.c fio.h +endfile.o: endfile.c fio.h rawio.h +err.o: err.c fio.h rawio.h fmt.o: fio.h -fmt.o: fmt.h -ftell_.o: fio.h +fmt.o: fmt.c fmt.h +fmtlib.o: fmtlib.c +ftell_.o: ftell_.c fio.h iio.o: fio.h -iio.o: fmt.h +iio.o: iio.c fmt.h ilnw.o: fio.h -ilnw.o: lio.h -inquire.o: fio.h +ilnw.o: ilnw.c lio.h +inquire.o: inquire.c fio.h lread.o: fio.h lread.o: fmt.h lread.o: lio.h -lread.o: fp.h +lread.o: lread.c fp.h lwrite.o: fio.h lwrite.o: fmt.h -lwrite.o: lio.h -open.o: fio.h rawio.h +lwrite.o: lwrite.c lio.h +open.o: open.c fio.h rawio.h rdfmt.o: fio.h rdfmt.o: fmt.h -rdfmt.o: fp.h -rewind.o: fio.h +rdfmt.o: rdfmt.c fp.h +rewind.o: rewind.c fio.h rsfe.o: fio.h -rsfe.o: fmt.h +rsfe.o: rsfe.c fmt.h rsli.o: fio.h -rsli.o: lio.h +rsli.o: rsli.c lio.h rsne.o: fio.h -rsne.o: lio.h -sfe.o: fio.h -sue.o: fio.h -uio.o: fio.h -util.o: fio.h +rsne.o: rsne.c lio.h +sfe.o: sfe.c fio.h +sue.o: sue.c fio.h +typesize.o: typesize.c +uio.o: uio.c fio.h +util.o: util.c fio.h wref.o: fio.h wref.o: fmt.h -wref.o: fp.h +wref.o: wref.c fp.h wrtfmt.o: fio.h -wrtfmt.o: fmt.h +wrtfmt.o: wrtfmt.c fmt.h wsfe.o: fio.h -wsfe.o: fmt.h +wsfe.o: wsfe.c fmt.h wsle.o: fio.h wsle.o: fmt.h -wsle.o: lio.h +wsle.o: wsle.c lio.h wsne.o: fio.h -wsne.o: lio.h +wsne.o: wsne.c lio.h xwsne.o: fio.h xwsne.o: lio.h -xwsne.o: fmt.h +xwsne.o: xwsne.c fmt.h # May be pessimistic: $(OBJ): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h @@ -146,7 +149,7 @@ mostlyclean: rm -f *.o clean: mostlyclean - rm -f config.log + rm -f config.log ../s-libi77 distclean: clean rm -f config.cache config.status Makefile ../s-libi77 configure diff --git a/contrib/libf2c/libI77/Version.c b/contrib/libf2c/libI77/Version.c index 1a5acc2..a056dff 100644 --- a/contrib/libf2c/libI77/Version.c +++ b/contrib/libf2c/libI77/Version.c @@ -1,9 +1,9 @@ -static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19980617\n"; +static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19990503\n"; /* */ -char __G77_LIBI77_VERSION__[] = "0.5.24-19981021"; +char __G77_LIBI77_VERSION__[] = "0.5.25 19990816 (release)"; /* 2.01 $ format added @@ -293,6 +293,14 @@ wrtfmt.c: floating-point numbers (containing either a decimal point or an exponent field) as errors when they appear as list input for integer data. */ +/* 7 Sept. 1998: move e_wdfe from sfe.c to dfe.c, where it was originally. + Why did it ever move to sfe.c? */ +/* 2 May 1999: open.c: set f__external (to get "external" versus "internal" + right in the error message if we cannot open the file). + err.c: cast a pointer difference to (int) for %d. + rdfmt.c: omit fixed-length buffer that could be overwritten + by formats Inn or Lnn with nn > 83. */ +/* 3 May 1999: open.c: insert two casts for machines with 64-bit longs. */ diff --git a/contrib/libf2c/libI77/backspace.c b/contrib/libf2c/libI77/backspace.c index 1da686d..eca1708 100644 --- a/contrib/libf2c/libI77/backspace.c +++ b/contrib/libf2c/libI77/backspace.c @@ -27,6 +27,7 @@ integer f_back(alist *a) } if(b->uwrt) { (void) t_runc(a); + f = b->ufd; /* t_runc might change b->ufd */ if (f__nowreading(b)) err(a->aerr,errno,"backspace"); } diff --git a/contrib/libf2c/libI77/configure b/contrib/libf2c/libI77/configure index 79e566e..69868c5 100755 --- a/contrib/libf2c/libI77/configure +++ b/contrib/libf2c/libI77/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12.1 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -333,7 +333,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12.1" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -503,9 +503,11 @@ ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -525,15 +527,16 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:529: checking for $ac_word" >&5 +echo "configure:531: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -554,16 +557,17 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:558: checking for $ac_word" >&5 +echo "configure:561: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -598,25 +602,61 @@ else echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:612: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:606: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:644: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross -cat > conftest.$ac_ext <<EOF -#line 616 "configure" +cat > conftest.$ac_ext << EOF + +#line 655 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -630,18 +670,24 @@ else ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:640: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:645: checking whether we are using GNU C" >&5 +echo "configure:691: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -650,7 +696,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -661,11 +707,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:669: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:719: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -680,23 +730,27 @@ rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi test "$AR" || AR=ar echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:754: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -726,7 +780,7 @@ fi # Sanity check for the cross-compilation case: echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:730: checking how to run the C preprocessor" >&5 +echo "configure:784: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -741,14 +795,14 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 745 "configure" +#line 799 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -758,14 +812,31 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 762 "configure" +#line 816 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +#line 833 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -778,6 +849,8 @@ fi rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -788,18 +861,18 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for stdio.h""... $ac_c" 1>&6 -echo "configure:792: checking for stdio.h" >&5 +echo "configure:865: checking for stdio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 797 "configure" +#line 870 "configure" #include "confdefs.h" #include <stdio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -826,12 +899,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:830: checking for ANSI C header files" >&5 +echo "configure:903: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 835 "configure" +#line 908 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -839,8 +912,8 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes @@ -856,7 +929,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 860 "configure" +#line 933 "configure" #include "confdefs.h" #include <string.h> EOF @@ -874,7 +947,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 878 "configure" +#line 951 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -895,7 +968,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 899 "configure" +#line 972 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -906,7 +979,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -931,12 +1004,12 @@ fi echo $ac_n "checking for posix""... $ac_c" 1>&6 -echo "configure:935: checking for posix" >&5 +echo "configure:1008: checking for posix" >&5 if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 940 "configure" +#line 1013 "configure" #include "confdefs.h" #include <sys/types.h> #include <unistd.h> @@ -962,12 +1035,12 @@ echo "$ac_t""$g77_cv_header_posix" 1>&6 # We can rely on the GNU library being posix-ish. I guess checking the # header isn't actually like checking the functions, though... echo $ac_n "checking for GNU library""... $ac_c" 1>&6 -echo "configure:966: checking for GNU library" >&5 +echo "configure:1039: checking for GNU library" >&5 if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 971 "configure" +#line 1044 "configure" #include "confdefs.h" #include <stdio.h> #ifdef __GNU_LIBRARY__ @@ -991,12 +1064,12 @@ echo "$ac_t""$g77_cv_lib_gnu" 1>&6 # Apparently cygwin needs to be special-cased. echo $ac_n "checking for cyg\`win'32""... $ac_c" 1>&6 -echo "configure:995: checking for cyg\`win'32" >&5 +echo "configure:1068: checking for cyg\`win'32" >&5 if eval "test \"`echo '$''{'g77_cv_sys_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1000 "configure" +#line 1073 "configure" #include "confdefs.h" #ifdef __CYGWIN32__ yes @@ -1019,12 +1092,12 @@ echo "$ac_t""$g77_cv_sys_cygwin32" 1>&6 # ditto for mingw32. echo $ac_n "checking for mingw32""... $ac_c" 1>&6 -echo "configure:1023: checking for mingw32" >&5 +echo "configure:1096: checking for mingw32" >&5 if eval "test \"`echo '$''{'g77_cv_sys_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1028 "configure" +#line 1101 "configure" #include "confdefs.h" #ifdef __MINGW32__ yes @@ -1048,18 +1121,18 @@ echo "$ac_t""$g77_cv_sys_mingw32" 1>&6 ac_safe=`echo "fcntl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for fcntl.h""... $ac_c" 1>&6 -echo "configure:1052: checking for fcntl.h" >&5 +echo "configure:1125: checking for fcntl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1057 "configure" +#line 1130 "configure" #include "confdefs.h" #include <fcntl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -1091,12 +1164,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1095: checking for working const" >&5 +echo "configure:1168: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1100 "configure" +#line 1173 "configure" #include "confdefs.h" int main() { @@ -1145,7 +1218,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:1149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1166,12 +1239,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1170: checking for size_t" >&5 +echo "configure:1243: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1175 "configure" +#line 1248 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1180,7 +1253,7 @@ else #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else @@ -1204,12 +1277,12 @@ fi # Apparently positive result on cygwin loses re. NON_UNIX_STDIO # (as of cygwin b18). Likewise on mingw. echo $ac_n "checking for fstat""... $ac_c" 1>&6 -echo "configure:1208: checking for fstat" >&5 +echo "configure:1281: checking for fstat" >&5 if eval "test \"`echo '$''{'ac_cv_func_fstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1213 "configure" +#line 1286 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char fstat(); below. */ @@ -1232,7 +1305,7 @@ fstat(); ; return 0; } EOF -if { (eval echo configure:1236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_fstat=yes" else @@ -1252,7 +1325,7 @@ else fi echo $ac_n "checking need for NON_UNIX_STDIO""... $ac_c" 1>&6 -echo "configure:1256: checking need for NON_UNIX_STDIO" >&5 +echo "configure:1329: checking need for NON_UNIX_STDIO" >&5 if test $g77_cv_sys_cygwin32 = yes \ || test $g77_cv_sys_mingw32 = yes \ || test $ac_cv_func_fstat = no; then @@ -1268,12 +1341,12 @@ fi for ac_func in tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1272: checking for $ac_func" >&5 +echo "configure:1345: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1277 "configure" +#line 1350 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1296,7 +1369,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1326,19 +1399,19 @@ done # However, on my sunos4/gcc setup unistd.h leads us wrongly to believe # we're posix-conformant, so always do the test. echo $ac_n "checking for ansi/posix sprintf result""... $ac_c" 1>&6 -echo "configure:1330: checking for ansi/posix sprintf result" >&5 +echo "configure:1403: checking for ansi/posix sprintf result" >&5 if test "$cross_compiling" = yes; then g77_cv_sys_sprintf_ansi=no else cat > conftest.$ac_ext <<EOF -#line 1335 "configure" +#line 1408 "configure" #include "confdefs.h" #include <stdio.h> /* does sprintf return the number of chars transferred? */ main () {char foo[2]; (sprintf(foo, "1") == 1) ? exit(0) : exit(1);} EOF -if { (eval echo configure:1342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then g77_cv_sys_sprintf_ansi=yes else @@ -1369,9 +1442,9 @@ fi # define NON_ANSI_RW_MODES on unix (can't hurt) echo $ac_n "checking NON_ANSI_RW_MODES""... $ac_c" 1>&6 -echo "configure:1373: checking NON_ANSI_RW_MODES" >&5 +echo "configure:1446: checking NON_ANSI_RW_MODES" >&5 cat > conftest.$ac_ext <<EOF -#line 1375 "configure" +#line 1448 "configure" #include "confdefs.h" #ifdef unix yes @@ -1443,7 +1516,7 @@ EOF # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1 | grep ac_space` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -1522,7 +1595,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12.1" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1545,6 +1618,7 @@ s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g diff --git a/contrib/libf2c/libI77/configure.in b/contrib/libf2c/libI77/configure.in index e5fc32d..2b34830 100644 --- a/contrib/libf2c/libI77/configure.in +++ b/contrib/libf2c/libI77/configure.in @@ -19,6 +19,7 @@ #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #02111-1307, USA. +AC_PREREQ(2.12.1) AC_INIT(ftell_.c) dnl Checks for programs. diff --git a/contrib/libf2c/libI77/dfe.c b/contrib/libf2c/libI77/dfe.c index f8c1fc1..f639ab5 100644 --- a/contrib/libf2c/libI77/dfe.c +++ b/contrib/libf2c/libI77/dfe.c @@ -81,7 +81,7 @@ c_dfe(cilist *a) f__fmtbuf=a->cifmt; if(a->cirec <= 0) err(a->cierr,130,"dfe"); - fseek(f__cf,(long)f__curunit->url * (a->cirec-1),SEEK_SET); + (void) fseek(f__cf,(long)f__curunit->url * (a->cirec-1),SEEK_SET); f__curunit->uend = 0; return(0); } @@ -138,3 +138,9 @@ integer e_rdfe(Void) en_fio(); return(0); } + +integer e_wdfe(Void) +{ + f__init = 1; + return en_fio(); +} diff --git a/contrib/libf2c/libI77/endfile.c b/contrib/libf2c/libI77/endfile.c index 0b785a9..0e4ac03 100644 --- a/contrib/libf2c/libI77/endfile.c +++ b/contrib/libf2c/libI77/endfile.c @@ -87,7 +87,9 @@ t_runc(alist *a) } if (!(bf = fopen(b->ufnm, f__r_mode[0])) || !(tf = tmpfile())) { +#ifdef NON_UNIX_STDIO bad: +#endif rc = 1; goto done; } diff --git a/contrib/libf2c/libI77/err.c b/contrib/libf2c/libI77/err.c index 56d82ac..e7ac23a 100644 --- a/contrib/libf2c/libI77/err.c +++ b/contrib/libf2c/libI77/err.c @@ -163,7 +163,8 @@ f__fatal(int n, char *s) dead = 1; if (f__init & 1) { if (f__curunit) { - fprintf(stderr,"apparent state: unit %d ",f__curunit-f__units); + fprintf(stderr,"apparent state: unit %d ", + (int)(f__curunit-f__units)); fprintf(stderr, f__curunit->ufnm ? "named %s\n" : "(unnamed)\n", f__curunit->ufnm); } diff --git a/contrib/libf2c/libI77/lread.c b/contrib/libf2c/libI77/lread.c index 24b621d..3d40059 100644 --- a/contrib/libf2c/libI77/lread.c +++ b/contrib/libf2c/libI77/lread.c @@ -24,14 +24,17 @@ int (*f__lioproc)(), (*l_getc)(), (*l_ungetc)(); #undef min #undef max #include <stdlib.h> -int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint), (*l_getc)(void), - (*l_ungetc)(int,FILE*); #endif #include "fmt.h" #include "lio.h" #include "fp.h" +#ifndef KR_headers +int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint), (*l_getc)(void), + (*l_ungetc)(int,FILE*); +#endif + int l_eof; #define isblnk(x) (f__ltab[x+1]&B) diff --git a/contrib/libf2c/libI77/open.c b/contrib/libf2c/libI77/open.c index 7c8f3de..3e4c8bc 100644 --- a/contrib/libf2c/libI77/open.c +++ b/contrib/libf2c/libI77/open.c @@ -141,6 +141,7 @@ integer f_open(olist *a) int n; #endif if(f__init != 1) f_init(); + f__external = 1; if(a->ounit>=MXUNIT || a->ounit<0) err(a->oerr,101,"open"); f__curunit = b = &f__units[a->ounit]; @@ -186,7 +187,7 @@ integer f_open(olist *a) opnerr(a->oerr,107,"open"); } else - sprintf(buf, "fort.%ld", a->ounit); + sprintf(buf, "fort.%ld", (long)a->ounit); b->uscrtch = 0; b->uend=0; b->uwrt = 0; @@ -280,7 +281,7 @@ fk_open(int seq, int fmt, ftnint n) int rtn; int save_init; - (void) sprintf(nbuf,"fort.%ld",n); + (void) sprintf(nbuf,"fort.%ld",(long)n); a.oerr=1; a.ounit=n; a.ofnm=nbuf; diff --git a/contrib/libf2c/libI77/rdfmt.c b/contrib/libf2c/libI77/rdfmt.c index b03bcc5..08ff0e8 100644 --- a/contrib/libf2c/libI77/rdfmt.c +++ b/contrib/libf2c/libI77/rdfmt.c @@ -99,60 +99,125 @@ rd_I(n,w,len, base) Uint *n; int w; ftnlen len; register int base; #else rd_I(Uint *n, int w, ftnlen len, register int base) #endif -{ longint x; - int sign,ch; - char s[84], *ps; - ps=s; x=0; - while (w) - { +{ + int bad, ch, sign; + longint x = 0; + + if (w <= 0) + goto have_x; + for(;;) { GET(ch); - if (ch==',' || ch=='\n') break; - *ps=ch; ps++; w--; - } - *ps='\0'; - ps=s; - while (*ps==' ') ps++; - if (*ps=='-') { sign=1; ps++; } - else { sign=0; if (*ps=='+') ps++; } -loop: while (*ps>='0' && *ps<='9') { x=x*base+(*ps-'0'); ps++; } - if (*ps==' ') {if (f__cblank) x *= base; ps++; goto loop;} - if(sign) x = -x; - if(len==sizeof(integer)) n->il=x; - else if(len == sizeof(char)) n->ic = (char)x; + if (ch != ' ') + break; + if (!--w) + goto have_x; + } + sign = 0; + switch(ch) { + case ',': + case '\n': + w = 0; + goto have_x; + case '-': + sign = 1; + case '+': + break; + default: + if (ch >= '0' && ch <= '9') { + x = ch - '0'; + break; + } + goto have_x; + } + while(--w) { + GET(ch); + if (ch >= '0' && ch <= '9') { + x = x*base + ch - '0'; + continue; + } + if (ch != ' ') { + if (ch == '\n' || ch == ',') + w = 0; + break; + } + if (f__cblank) + x *= base; + } + if (sign) + x = -x; + have_x: + if(len == sizeof(integer)) + n->il=x; + else if(len == sizeof(char)) + n->ic = (char)x; #ifdef Allow_TYQUAD - else if (len == sizeof(longint)) n->ili = x; + else if (len == sizeof(longint)) + n->ili = x; #endif - else n->is = (short)x; - if (*ps) return(errno=115); else return(0); + else + n->is = (short)x; + if (w) { + while(--w) + GET(ch); + return errno = 115; + } + return 0; } + static int #ifdef KR_headers rd_L(n,w,len) ftnint *n; ftnlen len; #else rd_L(ftnint *n, int w, ftnlen len) #endif -{ int ch, lv; - char s[84], *ps; - ps=s; - while (w) { +{ int ch, dot, lv; + + if (w <= 0) + goto bad; + for(;;) { GET(ch); - if (ch==','||ch=='\n') break; - *ps=ch; - ps++; w--; + --w; + if (ch != ' ') + break; + if (!w) + goto bad; } - *ps='\0'; - ps=s; while (*ps==' ') ps++; - if (*ps=='.') ps++; - if (*ps=='t' || *ps == 'T') + dot = 0; + retry: + switch(ch) { + case '.': + if (dot++ || !w) + goto bad; + GET(ch); + --w; + goto retry; + case 't': + case 'T': lv = 1; - else if (*ps == 'f' || *ps == 'F') + break; + case 'f': + case 'F': lv = 0; - else return(errno=116); + break; + default: + bad: + for(; w > 0; --w) + GET(ch); + /* no break */ + case ',': + case '\n': + return errno = 116; + } switch(len) { case sizeof(char): *(char *)n = (char)lv; break; case sizeof(short): *(short *)n = (short)lv; break; default: *n = lv; } + while(w-- > 0) { + GET(ch); + if (ch == ',' || ch == '\n') + break; + } return 0; } diff --git a/contrib/libf2c/libI77/rsne.c b/contrib/libf2c/libI77/rsne.c index 86bb216..c9d5f10 100644 --- a/contrib/libf2c/libI77/rsne.c +++ b/contrib/libf2c/libI77/rsne.c @@ -530,10 +530,10 @@ x_rsne(cilist *a) no1 = (ivae - iva)/size; if (no1 > f__lcount) no1 = f__lcount; - iva += no1 * dn0->delta; if (k = l_read(&no1, vaddr + iva, size, type)) return k; + iva += no1 * dn0->delta; } } mustend: diff --git a/contrib/libf2c/libI77/sfe.c b/contrib/libf2c/libI77/sfe.c index eb6260f..f7c3b83 100644 --- a/contrib/libf2c/libI77/sfe.c +++ b/contrib/libf2c/libI77/sfe.c @@ -32,9 +32,3 @@ integer e_wsfe(Void) f__fmtbuf=NULL; return n; } - -integer e_wdfe(Void) -{ - f__init = 1; - return en_fio(); -} |