diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-22 10:34:36 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-22 10:34:36 +0000 |
commit | 66dfc9df7e5ba710e0aa76855a7849b0b122b961 (patch) | |
tree | 6a950528e8524ebce873be51a0754db65eebe252 | |
parent | 55b1543e696f4e09237bb5a421b1020a8e1d4b1a (diff) |
Import 0.5.21 runtime -- needed for 0.5.22 merge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/g77-net-runtime@18755 138bc75d-0d04-0410-961f-82ee72b054a4
43 files changed, 345 insertions, 666 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index c6c0dd3f11e..57b175eaf6a 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,34 +1,3 @@ -Tue Sep 30 00:41:39 1997 Craig Burley <burley@gnu.ai.mit.edu> - - Do a better job of printing the offending FORMAT string - when producing a diagnostic: - * libI77/err.c (f__fmtlen): New variable to hold operating - length of format string. - (f__fatal): Use new variable to limit length of printed string. - * libI77/fmt.c (f_s): Don't skip spaces after closing paren, - so nicer message results (and nested case already skips them). - (pars_f): Record operating length of format string as indicated - by a successful call to f_s, or ad-hoc-calculate it if failure, - limiting the length to 80 characters (and stopping at NUL). - (do_fio): Use new variable to limit length of printed string. - * libI77/fmt.h (f__fmtlen): Declare new variable. - * libI77/lread.c (c_le): Set new variable to known length. - -Mon Sep 29 16:30:31 1997 Craig Burley <burley@gnu.ai.mit.edu> - - Update to Netlib version of 1997-09-23: - * libF77/dtime_.c (dtime_), libF77/etime_.c (dtime_): - Return `double' instead of `float' (these are not used - in g77's version of libf2c). - * libI77/fmt.c, libI77/fmt.h, libI77/rdfmt.c, libI77/wrtfmt.c: - Support machines with 64-bit pointers and 32-bit ints (e.g. - Linux on DEC Alpha). - -1997-09-19 Dave Love <d.love@dl.ac.uk> - - * libU77/dtime_.c (G77_dtime_0): Fix types in HAVE_GETRUSAGE case - so as not to truncate results to integer values. - Tue Sep 9 00:33:24 1997 Craig Burley <burley@gnu.ai.mit.edu> * Version 0.5.21 released. diff --git a/libf2c/Makefile.in b/libf2c/Makefile.in index 709a71866c4..e923c06f266 100644 --- a/libf2c/Makefile.in +++ b/libf2c/Makefile.in @@ -19,65 +19,59 @@ #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #02111-1307, USA. -SHELL = /bin/sh - #### Start of system configuration section. #### +# $(srcdir) must be set to the g77 runtime source directory +# (g77/f/runtime/). + srcdir = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ +VPATH = @srcdir@ -bindir = $(exec_prefix)/bin -libdir = $(exec_prefix)/lib -datadir = $(prefix)/lib -mandir = $(prefix)/man -infodir = $(prefix)/info -includedir = $(prefix)/include -docdir = $(datadir)/doc +top_srcdir = @top_srcdir@ + +INSTALL = @INSTALL@ # installs aren't actually done from here +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +RANLIB = @RANLIB@ +RANLIB_TEST = @RANLIB_TEST@ -TO_TOPDIR = .. +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ @DEFS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +CGFLAGS = -g0 -INSTALL = $(srcdir)/$(TO_TOPDIR)/install-sh -c -INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) +GCC_FOR_TARGET = @CC@ +CC = $(GCC_FOR_TARGET) -AR = `if test -f $(TO_TOPDIR)/binutils/ar; then \ - echo $(TO_TOPDIR)/binutils/ar; else echo ar; fi` +CROSS = @CROSS@ + +objext = .o + +transform=@program_transform_name@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +AR = ar AR_FLAGS = rc -RANLIB = `if test -f $(TO_TOPDIR)/binutils/ranlib; then \ - echo $(TO_TOPDIR)/binutils/ranlib; else echo ranlib; fi` +# Directory in which to install scripts. +bindir = $(exec_prefix)/bin -MAKEINFO = `if test -f $(TO_TOPDIR)/texinfo/C/makeinfo; then \ - echo $(TO_TOPDIR)/texinfo/C/makeinfo; else echo makeinfo; fi` +# Directory in which to install library files. +libdir = $(prefix)/lib -CC = gcc -CFLAGS = -g -LIBCFLAGS = $(CFLAGS) +# Directory in which to install documentation info files. +infodir = $(prefix)/info -# List of variables to pass to sub-makes. This should not be needed' -# by GNU make or Sun make (both of which pass command-line variable' -# overrides thouh $(MAKE)) but may be needed by older versions.' +#### End of system configuration section. #### -FLAGS_TO_PASS= \ - "SHELL=$(SHELL)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "prefix=$(prefix)" \ - "exec_prefix=$(exec_prefix)" \ - "tooldir=$(tooldir)" \ - "AR=$(AR)" \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC=$(CC)" \ - "CFLAGS=$(CFLAGS)" \ - "RANLIB=$(RANLIB)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" +SHELL = /bin/sh +lib = ../../libf2c.a -lib = libf2c.a +SUBDIRS = libI77 libF77 libU77 MISC = libF77/F77_aloc.o libF77/VersionF.o libF77/main.o libF77/s_rnge.o \ libF77/abort_.o libF77/getarg_.o libF77/iargc_.o libF77/getenv_.o \ @@ -137,7 +131,7 @@ UOBJ = libU77/VersionU.o libU77/gerror_.o libU77/perror_.o libU77/ierrno_.o \ libU77/vxtidate_.o libU77/gmtime_.o libU77/fdate_.o libU77/secnds_.o \ libU77/bes.o libU77/dbes.o libU77/chdir_.o libU77/chmod_.o \ libU77/lnblnk_.o libU77/hostnm_.o libU77/rename_.o libU77/fgetc_.o \ - libU77/fputc_.o libU77/umask_.o libU77/sys_clock_.o libU77/date_.o \ + libU77/fputc_.o libU77/umask_.o libU77/system_clock_.o libU77/date_.o \ libU77/second_.o libU77/flush1_.o libU77/alarm_.o libU77/mclock_.o \ libU77/symlnk_.o @@ -150,79 +144,110 @@ F2CEXT = abort derf derfc ef1asc ef1cmc erf erfc exit getarg getenv iargc \ secnds second sleep srand stat symlnk sclock time ttynam umask unlink \ vxtidt vxttim alarm -all: f2c.h $(lib) - -$(lib): stamp-libf77 stamp-libi77 stamp-libu77 stamp-libe77 - rm -f $(lib) - $(AR) $(AR_FLAGS) $(lib) $(FOBJ) $(IOBJ) $(UOBJ) $(F2CEXT:%=libE77/L%.o) - $(RANLIB) $(lib) - -stamp-libi77: libI77/Makefile - rm -f stamp-libi77 - cd libI77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all - touch stamp-libi77 - -stamp-libf77: libF77/Makefile - rm -f stamp-libf77 - cd libF77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all - touch stamp-libf77 - -stamp-libu77: libU77/Makefile - rm -f stamp-libu77 - cd libU77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all - touch stamp-libu77 - -stamp-libe77: $(srcdir)/f2cext.c +# flags_to_pass to recursive makes & configure (hence the quoting style) +FLAGS_TO_PASS = \ + CROSS="$(CROSS)" \ + AR_FLAGS="$(AR_FLAGS)" \ + AR="$(AR)" \ + GCCFLAGS="$(GCCFLAGS)" \ + GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ + CC="$(GCC_FOR_TARGET)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + RANLIB_TEST="$(RANLIB_TEST)" \ + SHELL="$(SHELL)" + +CROSS_FLAGS_TO_PASS = \ + CROSS="$(CROSS)" \ + AR_FLAGS="$(AR_FLAGS)" \ + AR="$(AR)" \ + GCCFLAGS="$(GCCFLAGS)" \ + GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ + CC="$(GCC_FOR_TARGET)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + RANLIB_TEST="$(RANLIB_TEST)" \ + SHELL="$(SHELL)" + +all: ../../include/f2c.h libi77 libf77 libu77 $(lib) + +$(lib): stamp-lib ; @true +stamp-lib: $(FOBJ) $(IOBJ) $(UOBJ) + rm -f stamp-lib + $(AR) $(AR_FLAGS) $(lib) $? rm -fr libE77 mkdir libE77 for name in $(F2CEXT); \ do \ echo $${name}; \ - $(CC) -c -I. -I$(srcdir) -I../../include $(CPPFLAGS) $(CFLAGS) \ - $(CGFLAGS) -DL$${name} $(srcdir)/f2cext.c \ - -o libE77/L$${name}.o; \ + $(GCC_FOR_TARGET) -c -I. -I$(srcdir) -I../../include $(CPPFLAGS) $(CFLAGS) $(CGFLAGS) \ + -DL$${name} $(srcdir)/f2cext.c -o libE77/L$${name}$(objext); \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ done - touch stamp-libe77 + $(AR) $(AR_FLAGS) $(lib) libE77/*$(object) + rm -fr libE77 + if $(RANLIB_TEST); then $(RANLIB) $(lib); \ + else true; fi + touch stamp-lib + +libi77: libI77/Makefile + if test "$(CROSS)"; then \ + cd libI77; $(MAKE) -f Makefile $(CROSS_FLAGS_TO_PASS) all ; \ + else \ + cd libI77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all ; \ + fi + +libf77: libF77/Makefile + if test "$(CROSS)"; then \ + cd libF77; $(MAKE) -f Makefile $(CROSS_FLAGS_TO_PASS) all ; \ + else \ + cd libF77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all ; \ + fi + +libu77: libU77/Makefile + if test "$(CROSS)"; then \ + cd libU77; $(MAKE) -f Makefile $(CROSS_FLAGS_TO_PASS) all ; \ + else \ + cd libU77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all ; \ + fi ${srcdir}/configure: ${srcdir}/configure.in rm -f config.cache && cd ${srcdir} && autoconf && rm -f config.cache ${srcdir}/libU77/configure: ${srcdir}/libU77/configure.in rm -f libU77/config.cache && cd ${srcdir}/libU77 && autoconf && rm -f config.cache - -f2c.h: $(srcdir)/f2c.h.in - -install: - $(INSTALL_DATA) $(lib) $(libdir)/$(lib).n - ( cd $(libdir) ; $(RANLIB) $(lib).n ) - mv -f $(libdir)/$(lib).n $(libdir)/$(lib) - $(INSTALL_DATA) f2c.h $(includedir)/f2c.h +#../include/f2c.h libI77/Makefile libF77/Makefile libU77/Makefile Makefile: ${srcdir}/Makefile.in \ +# config.status libU77/config.status +# $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status +# cd libU77; $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status + +# Extra dependencies for the targets above: +libI77/Makefile: $(srcdir)/libI77/Makefile.in +libF77/Makefile: $(srcdir)/libF77/Makefile.in +libU77/Makefile: $(srcdir)/libU77/Makefile.in +../../include/f2c.h: $(srcdir)/f2c.h.in + +#config.status: ${srcdir}/configure +# $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status --recheck +#libU77/config.status: ${srcdir}/libU77/configure +# cd libU77; $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status --recheck mostlyclean: - -rm -f stamp-* - for i in libI77 libF77 libU77; do \ - if [ -f $$i/Makefile ]; then \ - cd $$i; $(MAKE) -f Makefile mostlyclean; cd ..; \ - fi; \ - done - rm -fr libE77 + for i in libI77 libF77 libU77; do cd $$i; $(MAKE) -f Makefile mostlyclean; cd ..; done clean: - -rm -f config.log stamp-* - for i in libI77 libF77 libU77; do \ - if [ -f $$i/Makefile ]; then \ - cd $$i; $(MAKE) -f Makefile clean; cd ..; \ - fi; \ - done - rm -fr libE77 + -rm -f config.log config.cache + for i in libI77 libF77 libU77; do cd $$i; $(MAKE) -f Makefile clean; cd ..; done distclean: clean - -rm -f Makefile config.cache lib?77/Makefile config.status lib?77/config.status lib?77/config.cache lib?77/config.h f2c.h + -rm -f Makefile lib?77/Makefile config.status libU77/config.status ../../include/f2c.h maintainer-clean: distclean -rm -f $(srcdir)/configure $(srcdir)/libU77/configure +uninstall: + rm ../../include/f2c.h + rebuilt: ${srcdir}/configure ${srcdir}/libU77/configure -.PHONY: libf77 libi77 libu77 rebuilt mostlyclean clean distclean \ - maintainer-clean all +.PHONY: libf77 libi77 libu77 rebuilt mostlyclean clean distclean maintainer-clean \ + uninstall all diff --git a/libf2c/changes.netlib b/libf2c/changes.netlib index 78dba8653ba..1827154b591 100644 --- a/libf2c/changes.netlib +++ b/libf2c/changes.netlib @@ -2836,15 +2836,6 @@ with F8X_NML_ELIDE_QUOTES #defined. wrtfmt.o: wrt_G: tweak to print the right number of 0's for zero under G format. Sat Aug 16 05:45:32 EDT 1997 - libi77: iio.c: fix bug in internal writes to an array of character + libI77: iio.c: fix bug in internal writes to an array of character strings that sometimes caused one more array element than required by the format to be blank-filled. Example: format(1x). - -Wed Sep 17 00:39:29 EDT 1997 - libi77: fmt.[ch] rdfmt.c wrtfmt.c: tweak struct syl for machines -with 64-bit pointers and 32-bit ints that did not 64-bit align -struct syl (e.g., Linux on the DEC Alpha). This change should be -invisible on other machines. - -Sun Sep 21 22:05:19 EDT 1997 - libf77: [de]time_.c (Unix systems only): change return type to double. diff --git a/libf2c/configure b/libf2c/configure index 1dc6f4cde3c..9d7b6f5069f 100755 --- a/libf2c/configure +++ b/libf2c/configure @@ -1036,48 +1036,19 @@ fi echo "$ac_t""$g77_cv_sys_cygwin32" 1>&6 -# ditto for mingw32. -echo $ac_n "checking for mingw32""... $ac_c" 1>&6 -echo "configure:1042: 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 1047 "configure" -#include "confdefs.h" -#ifdef __MINGW32__ - yes -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - g77_cv_sys_mingw32=yes -else - rm -rf conftest* - g77_cv_sys_mingw32=no -fi -rm -f conftest* - -fi - -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:1071: checking for fcntl.h" >&5 +echo "configure:1042: 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 1076 "configure" +#line 1047 "configure" #include "confdefs.h" #include <fcntl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1110,12 +1081,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1114: checking for working const" >&5 +echo "configure:1085: 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 1119 "configure" +#line 1090 "configure" #include "confdefs.h" int main() { @@ -1164,7 +1135,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:1168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1185,12 +1156,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1189: checking for size_t" >&5 +echo "configure:1160: 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 1194 "configure" +#line 1165 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1219,12 +1190,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1223: checking return type of signal handlers" >&5 +echo "configure:1194: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1228 "configure" +#line 1199 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -1241,7 +1212,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1262,12 +1233,12 @@ EOF # we'll get atexit by default if test $ac_cv_header_stdc != yes; then echo $ac_n "checking for atexit""... $ac_c" 1>&6 -echo "configure:1266: checking for atexit" >&5 +echo "configure:1237: checking for atexit" >&5 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1271 "configure" +#line 1242 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char atexit(); below. */ @@ -1290,7 +1261,7 @@ atexit(); ; return 0; } EOF -if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_atexit=yes" else @@ -1315,12 +1286,12 @@ else EOF echo $ac_n "checking for onexit""... $ac_c" 1>&6 -echo "configure:1319: checking for onexit" >&5 +echo "configure:1290: checking for onexit" >&5 if eval "test \"`echo '$''{'ac_cv_func_onexit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1324 "configure" +#line 1295 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char onexit(); below. */ @@ -1343,7 +1314,7 @@ onexit(); ; return 0; } EOF -if { (eval echo configure:1347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_onexit=yes" else @@ -1361,12 +1332,12 @@ if eval "test \"`echo '$ac_cv_func_'onexit`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for on_exit""... $ac_c" 1>&6 -echo "configure:1365: checking for on_exit" >&5 +echo "configure:1336: checking for on_exit" >&5 if eval "test \"`echo '$''{'ac_cv_func_on_exit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1370 "configure" +#line 1341 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char on_exit(); below. */ @@ -1389,7 +1360,7 @@ on_exit(); ; return 0; } EOF -if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_on_exit=yes" else @@ -1420,14 +1391,14 @@ fi # This should always succeed on unix. # Apparently positive result on cygwin loses re. NON_UNIX_STDIO -# (as of cygwin b18). Likewise on mingw. +# (as of cygwin b18). echo $ac_n "checking for fstat""... $ac_c" 1>&6 -echo "configure:1426: checking for fstat" >&5 +echo "configure:1397: 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 1431 "configure" +#line 1402 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char fstat(); below. */ @@ -1450,7 +1421,7 @@ fstat(); ; return 0; } EOF -if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_fstat=yes" else @@ -1470,10 +1441,8 @@ else fi echo $ac_n "checking need for NON_UNIX_STDIO""... $ac_c" 1>&6 -echo "configure:1474: 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 +echo "configure:1445: checking need for NON_UNIX_STDIO" >&5 +if test $g77_cv_sys_cygwin32 = yes || test $ac_cv_func_fstat = no; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define NON_UNIX_STDIO 1 @@ -1485,19 +1454,19 @@ fi # This is necessary for e.g. Linux: echo $ac_n "checking for necessary members of struct FILE""... $ac_c" 1>&6 -echo "configure:1489: checking for necessary members of struct FILE" >&5 +echo "configure:1458: checking for necessary members of struct FILE" >&5 if eval "test \"`echo '$''{'g77_cv_struct_FILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1494 "configure" +#line 1463 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE s; s._ptr; s._base; s._flag; ; return 0; } EOF -if { (eval echo configure:1501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* g77_cv_struct_FILE=yes else @@ -1517,7 +1486,7 @@ EOF fi echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6 -echo "configure:1521: checking for drem in -lm" >&5 +echo "configure:1490: checking for drem in -lm" >&5 ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1525,7 +1494,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 1529 "configure" +#line 1498 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1536,7 +1505,7 @@ int main() { drem() ; return 0; } EOF -if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1566,19 +1535,19 @@ fi # 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:1570: checking for ansi/posix sprintf result" >&5 +echo "configure:1539: 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 1575 "configure" +#line 1544 "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:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then g77_cv_sys_sprintf_ansi=yes else @@ -1612,9 +1581,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:1616: checking NON_ANSI_RW_MODES" >&5 +echo "configure:1585: checking NON_ANSI_RW_MODES" >&5 cat > conftest.$ac_ext <<EOF -#line 1618 "configure" +#line 1587 "configure" #include "confdefs.h" #ifdef unix yes @@ -1637,7 +1606,7 @@ else fi rm -f conftest* -if test $g77_cv_sys_cygwin32 = yes || test $g77_cv_sys_mingw32 = yes; then +if test $g77_cv_sys_cygwin32 = yes; then echo "$ac_t""no" 1>&6 else if test $is_unix = yes; then @@ -1655,14 +1624,14 @@ fi # (via com.h). proj.h and com.h are in $srcdir/.., config.h which they need # is in ../.. and the config files are in $srcdir/../../config. echo $ac_n "checking f2c integer type""... $ac_c" 1>&6 -echo "configure:1659: checking f2c integer type" >&5 +echo "configure:1628: checking f2c integer type" >&5 late_ac_cpp=$ac_cpp ac_cpp="$late_ac_cpp -I$srcdir/.. -I../.. -I$srcdir/../.. -I$srcdir/../../config" if eval "test \"`echo '$''{'g77_cv_sys_f2cinteger'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1666 "configure" +#line 1635 "configure" #include "confdefs.h" #include "proj.h" #define FFECOM_DETERMINE_TYPES 1 @@ -1685,7 +1654,7 @@ rm -f conftest* if test "$g77_cv_sys_f2cinteger" = ""; then cat > conftest.$ac_ext <<EOF -#line 1689 "configure" +#line 1658 "configure" #include "confdefs.h" #include "proj.h" #define FFECOM_DETERMINE_TYPES 1 @@ -1720,14 +1689,14 @@ ac_cpp=$late_ac_cpp echo $ac_n "checking f2c long int type""... $ac_c" 1>&6 -echo "configure:1724: checking f2c long int type" >&5 +echo "configure:1693: checking f2c long int type" >&5 late_ac_cpp=$ac_cpp ac_cpp="$late_ac_cpp -I$srcdir/.. -I../.. -I$srcdir/../.. -I$srcdir/../../config" if eval "test \"`echo '$''{'g77_cv_sys_f2clongint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1731 "configure" +#line 1700 "configure" #include "confdefs.h" #include "proj.h" #define FFECOM_DETERMINE_TYPES 1 @@ -1750,7 +1719,7 @@ rm -f conftest* if test "$g77_cv_sys_f2clongint" = ""; then cat > conftest.$ac_ext <<EOF -#line 1754 "configure" +#line 1723 "configure" #include "confdefs.h" #include "proj.h" #define FFECOM_DETERMINE_TYPES 1 @@ -1821,27 +1790,6 @@ test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -subdirs="libU77" - trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -1954,7 +1902,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "Makefile f2c.h libI77/Makefile libF77/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile ../../include/f2c.h:f2c.h.in libI77/Makefile libF77/Makefile libU77/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -1992,7 +1940,6 @@ s%@CPP@%$CPP%g s%@F2C_INTEGER@%$F2C_INTEGER%g s%@F2C_LONGINT@%$F2C_LONGINT%g s%@CROSS@%$CROSS%g -s%@subdirs@%$subdirs%g CEOF EOF @@ -2034,7 +1981,7 @@ EOF cat >> $CONFIG_STATUS <<EOF -CONFIG_FILES=\${CONFIG_FILES-"Makefile f2c.h libI77/Makefile libF77/Makefile"} +CONFIG_FILES=\${CONFIG_FILES-"Makefile ../../include/f2c.h:f2c.h.in libI77/Makefile libF77/Makefile libU77/Makefile"} EOF cat >> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -2100,98 +2047,5 @@ chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in libU77; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure - else - echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - - # Make the cache file name correct relative to the subdirectory. - case "$cache_file" in - /*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac - - echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } - fi - fi - - cd $ac_popdir - done -fi - diff --git a/libf2c/configure.in b/libf2c/configure.in index 1c93ff32489..7b1ed2cd0f8 100644 --- a/libf2c/configure.in +++ b/libf2c/configure.in @@ -118,19 +118,6 @@ AC_CACHE_VAL(g77_cv_sys_cygwin32, g77_cv_sys_cygwin32=no)) AC_MSG_RESULT($g77_cv_sys_cygwin32) -# ditto for mingw32. -AC_MSG_CHECKING([for mingw32]) -AC_CACHE_VAL(g77_cv_sys_mingw32, - AC_EGREP_CPP(yes, - [#ifdef __MINGW32__ - yes -#endif -], - g77_cv_sys_mingw32=yes, - g77_cv_sys_mingw32=no)) -AC_MSG_RESULT($g77_cv_sys_mingw32) - - AC_CHECK_HEADER(fcntl.h, test $g77_cv_header_posix = yes && AC_DEFINE(_POSIX_SOURCE), AC_DEFINE(NO_FCNTL) AC_DEFINE(OPEN_DECL)) @@ -154,12 +141,10 @@ fi # This should always succeed on unix. # Apparently positive result on cygwin loses re. NON_UNIX_STDIO -# (as of cygwin b18). Likewise on mingw. +# (as of cygwin b18). AC_CHECK_FUNC(fstat) AC_MSG_CHECKING([need for NON_UNIX_STDIO]) -if test $g77_cv_sys_cygwin32 = yes \ - || test $g77_cv_sys_mingw32 = yes \ - || test $ac_cv_func_fstat = no; then +if test $g77_cv_sys_cygwin32 = yes || test $ac_cv_func_fstat = no; then AC_MSG_RESULT(yes) AC_DEFINE(NON_UNIX_STDIO) else @@ -230,7 +215,7 @@ AC_EGREP_CPP(yes, yes #endif ], is_unix=yes, is_unix=no) -if test $g77_cv_sys_cygwin32 = yes || test $g77_cv_sys_mingw32 = yes; then +if test $g77_cv_sys_cygwin32 = yes; then AC_MSG_RESULT(no) else if test $is_unix = yes; then @@ -374,8 +359,7 @@ test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori -AC_CONFIG_SUBDIRS(libU77) -AC_OUTPUT(Makefile f2c.h libI77/Makefile libF77/Makefile) +AC_OUTPUT(Makefile ../../include/f2c.h:f2c.h.in libI77/Makefile libF77/Makefile libU77/Makefile) dnl We might have configuration options to: dnl * allow non-standard string concatenation (use libF77 s_catow.o, diff --git a/libf2c/libF77/Makefile.in b/libf2c/libF77/Makefile.in index 266e22b72cf..208626cb4a0 100644 --- a/libf2c/libF77/Makefile.in +++ b/libf2c/libF77/Makefile.in @@ -1,7 +1,7 @@ # Makefile for GNU F77 compiler runtime. # Copyright 1990 - 1994 by AT&T Bell Laboratories and Bellcore (see the # file `Notice'). -# Portions of this file Copyright (C) 1995, 1996 Free Software Foundation, Inc. +# Portions of this file Copyright (C) 1995, 1996 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Fortran. @@ -28,9 +28,28 @@ VPATH = @srcdir@ #### Start of system configuration section. #### +# The _FOR_TARGET things are appropriate for a cross-make, passed by the +# superior makefile +GCC_FOR_TARGET = @CC@ +CC = $(GCC_FOR_TARGET) +CFLAGS = @CFLAGS@ $(GCC_FLAGS) +CPPFLAGS = @CPPFLAGS@ +DEFS = @DEFS@ +CGFLAGS = -g0 +# f2c.h should already be installed in xgcc's include directory but add that +# to -I anyhow in case not using xgcc. +ALL_CFLAGS = -I. -I$(srcdir) -I../../../include $(CPPFLAGS) $(DEFS) $(CFLAGS) +AR = @AR@ +AR_FLAGS = rc +RANLIB = @RANLIB@ +RANLIB_TEST = @RANLIB_TEST@ +CROSS = @CROSS@ + +.SUFFIXES: +.SUFFIXES: .c .o .c.o: - $(CC) -c -DSkip_f2c_Undefs -I../ $(CFLAGS) $< + $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $(CGFLAGS) $< MISC = F77_aloc.o VersionF.o main.o s_rnge.o abort_.o getarg_.o iargc_.o\ getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o\ @@ -55,13 +74,13 @@ EFL = ef1asc_.o ef1cmc_.o CHAR = s_cat.o s_cmp.o s_copy.o F90BIT = lbitbits.o lbitshft.o qbitbits.o qbitshft.o -F2C_H = ../f2c.h +F2C_H = ../../../include/f2c.h all: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \ $(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT) VersionF.o: Version.c - $(CC) -c $(CFLAGS) -o $@ $(srcdir)/Version.c + $(CC) -c $(CGFLAGS) -o $@ $(srcdir)/Version.c mostlyclean clean: -rm -f *.o diff --git a/libf2c/libF77/Version.c b/libf2c/libF77/Version.c index 7bb09729c47..8644f3f8187 100644 --- a/libf2c/libF77/Version.c +++ b/libf2c/libF77/Version.c @@ -1,4 +1,4 @@ -static char junk[] = "\n@(#)LIBF77 VERSION 19970919\n"; +static char junk[] = "\n@(#)LIBF77 VERSION 19970404\n"; /* */ @@ -53,8 +53,6 @@ char __G77_LIBF77_VERSION__[] = "0.5.21"; benefit of g77.) 4 April 1997: [cz]_div.c: tweaks invisible on most systems (that may affect systems using gratuitous extra precision). - 19 Sept. 1997: [de]time_.c (Unix systems only): change return - type to double. */ #include <stdio.h> diff --git a/libf2c/libF77/dtime_.c b/libf2c/libF77/dtime_.c index 79b6735b13b..2e775c6b84e 100644 --- a/libf2c/libF77/dtime_.c +++ b/libf2c/libF77/dtime_.c @@ -15,7 +15,7 @@ #endif #endif - double + float #ifdef KR_headers dtime_(tarray) float *tarray; #else diff --git a/libf2c/libF77/etime_.c b/libf2c/libF77/etime_.c index 04528b50bb8..0fb658af43c 100644 --- a/libf2c/libF77/etime_.c +++ b/libf2c/libF77/etime_.c @@ -15,7 +15,7 @@ #endif #endif - double + float #ifdef KR_headers etime_(tarray) float *tarray; #else diff --git a/libf2c/libF77/s_paus.c b/libf2c/libF77/s_paus.c index ee2a0ee6bf5..1317008cb73 100644 --- a/libf2c/libF77/s_paus.c +++ b/libf2c/libF77/s_paus.c @@ -60,7 +60,7 @@ s_paus(char *s, ftnlen n) if( isatty(fileno(stdin)) ) s_1paus(stdin); else { -#if (defined (MSDOS) && !defined (GO32)) || defined (_WIN32) +#if (defined (MSDOS) && !defined (GO32)) || defined(__CYGWIN32__) FILE *fin; fin = fopen("con", "r"); if (!fin) { diff --git a/libf2c/libI77/Makefile.in b/libf2c/libI77/Makefile.in index ec6f6970985..34bc5fa3997 100644 --- a/libf2c/libI77/Makefile.in +++ b/libf2c/libI77/Makefile.in @@ -1,7 +1,7 @@ # Makefile for GNU F77 compiler runtime. # Copyright 1990 - 1994 by AT&T Bell Laboratories and Bellcore (see the # file `Notice'). -# Portions of this file Copyright (C) 1995, 1996 Free Software Foundation, Inc. +# Portions of this file Copyright (C) 1995, 1996 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Fortran. @@ -28,18 +28,28 @@ VPATH = @srcdir@ #### Start of system configuration section. #### +# The _FOR_TARGET things are appropriate for a cross-make, passed by the +# superior makefile +GCC_FOR_TARGET = @CC@ +CC = $(GCC_FOR_TARGET) +CFLAGS = @CFLAGS@ $(GCC_FLAGS) CPPFLAGS = @CPPFLAGS@ DEFS = @DEFS@ +CGFLAGS = -g0 # f2c.h should already be installed in xgcc's include directory but add that # to -I anyhow in case not using xgcc. -ALL_CFLAGS = -I. -I$(srcdir) -I.. $(CPPFLAGS) $(DEFS) $(CFLAGS) +ALL_CFLAGS = -I. -I$(srcdir) -I../../../include $(CPPFLAGS) $(DEFS) $(CFLAGS) +AR = @AR@ +AR_FLAGS = rc +RANLIB = @RANLIB@ +RANLIB_TEST = @RANLIB_TEST@ CROSS = @CROSS@ .SUFFIXES: .SUFFIXES: .c .o .c.o: - $(CC) -c -DSkip_f2c_Undefs -DAllow_TYQUAD $(ALL_CFLAGS) $< + $(CC) -c -DSkip_f2c_Undefs -DAllow_TYQUAD $(ALL_CFLAGS) $(CGFLAGS) $< OBJ = VersionI.o backspace.o close.o dfe.o dolio.o due.o endfile.o err.o \ fmt.o fmtlib.o iio.o ilnw.o inquire.o lread.o lwrite.o open.o \ @@ -47,7 +57,7 @@ OBJ = VersionI.o backspace.o close.o dfe.o dolio.o due.o endfile.o err.o \ util.o wref.o wrtfmt.o wsfe.o wsle.o wsne.o xwsne.o \ ftell_.o -F2C_H = ../f2c.h +F2C_H = ../../../include/f2c.h all: $(OBJ) diff --git a/libf2c/libI77/Version.c b/libf2c/libI77/Version.c index d80ea39de8d..cbb63c9250a 100644 --- a/libf2c/libI77/Version.c +++ b/libf2c/libI77/Version.c @@ -1,9 +1,9 @@ -static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19970916\n"; +static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19970816\n"; /* */ -char __G77_LIBI77_VERSION__[] = "0.5.22-19970930"; +char __G77_LIBI77_VERSION__[] = "0.5.21"; /* 2.01 $ format added @@ -264,14 +264,6 @@ wrtfmt.c: strings that sometimes caused one more array element than required by the format to be blank-filled. Example: format(1x). */ -/* 16 Sept. 1997:fmt.[ch] rdfmt.c wrtfmt.c: tweak struct syl for machines - with 64-bit pointers and 32-bit ints that did not 64-bit - align struct syl (e.g., Linux on the DEC Alpha). */ - - - -/* Changes for GNU Fortran (g77) version of libf2c: */ - /* 17 June 1997: detect recursive I/O and call f__fatal explaining it. */ #include <stdio.h> diff --git a/libf2c/libI77/backspace.c b/libf2c/libI77/backspace.c index b806d1ec49d..8413d5f6821 100644 --- a/libf2c/libI77/backspace.c +++ b/libf2c/libI77/backspace.c @@ -7,8 +7,7 @@ integer f_back(a) alist *a; integer f_back(alist *a) #endif { unit *b; - int i, ndec; - uiolen n; + int i, n, ndec; #if defined (MSDOS) && !defined (GO32) int j, k; long w, z; @@ -46,9 +45,9 @@ integer f_back(alist *a) } if(b->ufmt==0) - { (void) fseek(b->ufd,-(long)sizeof(uiolen),SEEK_CUR); - (void) fread((char *)&n,sizeof(uiolen),1,b->ufd); - (void) fseek(b->ufd,-(long)n-2*sizeof(uiolen),SEEK_CUR); + { (void) fseek(b->ufd,-(long)sizeof(int),SEEK_CUR); + (void) fread((char *)&n,sizeof(int),1,b->ufd); + (void) fseek(b->ufd,-(long)n-2*sizeof(int),SEEK_CUR); return(0); } #if defined (MSDOS) && !defined (GO32) diff --git a/libf2c/libI77/close.c b/libf2c/libI77/close.c index 93e9198ed0b..691f931a3c0 100644 --- a/libf2c/libI77/close.c +++ b/libf2c/libI77/close.c @@ -75,10 +75,6 @@ f_exit(void) static cllist xx; if (! (f__init & 1)) return; /* Not initialized, so no open units. */ - /* no more I/O to be done. If this is not done, then if the - program is interrupted during I/O, f_clos thinks, incorrectly, - that there is an I/O recursion. */ - f__init &= ~2; if (!xx.cerr) { xx.cerr=1; xx.csta=NULL; diff --git a/libf2c/libI77/err.c b/libf2c/libI77/err.c index 12eb9eed9d6..1d0188737be 100644 --- a/libf2c/libI77/err.c +++ b/libf2c/libI77/err.c @@ -27,7 +27,6 @@ icilist *f__svic; /*active internal io list*/ flag f__reading; /*1 if reading, 0 if writing*/ flag f__cplus,f__cblank; char *f__fmtbuf; -int f__fmtlen; flag f__external; /*1 if external io, 0 if internal */ #ifdef KR_headers int (*f__doed)(),(*f__doned)(); @@ -168,7 +167,7 @@ f__fatal(int n, char *s) else fprintf(stderr,"apparent state: internal I/O\n"); if (f__fmtbuf) - fprintf(stderr,"last format: %.*s\n",f__fmtlen,f__fmtbuf); + fprintf(stderr,"last format: %s\n",f__fmtbuf); fprintf(stderr,"lately %s %s %s %s",f__reading?"reading":"writing", f__sequential?"sequential":"direct",f__formatted?"formatted":"unformatted", f__external?"external":"internal"); diff --git a/libf2c/libI77/fio.h b/libf2c/libI77/fio.h index e9e3b391407..769d360a626 100644 --- a/libf2c/libI77/fio.h +++ b/libf2c/libI77/fio.h @@ -4,9 +4,6 @@ /* ANSI C */ #include <stddef.h> #endif -#ifdef STDC_HEADERS -#include <string.h> -#endif #ifndef SEEK_SET #define SEEK_SET 0 diff --git a/libf2c/libI77/fmt.c b/libf2c/libI77/fmt.c index 8f08952ed45..a82f82153f6 100644 --- a/libf2c/libI77/fmt.c +++ b/libf2c/libI77/fmt.c @@ -18,7 +18,7 @@ /* special quote character for stu */ extern int f__cursor,f__scale; extern flag f__cblank,f__cplus; /*blanks in I and compulsory plus*/ -static struct syl f__syl[SYLMX]; +struct syl f__syl[SYLMX]; int f__parenlvl,f__pc,f__revloc; static @@ -53,8 +53,8 @@ op_gen(int a, int b, int c, int d) } p->op=a; p->p1=b; - p->p2.i[0]=c; - p->p2.i[1]=d; + p->p2=c; + p->p3=d; return(f__pc++); } #ifdef KR_headers @@ -103,6 +103,7 @@ char *f_s(char *s, int curloc) { return(NULL); } + skip(s); return(s); } @@ -159,7 +160,7 @@ ne_d(char *s, char **p) case 'H': case 'h': sp = &f__syl[op_gen(H,n,0,0)]; - sp->p2.s = s + 1; + *(char **)&sp->p2 = s + 1; s+=n; break; } @@ -168,7 +169,7 @@ ne_d(char *s, char **p) case '"': case '\'': sp = &f__syl[op_gen(APOS,0,0,0)]; - sp->p2.s = s; + *(char **)&sp->p2 = s; if((*p = ap_end(s)) == NULL) return(0); return(1); @@ -364,39 +365,11 @@ pars_f(s) char *s; pars_f(char *s) #endif { - char *e; - f__parenlvl=f__revloc=f__pc=0; - if((e=f_s(s,0)) == NULL) + if(f_s(s,0) == NULL) { - /* Try and delimit the format string. Parens within - hollerith and quoted strings have to match for this - to work, but it's probably adequate for most needs. - Note that this is needed because a valid CHARACTER - variable passed for FMT= can contain '(I)garbage', - where `garbage' is billions and billions of junk - characters, and it's up to the run-time library to - know where the format string ends by counting parens. - Meanwhile, still treat NUL byte as "hard stop", since - f2c still appends that at end of FORMAT-statement - strings. */ - - int level=0; - - for (f__fmtlen=0; - ((*s!=')') || (--level > 0)) - && (*s!='\0') - && (f__fmtlen<80); - ++s, ++f__fmtlen) - { - if (*s=='(') - ++level; - } - if (*s==')') - ++f__fmtlen; return(-1); } - f__fmtlen = e - s; return(0); } #define STKSZ 10 @@ -448,8 +421,8 @@ integer do_fio(ftnint *number, char *ptr, ftnlen len) loop: switch(type_f((p= &f__syl[f__pc])->op)) { default: - fprintf(stderr,"unknown code in do_fio: %d\n%.*s\n", - p->op,f__fmtlen,f__fmtbuf); + fprintf(stderr,"unknown code in do_fio: %d\n%s\n", + p->op,f__fmtbuf); err(f__elist->cierr,100,"do_fio"); case NED: if((*f__doned)(p)) diff --git a/libf2c/libI77/fmt.h b/libf2c/libI77/fmt.h index 6197e76ed5a..509746e13b9 100644 --- a/libf2c/libI77/fmt.h +++ b/libf2c/libI77/fmt.h @@ -1,8 +1,6 @@ struct syl -{ int op; - int p1; - union { int i[2]; char *s;} p2; - }; +{ int op,p1,p2,p3; +}; #define RET1 1 #define REVERT 2 #define GOTO 3 @@ -39,6 +37,7 @@ struct syl #define OM 34 #define Z 35 #define ZM 36 +extern struct syl f__syl[]; extern int f__pc,f__parenlvl,f__revloc; typedef union { real pf; @@ -79,7 +78,6 @@ extern int wrt_L(Uint*, int, ftnlen); #endif extern flag f__cblank,f__cplus,f__workdone, f__nonl; extern char *f__fmtbuf; -extern int f__fmtlen; extern int f__scale; #define GET(x) if((x=(*f__getn)())<0) return(x) #define VAL(x) (x!='\n'?x:' ') diff --git a/libf2c/libI77/lread.c b/libf2c/libI77/lread.c index 4fb14eed29e..3f0642c24cd 100644 --- a/libf2c/libI77/lread.c +++ b/libf2c/libI77/lread.c @@ -8,7 +8,6 @@ extern char *f__fmtbuf; -extern int f__fmtlen; #ifdef Allow_TYQUAD static longint f__llx; @@ -519,7 +518,6 @@ c_le(cilist *a) if(f__init != 1) f_init(); f__init = 3; f__fmtbuf="list io"; - f__fmtlen=7; if(a->ciunit>=MXUNIT || a->ciunit<0) err(a->cierr,101,"stler"); f__scale=f__recpos=0; diff --git a/libf2c/libI77/rawio.h b/libf2c/libI77/rawio.h index 1c165458494..cc5cab8b7bb 100644 --- a/libf2c/libI77/rawio.h +++ b/libf2c/libI77/rawio.h @@ -19,9 +19,7 @@ extern "C" { extern int creat(const char*,int), open(const char*,int); #endif extern int close(int); -#if !(defined(_WIN32) && !defined(__CYGWIN32__)) extern int read(int,void*,size_t), write(int,void*,size_t); -#endif extern int unlink(const char*); #ifndef _POSIX_SOURCE #ifndef NON_UNIX_STDIO diff --git a/libf2c/libI77/rdfmt.c b/libf2c/libI77/rdfmt.c index b03bcc5dbf6..0d8c2b4d9ca 100644 --- a/libf2c/libI77/rdfmt.c +++ b/libf2c/libI77/rdfmt.c @@ -433,7 +433,7 @@ rd_ed(struct syl *p, char *ptr, ftnlen len) case D: case G: case GE: - case F: ch = rd_F((ufloat *)ptr,p->p1,p->p2.i[0],len); + case F: ch = rd_F((ufloat *)ptr,p->p1,p->p2,len); break; /* Z and ZM assume 8-bit bytes. */ @@ -460,8 +460,8 @@ rd_ned(struct syl *p) default: fprintf(stderr,"rd_ned, unexpected code: %d\n", p->op); sig_die(f__fmtbuf, 1); case APOS: - return(rd_POS(p->p2.s)); - case H: return(rd_H(p->p1,p->p2.s)); + return(rd_POS(*(char **)&p->p2)); + case H: return(rd_H(p->p1,*(char **)&p->p2)); case SLASH: return((*f__donewrec)()); case TR: case X: f__cursor += p->p1; diff --git a/libf2c/libI77/wrtfmt.c b/libf2c/libI77/wrtfmt.c index 4350fc984f6..e14efa85833 100644 --- a/libf2c/libI77/wrtfmt.c +++ b/libf2c/libI77/wrtfmt.c @@ -326,7 +326,7 @@ w_ed(struct syl *p, char *ptr, ftnlen len) sig_die(f__fmtbuf, 1); case I: return(wrt_I((Uint *)ptr,p->p1,len, 10)); case IM: - return(wrt_IM((Uint *)ptr,p->p1,p->p2.i[0],len,10)); + return(wrt_IM((Uint *)ptr,p->p1,p->p2,len,10)); /* O and OM don't work right for character, double, complex, */ /* or doublecomplex, and they differ from Fortran 90 in */ @@ -334,7 +334,7 @@ w_ed(struct syl *p, char *ptr, ftnlen len) case O: return(wrt_I((Uint *)ptr, p->p1, len, 8)); case OM: - return(wrt_IM((Uint *)ptr,p->p1,p->p2.i[0],len,8)); + return(wrt_IM((Uint *)ptr,p->p1,p->p2,len,8)); case L: return(wrt_L((Uint *)ptr,p->p1, len)); case A: return(wrt_A(ptr,len)); case AW: @@ -342,17 +342,17 @@ w_ed(struct syl *p, char *ptr, ftnlen len) case D: case E: case EE: - return(wrt_E((ufloat *)ptr,p->p1,p->p2.i[0],p->p2.i[1],len)); + return(wrt_E((ufloat *)ptr,p->p1,p->p2,p->p3,len)); case G: case GE: - return(wrt_G((ufloat *)ptr,p->p1,p->p2.i[0],p->p2.i[1],len)); - case F: return(wrt_F((ufloat *)ptr,p->p1,p->p2.i[0],len)); + return(wrt_G((ufloat *)ptr,p->p1,p->p2,p->p3,len)); + case F: return(wrt_F((ufloat *)ptr,p->p1,p->p2,len)); /* Z and ZM assume 8-bit bytes. */ case Z: return(wrt_Z((Uint *)ptr,p->p1,0,len)); case ZM: - return(wrt_Z((Uint *)ptr,p->p1,p->p2.i[0],len)); + return(wrt_Z((Uint *)ptr,p->p1,p->p2,len)); } } #ifdef KR_headers @@ -378,8 +378,8 @@ w_ned(struct syl *p) f__cursor += p->p1; return(1); case APOS: - return(wrt_AP(p->p2.s)); + return(wrt_AP(*(char **)&p->p2)); case H: - return(wrt_H(p->p1,p->p2.s)); + return(wrt_H(p->p1,*(char **)&p->p2)); } } diff --git a/libf2c/libU77/Makefile.in b/libf2c/libU77/Makefile.in index bb101710d0c..2e6846b23de 100644 --- a/libf2c/libU77/Makefile.in +++ b/libf2c/libU77/Makefile.in @@ -25,19 +25,30 @@ VPATH = @srcdir@ #### Start of system configuration section. #### +# The _FOR_TARGET things are appropriate for a cross-make, passed by the +# superior makefile +GCC_FOR_TARGET = @CC@ +CC = $(GCC_FOR_TARGET) +CFLAGS = @CFLAGS@ $(GCC_FLAGS) CPPFLAGS = @CPPFLAGS@ DEFS = @DEFS@ +CGFLAGS = -g0 # f2c.h should already be installed in xgcc's include directory but add that # to -I anyhow in case not using xgcc. fio.h is in libI77. We need config.h # from `.'. -ALL_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/../libI77 -I.. $(CPPFLAGS) $(DEFS) $(CFLAGS) +ALL_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/../libI77 -I../../../include $(CPPFLAGS) $(DEFS) $(CFLAGS) +AR = @AR@ +AR_FLAGS = rc +RANLIB = @RANLIB@ +RANLIB_TEST = @RANLIB_TEST@ CROSS = @CROSS@ +G77DIR = ../../../ .SUFFIXES: .SUFFIXES: .c .o .c.o: - $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $< + $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $(CGFLAGS) $< OBJS = VersionU.o gerror_.o perror_.o ierrno_.o itime_.o time_.o \ unlink_.o fnum_.o getpid_.o getuid_.o getgid_.o kill_.o rand_.o \ @@ -47,7 +58,7 @@ OBJS = VersionU.o gerror_.o perror_.o ierrno_.o itime_.o time_.o \ vxttime_.o vxtidate_.o gmtime_.o fdate_.o secnds_.o \ bes.o dbes.o \ chdir_.o chmod_.o lnblnk_.o hostnm_.o rename_.o fgetc_.o fputc_.o \ - umask_.o sys_clock_.o date_.o second_.o flush1_.o mclock_.o \ + umask_.o system_clock_.o date_.o second_.o flush1_.o mclock_.o \ alarm_.o SRCS = Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \ unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c rand_.c \ @@ -57,10 +68,10 @@ SRCS = Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \ vxttime_.c vxtidate_.c gmtime_.c fdate_.c secnds_.c \ bes.c dbes.c \ chdir_.c chmod_.c lnblnk_.c hostnm_.c rename_.c fgetc_.c fputc_.c \ - umask_.c sys_clock_.c date_.c second_.c flush1_.c mclock_.c \ + umask_.c system_clock_.c date_.c second_.c flush1_.c mclock_.c \ alarm_.c -F2C_H = ../f2c.h +F2C_H = ../../../include/f2c.h all: $(OBJS) @@ -82,7 +93,7 @@ distclean realclean maintainer-clean: clean $(OBJS): $(F2C_H) config.h check: - -$(G77DIR)g77 -B$(G77DIR) -g $(srcdir)/u77-test.f $(lib) && ./a.out + -$(G77DIR)g77 --driver=$(G77DIR)/xgcc -B$(G77DIR) -g $(srcdir)/u77-test.f $(lib) && ./a.out rm -f a.out access_.o: access_.c @@ -135,7 +146,7 @@ hostnm_.o: hostnm_.c rename_.o: rename_.c fputc_.o: fputc_.c fgetc_.o: fgetc_.c -sys_clock_.o: sys_clock_.c +system_clock_.o: system_clock_.c umask_.o: umask_.c flush1_.o: flush1_.c mclock_.o: mclock_.c diff --git a/libf2c/libU77/Version.c b/libf2c/libU77/Version.c index 0a278382f51..88a2907c217 100644 --- a/libf2c/libU77/Version.c +++ b/libf2c/libU77/Version.c @@ -1,6 +1,6 @@ -static char junk[] = "\n@(#) LIBU77 VERSION 19970919\n"; +static char junk[] = "\n@(#) LIBU77 VERSION 19970609\n"; -char __G77_LIBU77_VERSION__[] = "0.5.22-970919"; +char __G77_LIBU77_VERSION__[] = "0.5.21"; #include <stdio.h> diff --git a/libf2c/libU77/access_.c b/libf2c/libU77/access_.c index fefdebb0d8d..1699ef065f2 100644 --- a/libf2c/libU77/access_.c +++ b/libf2c/libU77/access_.c @@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */ #if HAVE_STDLIB_H # include <stdlib.h> #else -# include <stdio.h> +# include <stdio.h> /* for NULL */ #endif #include <errno.h> @@ -62,7 +62,7 @@ integer G77_access_0 (const char *name, const char *mode, ftnlen Lname, ftnlen L int amode, i; buff = malloc (Lname+1); - if (!buff) return -1; + if (buff == NULL) return -1; g_char (name, Lname, buff); amode = 0; for (i=0;i<Lmode;i++) { diff --git a/libf2c/libU77/alarm_.c b/libf2c/libU77/alarm_.c index 3e2f293d9b1..b1c347d4a68 100644 --- a/libf2c/libU77/alarm_.c +++ b/libf2c/libU77/alarm_.c @@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ # include <unistd.h> #endif -#include <errno.h> /* for ENOSYS */ #include "f2c.h" #ifndef RETSIGTYPE @@ -51,14 +50,10 @@ integer G77_alarm_0 (integer *seconds, sig_proc proc) #endif { int status; -#if defined (HAVE_ALARM) && defined (SIGALRM) + if (signal(SIGALRM, (sig_type)proc) == SIG_ERR) status = -1; else status = alarm (*seconds); -#else /* ! HAVE_ALARM || ! SIGALRM */ - errno = ENOSYS; - status = -1; -#endif return status; } diff --git a/libf2c/libU77/chdir_.c b/libf2c/libU77/chdir_.c index 9bd53fb95d7..500be54fbe6 100644 --- a/libf2c/libU77/chdir_.c +++ b/libf2c/libU77/chdir_.c @@ -49,7 +49,7 @@ integer G77_chdir_0 (const char *name, const ftnlen Lname) int i; buff = malloc (Lname+1); - if (!buff) return -1; + if (buff == NULL) return -1; g_char (name, Lname, buff); i = chdir (buff); free (buff); diff --git a/libf2c/libU77/chmod_.c b/libf2c/libU77/chmod_.c index d482d9ed828..9797b80f3f5 100644 --- a/libf2c/libU77/chmod_.c +++ b/libf2c/libU77/chmod_.c @@ -29,10 +29,7 @@ Boston, MA 02111-1307, USA. */ #if HAVE_STDLIB_H # include <stdlib.h> #else -# include <stdio.h> -#endif -#if STDC_HEADERS -# include <string.h> +# include <stdio.h> /* for NULL */ #endif #include "f2c.h" @@ -65,7 +62,7 @@ integer G77_chmod_0 (/* const */ char *name, /* const */ char *mode, const ftnle char chmod_path [] = CHMOD_PATH; l = strlen (chmod_path); buff = malloc (Lname+Lmode+l+3+13+1); - if (!buff) return -1; + if (buff == NULL) return -1; ii[0] = l; a[0] = chmod_path; ii[1] = 1; a[1] = " "; ii[2] = Lmode; a[2] = mode; diff --git a/libf2c/libU77/config.h.in b/libf2c/libU77/config.h.in index c967b25f21d..45ada20e236 100644 --- a/libf2c/libU77/config.h.in +++ b/libf2c/libU77/config.h.in @@ -71,33 +71,3 @@ /* Define if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H - -/* Define if you have the <sys/param.h> header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the <sys/times.h> header file. */ -#undef HAVE_SYS_TIMES_H - -/* Define if you have the alarm function. */ -#undef HAVE_ALARM - -/* Define if you have the times function. */ -#undef HAVE_TIMES - -/* Define if you have the getlogin function. */ -#undef HAVE_GETLOGIN - -/* Define if you have the getgid function. */ -#undef HAVE_GETGID - -/* Define if you have the getuid function. */ -#undef HAVE_GETUID - -/* Define if you have the kill function. */ -#undef HAVE_KILL - -/* Define if you have the link function. */ -#undef HAVE_LINK - -/* Define if you have the ttyname function. */ -#undef HAVE_TTYNAME diff --git a/libf2c/libU77/configure b/libf2c/libU77/configure index 339e8681e52..63fb0e7844e 100755 --- a/libf2c/libU77/configure +++ b/libf2c/libU77/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.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -49,7 +49,6 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -333,7 +332,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.12" exit 0 ;; -with-* | --with-*) @@ -526,7 +525,7 @@ 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:530: checking for $ac_word" >&5 +echo "configure:529: 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 @@ -555,7 +554,7 @@ 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:559: checking for $ac_word" >&5 +echo "configure:558: 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 @@ -603,7 +602,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:607: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:606: 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. @@ -613,11 +612,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 617 "configure" +#line 616 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -637,12 +636,12 @@ 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:641: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:640: 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:646: checking whether we are using GNU C" >&5 +echo "configure:645: 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 @@ -651,7 +650,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:655: \"$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:654: \"$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 @@ -666,7 +665,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:670: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:669: 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 @@ -702,7 +701,7 @@ fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:706: checking for $ac_word" >&5 +echo "configure:705: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ac_cv_prog_chmod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -710,9 +709,6 @@ else /*) ac_cv_path_ac_cv_prog_chmod="$ac_cv_prog_chmod" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_ac_cv_prog_chmod="$ac_cv_prog_chmod" # Let the user override the test with a dos path. - ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do @@ -752,7 +748,7 @@ else # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:756: checking for $ac_word" >&5 +echo "configure:752: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -785,7 +781,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:789: checking how to run the C preprocessor" >&5 +echo "configure:785: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -800,13 +796,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 804 "configure" +#line 800 "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:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -817,13 +813,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 821 "configure" +#line 817 "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:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -846,12 +842,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:850: checking for ANSI C header files" >&5 +echo "configure:846: 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 855 "configure" +#line 851 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -859,7 +855,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -876,7 +872,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 880 "configure" +#line 876 "configure" #include "confdefs.h" #include <string.h> EOF @@ -894,7 +890,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 898 "configure" +#line 894 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -915,7 +911,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 919 "configure" +#line 915 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -926,7 +922,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -951,12 +947,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:955: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:951: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 960 "configure" +#line 956 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -965,7 +961,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -985,22 +981,21 @@ EOF fi -for ac_hdr in limits.h unistd.h sys/time.h string.h stdlib.h \ - sys/param.h sys/times.h +for ac_hdr in limits.h unistd.h sys/time.h string.h stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:994: checking for $ac_hdr" >&5 +echo "configure:989: checking for $ac_hdr" >&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 999 "configure" +#line 994 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1028,12 +1023,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1032: checking for working const" >&5 +echo "configure:1027: 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 1037 "configure" +#line 1032 "configure" #include "confdefs.h" int main() { @@ -1082,7 +1077,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:1086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1103,12 +1098,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1107: checking for size_t" >&5 +echo "configure:1102: 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 1112 "configure" +#line 1107 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1136,12 +1131,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:1140: checking for mode_t" >&5 +echo "configure:1135: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1145 "configure" +#line 1140 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1170,12 +1165,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1174: checking for pid_t" >&5 +echo "configure:1169: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1179 "configure" +#line 1174 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1203,12 +1198,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:1207: checking for st_blksize in struct stat" >&5 +echo "configure:1202: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1212 "configure" +#line 1207 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -1216,7 +1211,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:1220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -1237,12 +1232,12 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:1241: checking for st_blocks in struct stat" >&5 +echo "configure:1236: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1246 "configure" +#line 1241 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -1250,7 +1245,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -1273,12 +1268,12 @@ else fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:1277: checking for st_rdev in struct stat" >&5 +echo "configure:1272: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1282 "configure" +#line 1277 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -1286,7 +1281,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -1307,12 +1302,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:1311: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:1306: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1316 "configure" +#line 1311 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -1320,7 +1315,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -1342,16 +1337,15 @@ fi -for ac_func in symlink getcwd getwd lstat gethostname strerror clock \ - getrusage times alarm +for ac_func in symlink getcwd getwd lstat gethostname strerror clock getrusage do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1350: checking for $ac_func" >&5 +echo "configure:1344: 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 1355 "configure" +#line 1349 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1374,7 +1368,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1432,7 +1426,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) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -1499,7 +1493,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.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1518,7 +1512,6 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub -s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g diff --git a/libf2c/libU77/configure.in b/libf2c/libU77/configure.in index 6caf4e31a39..d50fa118e93 100644 --- a/libf2c/libU77/configure.in +++ b/libf2c/libU77/configure.in @@ -79,8 +79,7 @@ dnl AC_DEFINE(KR_headers)])]) dnl AC_MSG_RESULT($ac_cv_sys_proto) AC_HEADER_TIME -AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h \ - sys/param.h sys/times.h) +AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -97,8 +96,7 @@ AC_STRUCT_TM dnl Checks for library functions. -AC_CHECK_FUNCS(symlink getcwd getwd lstat gethostname strerror clock \ - getrusage times alarm getlogin getgid getuid kill link ttyname) +AC_CHECK_FUNCS(symlink getcwd getwd lstat gethostname strerror clock getrusage) test $ac_cv_func_symlink = yes && MAYBES="$MAYBES symlnk_.o" test $ac_cv_func_lstat = yes && MAYBES="$MAYBES lstat_.o" test $ac_cv_func_gethostname = yes && MAYBES="$MAYBES hostnm_.o" diff --git a/libf2c/libU77/dtime_.c b/libf2c/libU77/dtime_.c index 8bcfde8cb39..dc0accbfdf0 100644 --- a/libf2c/libU77/dtime_.c +++ b/libf2c/libU77/dtime_.c @@ -22,18 +22,11 @@ Boston, MA 02111-1307, USA. */ #if HAVE_UNISTD_H # include <unistd.h> #endif -#include <sys/types.h> -#if HAVE_SYS_TIMES_H -# include <sys/times.h> -#endif -#if HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif +#include <sys/times.h> #if HAVE_GETRUSAGE # include <sys/time.h> # include <sys/resource.h> #endif -#include <errno.h> /* for ENOSYS */ #include "f2c.h" /* For dtime, etime we store the clock tick parameter (clk_tck) the @@ -50,24 +43,21 @@ double G77_dtime_0 (tarray) double G77_dtime_0 (real tarray[2]) #endif { -#if defined (HAVE_GETRUSAGE) || defined (HAVE_TIMES) + time_t utime, stime; + static time_t old_utime = 0, old_stime = 0; /* The getrusage version is only the default for convenience. */ #ifdef HAVE_GETRUSAGE - float utime, stime; - static float old_utime = 0.0, old_stime = 0.0; struct rusage rbuff; if (getrusage (RUSAGE_SELF, &rbuff) != 0) abort (); - utime = (float) (rbuff.ru_utime).tv_sec + - (float) (rbuff.ru_utime).tv_usec/1000000.0; + utime = ((float) (rbuff.ru_utime).tv_sec + + (float) (rbuff.ru_utime).tv_usec/1000000.0); tarray[0] = utime - (float) old_utime; - stime = (float) (rbuff.ru_stime).tv_sec + - (float) (rbuff.ru_stime).tv_usec/1000000.0; + stime = ((float) (rbuff.ru_stime).tv_sec + + (float) (rbuff.ru_stime).tv_usec/1000000.0); tarray[1] = stime - old_stime; #else /* HAVE_GETRUSAGE */ - time_t utime, stime; - static time_t old_utime = 0, old_stime = 0; struct tms buffer; /* NeXTStep seems to define _SC_CLK_TCK but not to have sysconf; @@ -78,8 +68,6 @@ double G77_dtime_0 (real tarray[2]) if (! clk_tck) clk_tck = CLOCKS_PER_SECOND; # elif defined CLK_TCK if (! clk_tck) clk_tck = CLK_TCK; -# elif defined HZ - if (! clk_tck) clk_tck = HZ; # elif defined HAVE_GETRUSAGE # else #error Dont know clock tick length @@ -91,8 +79,4 @@ double G77_dtime_0 (real tarray[2]) #endif /* HAVE_GETRUSAGE */ old_utime = utime; old_stime = stime; return (tarray[0]+tarray[1]); -#else /* ! HAVE_GETRUSAGE && ! HAVE_TIMES */ - errno = ENOSYS; - return 0.0; -#endif /* ! HAVE_GETRUSAGE && ! HAVE_TIMES */ } diff --git a/libf2c/libU77/etime_.c b/libf2c/libU77/etime_.c index 269d964c75b..fa6ccfb0d4d 100644 --- a/libf2c/libU77/etime_.c +++ b/libf2c/libU77/etime_.c @@ -23,17 +23,12 @@ Boston, MA 02111-1307, USA. */ # include <unistd.h> #endif #include <sys/types.h> -#if HAVE_SYS_TIMES_H -# include <sys/times.h> -#endif -#if HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif +#include <sys/times.h> +#include <sys/param.h> #if HAVE_GETRUSAGE # include <sys/time.h> # include <sys/resource.h> #endif -#include <errno.h> /* for ENOSYS */ #include "f2c.h" /* For dtime, etime we store the clock tick parameter (clk_tck) the @@ -50,7 +45,6 @@ double G77_etime_0 (tarray) double G77_etime_0 (real tarray[2]) #endif { -#if defined (HAVE_GETRUSAGE) || defined (HAVE_TIMES) /* The getrusage version is only the default for convenience. */ #ifdef HAVE_GETRUSAGE struct rusage rbuff; @@ -72,8 +66,6 @@ double G77_etime_0 (real tarray[2]) if (! clk_tck) clk_tck = CLOCKS_PER_SECOND; # elif defined CLK_TCK if (! clk_tck) clk_tck = CLK_TCK; -# elif defined HZ - if (! clk_tck) clk_tck = HZ; # elif defined HAVE_GETRUSAGE # else #error Dont know clock tick length @@ -83,8 +75,4 @@ double G77_etime_0 (real tarray[2]) tarray[1] = (float) buffer.tms_stime / (float)clk_tck; #endif /* HAVE_GETRUSAGE */ return (tarray[0]+tarray[1]); -#else /* ! HAVE_GETRUSAGE && ! HAVE_TIMES */ - errno = ENOSYS; - return 0.0; -#endif /* ! HAVE_GETRUSAGE && ! HAVE_TIMES */ } diff --git a/libf2c/libU77/getgid_.c b/libf2c/libU77/getgid_.c index b489bacc6ed..02e8a4e4895 100644 --- a/libf2c/libU77/getgid_.c +++ b/libf2c/libU77/getgid_.c @@ -23,7 +23,6 @@ Boston, MA 02111-1307, USA. */ #include <unistd.h> #endif #include <sys/types.h> -#include <errno.h> /* for ENOSYS */ #include "f2c.h" #ifdef KR_headers @@ -32,10 +31,5 @@ integer G77_getgid_0 () integer G77_getgid_0 (void) #endif { -#if defined (HAVE_GETGID) return getgid (); -#else - errno = ENOSYS; - return -1; -#endif } diff --git a/libf2c/libU77/getlog_.c b/libf2c/libU77/getlog_.c index 82cb564a67a..a2c5f20f28b 100644 --- a/libf2c/libU77/getlog_.c +++ b/libf2c/libU77/getlog_.c @@ -19,7 +19,6 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include <sys/types.h> #if HAVE_STDLIB_H # include <stdlib.h> #else @@ -34,7 +33,6 @@ Boston, MA 02111-1307, USA. */ #else # include <strings.h> #endif -#include <errno.h> /* for ENOSYS */ #include "f2c.h" /* getlogin not in svr1-3 */ @@ -52,9 +50,7 @@ extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb); { size_t i; char *p; - int status; -#if defined (HAVE_GETLOGIN) p = getlogin (); if (p != NULL) { i = strlen (p); @@ -62,10 +58,5 @@ extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb); } else { s_copy (str, " ", Lstr, 1); } - status = 0; -#else - errno = ENOSYS; - status = -1; -#endif - return status; + return 0; } diff --git a/libf2c/libU77/getuid_.c b/libf2c/libU77/getuid_.c index 408ff0ab600..421bb4c9362 100644 --- a/libf2c/libU77/getuid_.c +++ b/libf2c/libU77/getuid_.c @@ -23,7 +23,6 @@ Boston, MA 02111-1307, USA. */ #include <unistd.h> #endif #include <sys/types.h> -#include <errno.h> /* for ENOSYS */ #include "f2c.h" #ifdef KR_headers @@ -32,10 +31,5 @@ integer G77_getuid_0 () integer G77_getuid_0 (void) #endif { -#if defined (HAVE_GETUID) return getuid (); -#else - errno = ENOSYS; - return -1; -#endif } diff --git a/libf2c/libU77/kill_.c b/libf2c/libU77/kill_.c index 99197bd02e7..32afddf1e46 100644 --- a/libf2c/libU77/kill_.c +++ b/libf2c/libU77/kill_.c @@ -33,10 +33,5 @@ integer G77_kill_0 (pid, signum) integer G77_kill_0 (const integer *pid, const integer *signum) #endif { -#if defined (HAVE_KILL) return kill ((pid_t) *pid, *signum) ? errno : 0; -#else - errno = ENOSYS; - return -1; -#endif } diff --git a/libf2c/libU77/link_.c b/libf2c/libU77/link_.c index 003fac8ffe2..6892dcb7694 100644 --- a/libf2c/libU77/link_.c +++ b/libf2c/libU77/link_.c @@ -28,10 +28,7 @@ Boston, MA 02111-1307, USA. */ # include <unistd.h> #endif #include <errno.h> -#if HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif -#include <errno.h> /* for ENOSYS */ +#include <sys/param.h> #include "f2c.h" #ifdef KR_headers @@ -45,7 +42,6 @@ void g_char(const char *a, ftnlen alen, char *b); integer G77_link_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2) #endif { -#if defined (HAVE_LINK) char *buff1, *buff2; char *bp, *blast; int i; @@ -59,8 +55,4 @@ integer G77_link_0 (const char *path1, const char *path2, const ftnlen Lpath1, c i = link (buff1, buff2); free (buff1); free (buff2); return i ? errno : 0; -#else /* ! HAVE_LINK */ - errno = ENOSYS; - return -1; -#endif } diff --git a/libf2c/libU77/rename_.c b/libf2c/libU77/rename_.c index 9583001c421..e8a4bf6523c 100644 --- a/libf2c/libU77/rename_.c +++ b/libf2c/libU77/rename_.c @@ -19,9 +19,6 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#if HAVE_UNISTD_H -# include <unistd.h> -#endif #if HAVE_STDLIB_H # include <stdlib.h> #endif diff --git a/libf2c/libU77/symlnk_.c b/libf2c/libU77/symlnk_.c index 4b0bf24541d..d15e4528758 100644 --- a/libf2c/libU77/symlnk_.c +++ b/libf2c/libU77/symlnk_.c @@ -28,9 +28,7 @@ Boston, MA 02111-1307, USA. */ # include <unistd.h> #endif #include <errno.h> -#if HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif +#include <sys/param.h> #include "f2c.h" #ifdef KR_headers diff --git a/libf2c/libU77/ttynam_.c b/libf2c/libU77/ttynam_.c index cb1d1e9a35c..f69aa43f564 100644 --- a/libf2c/libU77/ttynam_.c +++ b/libf2c/libU77/ttynam_.c @@ -19,7 +19,6 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include <sys/types.h> #if STDC_HEADERS # include <stdlib.h> #endif @@ -32,7 +31,6 @@ Boston, MA 02111-1307, USA. */ #else # include <strings.h> #endif -#include <errno.h> /* for ENOSYS */ #include "f2c.h" #ifdef KR_headers @@ -46,7 +44,6 @@ extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb); /* Character */ void G77_ttynam_0 (char *ret_val, ftnlen ret_val_len, integer *lunit) #endif { -#if defined (HAVE_TTYNAME) size_t i; char *p; @@ -57,8 +54,4 @@ extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb); } else { s_copy (ret_val, " ", ret_val_len, 1); } -#else - errno = ENOSYS; - return -1; -#endif } diff --git a/libf2c/libU77/unlink_.c b/libf2c/libU77/unlink_.c index cd00559b29a..5e7edf213bc 100644 --- a/libf2c/libU77/unlink_.c +++ b/libf2c/libU77/unlink_.c @@ -28,9 +28,7 @@ Boston, MA 02111-1307, USA. */ # include <unistd.h> #endif #include <errno.h> -#if HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif +#include <sys/param.h> #include "f2c.h" #ifdef KR_headers diff --git a/libf2c/readme.netlib b/libf2c/readme.netlib index e74898762e9..5d2ac98226f 100644 --- a/libf2c/readme.netlib +++ b/libf2c/readme.netlib @@ -521,19 +521,10 @@ with F8X_NML_ELIDE_QUOTES #defined. wrtfmt.o: wrt_G: tweak to print the right number of 0's for zero under G format. Sat Aug 16 05:45:32 EDT 1997 - libi77: iio.c: fix bug in internal writes to an array of character + libI77: iio.c: fix bug in internal writes to an array of character strings that sometimes caused one more array element than required by the format to be blank-filled. Example: format(1x). -Wed Sep 17 00:39:29 EDT 1997 - libi77: fmt.[ch] rdfmt.c wrtfmt.c: tweak struct syl for machines -with 64-bit pointers and 32-bit ints that did not 64-bit align -struct syl (e.g., Linux on the DEC Alpha). This change should be -invisible on other machines. - -Sun Sep 21 22:05:19 EDT 1997 - libf77: [de]time_.c (Unix systems only): change return type to double. - Current timestamps of files in "all from f2c/src", sorted by time, appear below (mm/dd/year hh:mm:ss). To bring your source up to date, obtain source files with a timestamp later than the time shown in your |