summaryrefslogtreecommitdiff
path: root/contrib/libf2c/libF77
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libf2c/libF77')
-rw-r--r--contrib/libf2c/libF77/F77_aloc.c6
-rw-r--r--contrib/libf2c/libF77/Makefile.in123
-rw-r--r--contrib/libf2c/libF77/README.netlib4
-rw-r--r--contrib/libf2c/libF77/Version.c10
-rw-r--r--contrib/libf2c/libF77/abort_.c4
-rw-r--r--contrib/libf2c/libF77/c_cos.c18
-rw-r--r--contrib/libf2c/libF77/c_div.c55
-rw-r--r--contrib/libf2c/libF77/c_exp.c20
-rw-r--r--contrib/libf2c/libF77/c_log.c18
-rw-r--r--contrib/libf2c/libF77/c_sin.c18
-rw-r--r--contrib/libf2c/libF77/c_sqrt.c47
-rwxr-xr-xcontrib/libf2c/libF77/configure212
-rw-r--r--contrib/libf2c/libF77/configure.in1
-rw-r--r--contrib/libf2c/libF77/d_cnjg.c16
-rw-r--r--contrib/libf2c/libF77/dtime_.c6
-rw-r--r--contrib/libf2c/libF77/ef1asc_.c4
-rw-r--r--contrib/libf2c/libF77/etime_.c6
-rw-r--r--contrib/libf2c/libF77/getenv_.c63
-rw-r--r--contrib/libf2c/libF77/pow_zi.c87
-rw-r--r--contrib/libf2c/libF77/r_cnjg.c16
-rw-r--r--contrib/libf2c/libF77/s_rnge.c4
-rw-r--r--contrib/libf2c/libF77/s_stop.c9
-rw-r--r--contrib/libf2c/libF77/signal1.h06
-rw-r--r--contrib/libf2c/libF77/z_cos.c18
-rw-r--r--contrib/libf2c/libF77/z_div.c53
-rw-r--r--contrib/libf2c/libF77/z_exp.c20
-rw-r--r--contrib/libf2c/libF77/z_log.c18
-rw-r--r--contrib/libf2c/libF77/z_sin.c18
-rw-r--r--contrib/libf2c/libF77/z_sqrt.c40
29 files changed, 376 insertions, 544 deletions
diff --git a/contrib/libf2c/libF77/F77_aloc.c b/contrib/libf2c/libF77/F77_aloc.c
index e329a1bfb341..8754fe2ef70e 100644
--- a/contrib/libf2c/libF77/F77_aloc.c
+++ b/contrib/libf2c/libF77/F77_aloc.c
@@ -14,13 +14,7 @@ extern void G77_exit_0 ();
F77_aloc(Len, whence) integer Len; char *whence;
#else
#include <stdlib.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
extern void G77_exit_0 (integer*);
-#ifdef __cplusplus
- }
-#endif
char *
F77_aloc(integer Len, char *whence)
diff --git a/contrib/libf2c/libF77/Makefile.in b/contrib/libf2c/libF77/Makefile.in
index 74c69a0915a6..83ac3f9e0bea 100644
--- a/contrib/libf2c/libF77/Makefile.in
+++ b/contrib/libf2c/libF77/Makefile.in
@@ -103,128 +103,6 @@ ${srcdir}/configure: configure.in
VersionF.o: Version.c
$(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c
-F77_aloc.o: F77_aloc.c
-main.o: main.c
-s_rnge.o: s_rnge.c
-abort_.o: abort_.c
-getarg_.o: getarg_.c
-iargc_.o: iargc_.c
-getenv_.o: getenv_.c
-signal_.o: signal_.c
-s_stop.o: s_stop.c
-s_paus.o: s_paus.c
-system_.o: system_.c
-cabs.o: cabs.c
-derf_.o: derf_.c
-derfc_.o: derfc_.c
-erf_.o: erf_.c
-erfc_.o: erfc_.c
-sig_die.o: sig_die.c
-exit_.o: exit_.c
-setarg.o: setarg.c
-setsig.o: setsig.c
-pow_ci.o: pow_ci.c
-pow_dd.o: pow_dd.c
-pow_di.o: pow_di.c
-pow_hh.o: pow_hh.c
-pow_ii.o: pow_ii.c
-pow_ri.o: pow_ri.c
-pow_zi.o: pow_zi.c
-pow_zz.o: pow_zz.c
-pow_qq.o: pow_qq.c
-c_abs.o: c_abs.c
-c_cos.o: c_cos.c
-c_div.o: c_div.c
-c_exp.o: c_exp.c
-c_log.o: c_log.c
-c_sin.o: c_sin.c
-c_sqrt.o: c_sqrt.c
-z_abs.o: z_abs.c
-z_cos.o: z_cos.c
-z_div.o: z_div.c
-z_exp.o: z_exp.c
-z_log.o: z_log.c
-z_sin.o: z_sin.c
-z_sqrt.o: z_sqrt.c
-r_abs.o: r_abs.c
-r_acos.o: r_acos.c
-r_asin.o: r_asin.c
-r_atan.o: r_atan.c
-r_atn2.o: r_atn2.c
-r_cnjg.o: r_cnjg.c
-r_cos.o: r_cos.c
-r_cosh.o: r_cosh.c
-r_dim.o: r_dim.c
-r_exp.o: r_exp.c
-r_imag.o: r_imag.c
-r_int.o: r_int.c
-r_lg10.o: r_lg10.c
-r_log.o: r_log.c
-r_mod.o: r_mod.c
-r_nint.o: r_nint.c
-r_sign.o: r_sign.c
-r_sin.o: r_sin.c
-r_sinh.o: r_sinh.c
-r_sqrt.o: r_sqrt.c
-r_tan.o: r_tan.c
-r_tanh.o: r_tanh.c
-d_abs.o: d_abs.c
-d_acos.o: d_acos.c
-d_asin.o: d_asin.c
-d_atan.o: d_atan.c
-d_atn2.o: d_atn2.c
-d_cnjg.o: d_cnjg.c
-d_cos.o: d_cos.c
-d_cosh.o: d_cosh.c
-d_dim.o: d_dim.c
-d_exp.o: d_exp.c
-d_imag.o: d_imag.c
-d_int.o: d_int.c
-d_lg10.o: d_lg10.c
-d_log.o: d_log.c
-d_mod.o: d_mod.c
-d_nint.o: d_nint.c
-d_prod.o: d_prod.c
-d_sign.o: d_sign.c
-d_sin.o: d_sin.c
-d_sinh.o: d_sinh.c
-d_sqrt.o: d_sqrt.c
-d_tan.o: d_tan.c
-d_tanh.o: d_tanh.c
-i_abs.o: i_abs.c
-i_dim.o: i_dim.c
-i_dnnt.o: i_dnnt.c
-i_indx.o: i_indx.c
-i_len.o: i_len.c
-i_mod.o: i_mod.c
-i_nint.o: i_nint.c
-i_sign.o: i_sign.c
-h_abs.o: h_abs.c
-h_dim.o: h_dim.c
-h_dnnt.o: h_dnnt.c
-h_indx.o: h_indx.c
-h_len.o: h_len.c
-h_mod.o: h_mod.c
-h_nint.o: h_nint.c
-h_sign.o: h_sign.c
-l_ge.o: l_ge.c
-l_gt.o: l_gt.c
-l_le.o: l_le.c
-l_lt.o: l_lt.c
-hl_ge.o: hl_ge.c
-hl_gt.o: hl_gt.c
-hl_le.o: hl_le.c
-hl_lt.o: hl_lt.c
-ef1asc_.o: ef1asc_.c
-ef1cmc_.o: ef1cmc_.c
-s_cat.o: s_cat.c
-s_cmp.o: s_cmp.c
-s_copy.o: s_copy.c
-lbitbits.o: lbitbits.c
-lbitshft.o: lbitshft.c
-qbitbits.o: qbitbits.c
-qbitshft.o: qbitshft.c
-
# Not quite all these actually do depend on f2c.h...
$(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) $(HALF) $(CMP) $(EFL) \
$(CHAR) $(F90BIT): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h
@@ -236,7 +114,6 @@ mostlyclean:
clean: mostlyclean
rm -f config.log
- rm -f ../s-libf77
distclean: clean
rm -f config.cache config.status Makefile ../s-libf77 configure
diff --git a/contrib/libf2c/libF77/README.netlib b/contrib/libf2c/libF77/README.netlib
index 5e532ee09902..766821525517 100644
--- a/contrib/libf2c/libF77/README.netlib
+++ b/contrib/libf2c/libF77/README.netlib
@@ -106,7 +106,3 @@ one-line shell script
or (on some systems)
exec /usr/bin/ar lts $1 >/dev/null
-
-If your compiler complains about the signal calls in main.c, s_paus.c,
-and signal_.c, you may need to adjust signal1.h suitably. See the
-comments in signal1.h.
diff --git a/contrib/libf2c/libF77/Version.c b/contrib/libf2c/libF77/Version.c
index a7c934676369..3e46ce899d9a 100644
--- a/contrib/libf2c/libF77/Version.c
+++ b/contrib/libf2c/libF77/Version.c
@@ -1,9 +1,9 @@
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
+static char junk[] = "\n@(#)LIBF77 VERSION 19970919\n";
/*
*/
-char __G77_LIBF77_VERSION__[] = "0.5.25 19990816 (release)";
+char __G77_LIBF77_VERSION__[] = "0.5.24";
/*
2.00 11 June 1980. File version.c added to library.
@@ -55,12 +55,6 @@ char __G77_LIBF77_VERSION__[] = "0.5.25 19990816 (release)";
affect systems using gratuitous extra precision).
19 Sept. 1997: [de]time_.c (Unix systems only): change return
type to double.
- 2 May 1999: getenv_.c: omit environ in favor of getenv().
- c_cos.c, c_exp.c, c_sin.c, d_cnjg.c, r_cnjg.c,
- z_cos.c, z_exp.c, z_log.c, z_sin.c: cope fully with
- overlapping arguments caused by equivalence.
- 3 May 1999: "invisible" tweaks to omit compiler warnings in
- abort_.c, ef1asc_.c, s_rnge.c, s_stop.c.
*/
#include <stdio.h>
diff --git a/contrib/libf2c/libF77/abort_.c b/contrib/libf2c/libF77/abort_.c
index f0c2f8df3599..8efdc42f9705 100644
--- a/contrib/libf2c/libF77/abort_.c
+++ b/contrib/libf2c/libF77/abort_.c
@@ -12,5 +12,7 @@ int G77_abort_0 (void)
#endif
{
sig_die("Fortran abort routine called", 1);
-return 0; /* not reached */
+#ifdef __cplusplus
+return 0;
+#endif
}
diff --git a/contrib/libf2c/libF77/c_cos.c b/contrib/libf2c/libF77/c_cos.c
index 549953dc6562..9e833c168b3b 100644
--- a/contrib/libf2c/libF77/c_cos.c
+++ b/contrib/libf2c/libF77/c_cos.c
@@ -3,15 +3,19 @@
#ifdef KR_headers
extern double sin(), cos(), sinh(), cosh();
-VOID c_cos(r, z) complex *r, *z;
+VOID c_cos(resx, z) complex *resx, *z;
#else
#undef abs
-#include "math.h"
+#include <math.h>
-void c_cos(complex *r, complex *z)
+void c_cos(complex *resx, complex *z)
#endif
{
- double zi = z->i, zr = z->r;
- r->r = cos(zr) * cosh(zi);
- r->i = - sin(zr) * sinh(zi);
- }
+complex res;
+
+res.r = cos(z->r) * cosh(z->i);
+res.i = - sin(z->r) * sinh(z->i);
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/c_div.c b/contrib/libf2c/libF77/c_div.c
index ac963079ba29..9568354bd53b 100644
--- a/contrib/libf2c/libF77/c_div.c
+++ b/contrib/libf2c/libF77/c_div.c
@@ -2,36 +2,39 @@
#ifdef KR_headers
extern VOID sig_die();
-VOID c_div(c, a, b)
-complex *a, *b, *c;
+VOID c_div(resx, a, b)
+complex *a, *b, *resx;
#else
extern void sig_die(char*,int);
-void c_div(complex *c, complex *a, complex *b)
+void c_div(complex *resx, complex *a, complex *b)
#endif
{
- double ratio, den;
- double abr, abi, cr;
+double ratio, den;
+double abr, abi;
+complex res;
- if( (abr = b->r) < 0.)
- abr = - abr;
- if( (abi = b->i) < 0.)
- abi = - abi;
- if( abr <= abi )
- {
- if(abi == 0)
- sig_die("complex division by zero", 1);
- ratio = (double)b->r / b->i ;
- den = b->i * (1 + ratio*ratio);
- cr = (a->r*ratio + a->i) / den;
- c->i = (a->i*ratio - a->r) / den;
- }
+if( (abr = b->r) < 0.)
+ abr = - abr;
+if( (abi = b->i) < 0.)
+ abi = - abi;
+if( abr <= abi )
+ {
+ if(abi == 0)
+ sig_die("complex division by zero", 1);
+ ratio = (double)b->r / b->i ;
+ den = b->i * (1 + ratio*ratio);
+ res.r = (a->r*ratio + a->i) / den;
+ res.i = (a->i*ratio - a->r) / den;
+ }
- else
- {
- ratio = (double)b->i / b->r ;
- den = b->r * (1 + ratio*ratio);
- cr = (a->r + a->i*ratio) / den;
- c->i = (a->i - a->r*ratio) / den;
- }
- c->r = cr;
+else
+ {
+ ratio = (double)b->i / b->r ;
+ den = b->r * (1 + ratio*ratio);
+ res.r = (a->r + a->i*ratio) / den;
+ res.i = (a->i - a->r*ratio) / den;
}
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/c_exp.c b/contrib/libf2c/libF77/c_exp.c
index 52d0d2ffc95c..8d3d33d0fe35 100644
--- a/contrib/libf2c/libF77/c_exp.c
+++ b/contrib/libf2c/libF77/c_exp.c
@@ -3,17 +3,21 @@
#ifdef KR_headers
extern double exp(), cos(), sin();
- VOID c_exp(r, z) complex *r, *z;
+ VOID c_exp(resx, z) complex *resx, *z;
#else
#undef abs
-#include "math.h"
+#include <math.h>
-void c_exp(complex *r, complex *z)
+void c_exp(complex *resx, complex *z)
#endif
{
- double expx, zi = z->i;
+double expx;
+complex res;
- expx = exp(z->r);
- r->r = expx * cos(zi);
- r->i = expx * sin(zi);
- }
+expx = exp(z->r);
+res.r = expx * cos(z->i);
+res.i = expx * sin(z->i);
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/c_log.c b/contrib/libf2c/libF77/c_log.c
index 24d1a3c957b4..6715131ad1db 100644
--- a/contrib/libf2c/libF77/c_log.c
+++ b/contrib/libf2c/libF77/c_log.c
@@ -2,16 +2,20 @@
#ifdef KR_headers
extern double log(), f__cabs(), atan2();
-VOID c_log(r, z) complex *r, *z;
+VOID c_log(resx, z) complex *resx, *z;
#else
#undef abs
-#include "math.h"
+#include <math.h>
extern double f__cabs(double, double);
-void c_log(complex *r, complex *z)
+void c_log(complex *resx, complex *z)
#endif
{
- double zi, zr;
- r->i = atan2(zi = z->i, zr = z->r);
- r->r = log( f__cabs(zr, zi) );
- }
+complex res;
+
+res.i = atan2(z->i, z->r);
+res.r = log( f__cabs(z->r, z->i) );
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/c_sin.c b/contrib/libf2c/libF77/c_sin.c
index 93a57660a902..7bf3e392bed0 100644
--- a/contrib/libf2c/libF77/c_sin.c
+++ b/contrib/libf2c/libF77/c_sin.c
@@ -3,15 +3,19 @@
#ifdef KR_headers
extern double sin(), cos(), sinh(), cosh();
-VOID c_sin(r, z) complex *r, *z;
+VOID c_sin(resx, z) complex *resx, *z;
#else
#undef abs
-#include "math.h"
+#include <math.h>
-void c_sin(complex *r, complex *z)
+void c_sin(complex *resx, complex *z)
#endif
{
- double zi = z->i, zr = z->r;
- r->r = sin(zr) * cosh(zi);
- r->i = cos(zr) * sinh(zi);
- }
+complex res;
+
+res.r = sin(z->r) * cosh(z->i);
+res.i = cos(z->r) * sinh(z->i);
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/c_sqrt.c b/contrib/libf2c/libF77/c_sqrt.c
index 8481ee4857e0..775977a87f7b 100644
--- a/contrib/libf2c/libF77/c_sqrt.c
+++ b/contrib/libf2c/libF77/c_sqrt.c
@@ -3,33 +3,36 @@
#ifdef KR_headers
extern double sqrt(), f__cabs();
-VOID c_sqrt(r, z) complex *r, *z;
+VOID c_sqrt(resx, z) complex *resx, *z;
#else
#undef abs
-#include "math.h"
+#include <math.h>
extern double f__cabs(double, double);
-void c_sqrt(complex *r, complex *z)
+void c_sqrt(complex *resx, complex *z)
#endif
{
- double mag, t;
- double zi = z->i, zr = z->r;
+double mag, t;
+complex res;
- if( (mag = f__cabs(zr, zi)) == 0.)
- r->r = r->i = 0.;
- else if(zr > 0)
- {
- r->r = t = sqrt(0.5 * (mag + zr) );
- t = zi / t;
- r->i = 0.5 * t;
- }
- else
- {
- t = sqrt(0.5 * (mag - zr) );
- if(zi < 0)
- t = -t;
- r->i = t;
- t = zi / t;
- r->r = 0.5 * t;
- }
+if( (mag = f__cabs(z->r, z->i)) == 0.)
+ res.r = res.i = 0.;
+else if(z->r > 0)
+ {
+ res.r = t = sqrt(0.5 * (mag + z->r) );
+ t = z->i / t;
+ res.i = 0.5 * t;
}
+else
+ {
+ t = sqrt(0.5 * (mag - z->r) );
+ if(z->i < 0)
+ t = -t;
+ res.i = t;
+ t = z->i / t;
+ res.r = 0.5 * t;
+ }
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/configure b/contrib/libf2c/libF77/configure
index b5622e06bf41..3f738bf12362 100755
--- a/contrib/libf2c/libF77/configure
+++ b/contrib/libf2c/libF77/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
+# Generated automatically using autoconf version 2.12.1
# 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.13"
+ echo "configure generated by autoconf version 2.12.1"
exit 0 ;;
-with-* | --with-*)
@@ -503,11 +503,9 @@ 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'
+ac_link='${CC-cc} -o conftest $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
@@ -527,16 +525,15 @@ 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:531: 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
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
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -557,17 +554,16 @@ 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:561: 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
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= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
+ for ac_dir in $PATH; 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
@@ -602,61 +598,25 @@ 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:644: 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.
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'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
-cat > conftest.$ac_ext << EOF
-
-#line 655 "configure"
+cat > conftest.$ac_ext <<EOF
+#line 616 "configure"
#include "confdefs.h"
-
main(){return(0);}
EOF
-if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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
@@ -670,24 +630,18 @@ 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:686: 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:691: 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
@@ -696,7 +650,7 @@ else
yes;
#endif
EOF
-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
+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
@@ -707,15 +661,11 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
-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
+ 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
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -730,27 +680,23 @@ 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 "$GCC" = yes; then
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
CFLAGS="-g -O2"
else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
CFLAGS="-O2"
- else
- CFLAGS=
fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
test "$AR" || AR=ar
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:754: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:700: 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
@@ -780,7 +726,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:784: checking how to run the C preprocessor" >&5
+echo "configure:730: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -795,14 +741,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 799 "configure"
+#line 745 "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:805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
@@ -812,31 +758,14 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 816 "configure"
+#line 762 "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: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}\$"`
+{ (eval echo configure:768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
@@ -849,8 +778,6 @@ fi
rm -f conftest*
fi
rm -f conftest*
-fi
-rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
@@ -861,18 +788,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:865: checking for stdio.h" >&5
+echo "configure:792: 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 870 "configure"
+#line 797 "configure"
#include "confdefs.h"
#include <stdio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>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}\$"`
+{ (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
@@ -899,12 +826,12 @@ fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:903: checking for ANSI C header files" >&5
+echo "configure:830: 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 908 "configure"
+#line 835 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -912,8 +839,8 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>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}\$"`
+{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
@@ -929,7 +856,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 933 "configure"
+#line 860 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -947,7 +874,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 951 "configure"
+#line 878 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -968,7 +895,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 972 "configure"
+#line 899 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -979,7 +906,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1004,12 +931,12 @@ fi
echo $ac_n "checking for posix""... $ac_c" 1>&6
-echo "configure:1008: checking for posix" >&5
+echo "configure:935: 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 1013 "configure"
+#line 940 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
@@ -1035,12 +962,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:1039: checking for GNU library" >&5
+echo "configure:966: 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 1044 "configure"
+#line 971 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef __GNU_LIBRARY__
@@ -1063,12 +990,12 @@ fi
echo "$ac_t""$g77_cv_lib_gnu" 1>&6
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1067: checking return type of signal handlers" >&5
+echo "configure:994: 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 1072 "configure"
+#line 999 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1085,7 +1012,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1106,12 +1033,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:1110: checking for atexit" >&5
+echo "configure:1037: 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 1115 "configure"
+#line 1042 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char atexit(); below. */
@@ -1134,7 +1061,7 @@ atexit();
; return 0; }
EOF
-if { (eval echo configure:1138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_atexit=yes"
else
@@ -1159,12 +1086,12 @@ else
EOF
echo $ac_n "checking for onexit""... $ac_c" 1>&6
-echo "configure:1163: checking for onexit" >&5
+echo "configure:1090: 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 1168 "configure"
+#line 1095 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char onexit(); below. */
@@ -1187,7 +1114,7 @@ onexit();
; return 0; }
EOF
-if { (eval echo configure:1191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_onexit=yes"
else
@@ -1205,12 +1132,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:1209: checking for on_exit" >&5
+echo "configure:1136: 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 1214 "configure"
+#line 1141 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char on_exit(); below. */
@@ -1233,7 +1160,7 @@ on_exit();
; return 0; }
EOF
-if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_on_exit=yes"
else
@@ -1263,7 +1190,7 @@ else true
fi
echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6
-echo "configure:1267: checking for drem in -lm" >&5
+echo "configure:1194: 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
@@ -1271,7 +1198,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1275 "configure"
+#line 1202 "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
@@ -1282,7 +1209,7 @@ int main() {
drem()
; return 0; }
EOF
-if { (eval echo configure:1286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1213: \"$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
@@ -1334,7 +1261,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 | grep ac_space) 2>&1` in
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -1413,7 +1340,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.13"
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -1436,7 +1363,6 @@ 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/libF77/configure.in b/contrib/libf2c/libF77/configure.in
index 5a3aa1a8d83f..660fb1a29add 100644
--- a/contrib/libf2c/libF77/configure.in
+++ b/contrib/libf2c/libF77/configure.in
@@ -19,7 +19,6 @@
#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#02111-1307, USA.
-AC_PREREQ(2.12.1)
AC_INIT(getarg_.c)
dnl Checks for programs.
diff --git a/contrib/libf2c/libF77/d_cnjg.c b/contrib/libf2c/libF77/d_cnjg.c
index c1970a56da9f..1afa3bc4061e 100644
--- a/contrib/libf2c/libF77/d_cnjg.c
+++ b/contrib/libf2c/libF77/d_cnjg.c
@@ -2,12 +2,16 @@
VOID
#ifdef KR_headers
-d_cnjg(r, z) doublecomplex *r, *z;
+d_cnjg(resx, z) doublecomplex *resx, *z;
#else
-d_cnjg(doublecomplex *r, doublecomplex *z)
+d_cnjg(doublecomplex *resx, doublecomplex *z)
#endif
{
- doublereal zi = z->i;
- r->r = z->r;
- r->i = -zi;
- }
+doublecomplex res;
+
+res.r = z->r;
+res.i = - z->i;
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/dtime_.c b/contrib/libf2c/libF77/dtime_.c
index 4b37320d43b8..95db94f4874b 100644
--- a/contrib/libf2c/libF77/dtime_.c
+++ b/contrib/libf2c/libF77/dtime_.c
@@ -1,10 +1,4 @@
#include "time.h"
-
-#ifdef MSDOS
-#undef USE_CLOCK
-#define USE_CLOCK
-#endif
-
#ifndef USE_CLOCK
#define _INCLUDE_POSIX_SOURCE /* for HP-UX */
#define _INCLUDE_XOPEN_SOURCE /* for HP-UX */
diff --git a/contrib/libf2c/libF77/ef1asc_.c b/contrib/libf2c/libF77/ef1asc_.c
index 8588584fbabe..a922a1d9ba9d 100644
--- a/contrib/libf2c/libF77/ef1asc_.c
+++ b/contrib/libf2c/libF77/ef1asc_.c
@@ -15,5 +15,7 @@ int G77_ef1asc_0 (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb)
#endif
{
s_copy( (char *)a, (char *)b, EVEN(*la), *lb );
-return 0; /* ignored return value */
+#ifdef __cplusplus
+return 0;
+#endif
}
diff --git a/contrib/libf2c/libF77/etime_.c b/contrib/libf2c/libF77/etime_.c
index e88cfd886484..7ed3fce6b271 100644
--- a/contrib/libf2c/libF77/etime_.c
+++ b/contrib/libf2c/libF77/etime_.c
@@ -1,10 +1,4 @@
#include "time.h"
-
-#ifdef MSDOS
-#undef USE_CLOCK
-#define USE_CLOCK
-#endif
-
#ifndef USE_CLOCK
#define _INCLUDE_POSIX_SOURCE /* for HP-UX */
#define _INCLUDE_XOPEN_SOURCE /* for HP-UX */
diff --git a/contrib/libf2c/libF77/getenv_.c b/contrib/libf2c/libF77/getenv_.c
index 4d0b7cf7b04b..b9916e6065e5 100644
--- a/contrib/libf2c/libF77/getenv_.c
+++ b/contrib/libf2c/libF77/getenv_.c
@@ -1,12 +1,4 @@
#include "f2c.h"
-#undef abs
-#ifdef KR_headers
-extern char *F77_aloc(), *getenv();
-#else
-#include <stdlib.h>
-#include <string.h>
-extern char *F77_aloc(ftnlen, char*);
-#endif
/*
* getenv - f77 subroutine to return environment variables
@@ -21,36 +13,39 @@ extern char *F77_aloc(ftnlen, char*);
*/
#ifdef KR_headers
- VOID
-G77_getenv_0 (fname, value, flen, vlen) char *value, *fname; ftnlen vlen, flen;
+VOID G77_getenv_0 (fname, value, flen, vlen) char *value, *fname; ftnlen vlen, flen;
#else
- void
-G77_getenv_0 (char *fname, char *value, ftnlen flen, ftnlen vlen)
+void G77_getenv_0 (char *fname, char *value, ftnlen flen, ftnlen vlen)
#endif
{
- char buf[256], *ep, *fp;
- integer i;
+extern char **environ;
+register char *ep, *fp, *flast;
+register char **env = environ;
- if (flen <= 0)
- goto add_blanks;
- for(i = 0; i < sizeof(buf); i++) {
- if (i == flen || (buf[i] = fname[i]) == ' ') {
- buf[i] = 0;
- ep = getenv(buf);
- goto have_ep;
- }
+flast = fname + flen;
+for(fp = fname ; fp < flast ; ++fp)
+ if(*fp == ' ')
+ {
+ flast = fp;
+ break;
}
- while(i < flen && fname[i] != ' ')
- i++;
- strncpy(fp = F77_aloc(i+1, "getenv_"), fname, (int)i);
- fp[i] = 0;
- ep = getenv(fp);
- free(fp);
- have_ep:
- if (ep)
- while(*ep && vlen-- > 0)
+
+while (ep = *env++)
+ {
+ for(fp = fname; fp<flast ; )
+ if(*fp++ != *ep++)
+ goto endloop;
+
+ if(*ep++ == '=') { /* copy right hand side */
+ while( *ep && --vlen>=0 )
*value++ = *ep++;
- add_blanks:
- while(vlen-- > 0)
- *value++ = ' ';
+
+ goto blank;
+ }
+endloop: ;
}
+
+blank:
+ while( --vlen >= 0 )
+ *value++ = ' ';
+}
diff --git a/contrib/libf2c/libF77/pow_zi.c b/contrib/libf2c/libF77/pow_zi.c
index abb3cb2b5302..898ea6be917b 100644
--- a/contrib/libf2c/libF77/pow_zi.c
+++ b/contrib/libf2c/libF77/pow_zi.c
@@ -1,54 +1,61 @@
#include "f2c.h"
#ifdef KR_headers
-VOID pow_zi(p, a, b) /* p = a**b */
- doublecomplex *p, *a; integer *b;
+VOID pow_zi(resx, a, b) /* p = a**b */
+ doublecomplex *resx, *a; integer *b;
#else
extern void z_div(doublecomplex*, doublecomplex*, doublecomplex*);
-void pow_zi(doublecomplex *p, doublecomplex *a, integer *b) /* p = a**b */
+void pow_zi(doublecomplex *resx, doublecomplex *a, integer *b) /* p = a**b */
#endif
{
- integer n;
- unsigned long u;
- double t;
- doublecomplex q, x;
- static doublecomplex one = {1.0, 0.0};
+integer n;
+unsigned long u;
+double t;
+doublecomplex x;
+doublecomplex res;
+static doublecomplex one = {1.0, 0.0};
- n = *b;
- q.r = 1;
- q.i = 0;
+n = *b;
- if(n == 0)
- goto done;
- if(n < 0)
- {
- n = -n;
- z_div(&x, &one, a);
- }
- else
+if(n == 0)
+ {
+ resx->r = 1;
+ resx->i = 0;
+ return;
+ }
+
+res.r = 1;
+res.i = 0;
+
+if(n < 0)
+ {
+ n = -n;
+ z_div(&x, &one, a);
+ }
+else
+ {
+ x.r = a->r;
+ x.i = a->i;
+ }
+
+for(u = n; ; )
+ {
+ if(u & 01)
{
- x.r = a->r;
- x.i = a->i;
+ t = res.r * x.r - res.i * x.i;
+ res.i = res.r * x.i + res.i * x.r;
+ res.r = t;
}
-
- for(u = n; ; )
+ if(u >>= 1)
{
- if(u & 01)
- {
- t = q.r * x.r - q.i * x.i;
- q.i = q.r * x.i + q.i * x.r;
- q.r = t;
- }
- if(u >>= 1)
- {
- t = x.r * x.r - x.i * x.i;
- x.i = 2 * x.r * x.i;
- x.r = t;
- }
- else
- break;
+ t = x.r * x.r - x.i * x.i;
+ x.i = 2 * x.r * x.i;
+ x.r = t;
}
- done:
- p->i = q.i;
- p->r = q.r;
+ else
+ break;
}
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/r_cnjg.c b/contrib/libf2c/libF77/r_cnjg.c
index 756c694ee7a8..b6175eedfd76 100644
--- a/contrib/libf2c/libF77/r_cnjg.c
+++ b/contrib/libf2c/libF77/r_cnjg.c
@@ -1,12 +1,16 @@
#include "f2c.h"
#ifdef KR_headers
-VOID r_cnjg(r, z) complex *r, *z;
+VOID r_cnjg(resx, z) complex *resx, *z;
#else
-VOID r_cnjg(complex *r, complex *z)
+VOID r_cnjg(complex *resx, complex *z)
#endif
{
- real zi = z->i;
- r->r = z->r;
- r->i = -zi;
- }
+complex res;
+
+res.r = z->r;
+res.i = - z->i;
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/s_rnge.c b/contrib/libf2c/libF77/s_rnge.c
index fbe3219d580b..189b5247ced2 100644
--- a/contrib/libf2c/libF77/s_rnge.c
+++ b/contrib/libf2c/libF77/s_rnge.c
@@ -20,5 +20,7 @@ fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ", offset+1
while((i = *varn) && i != ' ')
putc(*varn++, stderr);
sig_die(".", 1);
-return 0; /* not reached */
+#ifdef __cplusplus
+return 0;
+#endif
}
diff --git a/contrib/libf2c/libF77/s_stop.c b/contrib/libf2c/libF77/s_stop.c
index 975edb7d4ad0..2e3f1035b308 100644
--- a/contrib/libf2c/libF77/s_stop.c
+++ b/contrib/libf2c/libF77/s_stop.c
@@ -30,13 +30,8 @@ if(n > 0)
f_exit();
#endif
exit(0);
-
-/* We cannot avoid (useless) compiler diagnostics here: */
-/* some compilers complain if there is no return statement, */
-/* and others complain that this one cannot be reached. */
-
-return 0; /* NOT REACHED */
-}
#ifdef __cplusplus
+return 0; /* NOT REACHED */
}
#endif
+}
diff --git a/contrib/libf2c/libF77/signal1.h0 b/contrib/libf2c/libF77/signal1.h0
index a383774b82d2..662cae450dc4 100644
--- a/contrib/libf2c/libF77/signal1.h0
+++ b/contrib/libf2c/libF77/signal1.h0
@@ -3,8 +3,6 @@
/* compiler-dependent. The #define below assumes signal.h declares */
/* type SIG_PF for the signal function's second argument. */
-/* For some C++ compilers, "#define Sigarg_t ..." may be appropriate. */
-
#include <signal.h>
#ifndef Sigret_t
@@ -14,8 +12,12 @@
#ifdef KR_headers
#define Sigarg_t
#else
+#ifdef __cplusplus
+#define Sigarg_t ...
+#else
#define Sigarg_t int
#endif
+#endif
#endif /*Sigarg_t*/
#ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */
diff --git a/contrib/libf2c/libF77/z_cos.c b/contrib/libf2c/libF77/z_cos.c
index 2d4a24d28186..a811bbecc65b 100644
--- a/contrib/libf2c/libF77/z_cos.c
+++ b/contrib/libf2c/libF77/z_cos.c
@@ -2,14 +2,18 @@
#ifdef KR_headers
double sin(), cos(), sinh(), cosh();
-VOID z_cos(r, z) doublecomplex *r, *z;
+VOID z_cos(resx, z) doublecomplex *resx, *z;
#else
#undef abs
-#include "math.h"
-void z_cos(doublecomplex *r, doublecomplex *z)
+#include <math.h>
+void z_cos(doublecomplex *resx, doublecomplex *z)
#endif
{
- double zi = z->i, zr = z->r;
- r->r = cos(zr) * cosh(zi);
- r->i = - sin(zr) * sinh(zi);
- }
+doublecomplex res;
+
+res.r = cos(z->r) * cosh(z->i);
+res.i = - sin(z->r) * sinh(z->i);
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/z_div.c b/contrib/libf2c/libF77/z_div.c
index 22153fa4514a..4a987ab255a4 100644
--- a/contrib/libf2c/libF77/z_div.c
+++ b/contrib/libf2c/libF77/z_div.c
@@ -2,35 +2,38 @@
#ifdef KR_headers
extern VOID sig_die();
-VOID z_div(c, a, b) doublecomplex *a, *b, *c;
+VOID z_div(resx, a, b) doublecomplex *a, *b, *resx;
#else
extern void sig_die(char*, int);
-void z_div(doublecomplex *c, doublecomplex *a, doublecomplex *b)
+void z_div(doublecomplex *resx, doublecomplex *a, doublecomplex *b)
#endif
{
- double ratio, den;
- double abr, abi, cr;
+double ratio, den;
+double abr, abi;
+doublecomplex res;
- if( (abr = b->r) < 0.)
- abr = - abr;
- if( (abi = b->i) < 0.)
- abi = - abi;
- if( abr <= abi )
- {
- if(abi == 0)
- sig_die("complex division by zero", 1);
- ratio = b->r / b->i ;
- den = b->i * (1 + ratio*ratio);
- cr = (a->r*ratio + a->i) / den;
- c->i = (a->i*ratio - a->r) / den;
- }
+if( (abr = b->r) < 0.)
+ abr = - abr;
+if( (abi = b->i) < 0.)
+ abi = - abi;
+if( abr <= abi )
+ {
+ if(abi == 0)
+ sig_die("complex division by zero", 1);
+ ratio = b->r / b->i ;
+ den = b->i * (1 + ratio*ratio);
+ res.r = (a->r*ratio + a->i) / den;
+ res.i = (a->i*ratio - a->r) / den;
+ }
- else
- {
- ratio = b->i / b->r ;
- den = b->r * (1 + ratio*ratio);
- cr = (a->r + a->i*ratio) / den;
- c->i = (a->i - a->r*ratio) / den;
- }
- c->r = cr;
+else
+ {
+ ratio = b->i / b->r ;
+ den = b->r * (1 + ratio*ratio);
+ res.r = (a->r + a->i*ratio) / den;
+ res.i = (a->i - a->r*ratio) / den;
}
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/z_exp.c b/contrib/libf2c/libF77/z_exp.c
index ecf84296d720..85fb63e42095 100644
--- a/contrib/libf2c/libF77/z_exp.c
+++ b/contrib/libf2c/libF77/z_exp.c
@@ -2,16 +2,20 @@
#ifdef KR_headers
double exp(), cos(), sin();
-VOID z_exp(r, z) doublecomplex *r, *z;
+VOID z_exp(resx, z) doublecomplex *resx, *z;
#else
#undef abs
-#include "math.h"
-void z_exp(doublecomplex *r, doublecomplex *z)
+#include <math.h>
+void z_exp(doublecomplex *resx, doublecomplex *z)
#endif
{
- double expx, zi = z->i;
+double expx;
+doublecomplex res;
- expx = exp(z->r);
- r->r = expx * cos(zi);
- r->i = expx * sin(zi);
- }
+expx = exp(z->r);
+res.r = expx * cos(z->i);
+res.i = expx * sin(z->i);
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/z_log.c b/contrib/libf2c/libF77/z_log.c
index 34c56d42a8c4..48afca63d6d6 100644
--- a/contrib/libf2c/libF77/z_log.c
+++ b/contrib/libf2c/libF77/z_log.c
@@ -2,15 +2,19 @@
#ifdef KR_headers
double log(), f__cabs(), atan2();
-VOID z_log(r, z) doublecomplex *r, *z;
+VOID z_log(resx, z) doublecomplex *resx, *z;
#else
#undef abs
-#include "math.h"
+#include <math.h>
extern double f__cabs(double, double);
-void z_log(doublecomplex *r, doublecomplex *z)
+void z_log(doublecomplex *resx, doublecomplex *z)
#endif
{
- double zi = z->i, zr = z->r;
- r->i = atan2(zi, zr);
- r->r = log( f__cabs( zr, zi ) );
- }
+doublecomplex res;
+
+res.i = atan2(z->i, z->r);
+res.r = log( f__cabs( z->r, z->i ) );
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/z_sin.c b/contrib/libf2c/libF77/z_sin.c
index e24caff927e9..94456c9c30a3 100644
--- a/contrib/libf2c/libF77/z_sin.c
+++ b/contrib/libf2c/libF77/z_sin.c
@@ -2,14 +2,18 @@
#ifdef KR_headers
double sin(), cos(), sinh(), cosh();
-VOID z_sin(r, z) doublecomplex *r, *z;
+VOID z_sin(resx, z) doublecomplex *resx, *z;
#else
#undef abs
-#include "math.h"
-void z_sin(doublecomplex *r, doublecomplex *z)
+#include <math.h>
+void z_sin(doublecomplex *resx, doublecomplex *z)
#endif
{
- double zi = z->i, zr = z->r;
- r->r = sin(zr) * cosh(zi);
- r->i = cos(zr) * sinh(zi);
- }
+doublecomplex res;
+
+res.r = sin(z->r) * cosh(z->i);
+res.i = cos(z->r) * sinh(z->i);
+
+resx->r = res.r;
+resx->i = res.i;
+}
diff --git a/contrib/libf2c/libF77/z_sqrt.c b/contrib/libf2c/libF77/z_sqrt.c
index c04e8f0a1a72..f5db56519911 100644
--- a/contrib/libf2c/libF77/z_sqrt.c
+++ b/contrib/libf2c/libF77/z_sqrt.c
@@ -2,28 +2,32 @@
#ifdef KR_headers
double sqrt(), f__cabs();
-VOID z_sqrt(r, z) doublecomplex *r, *z;
+VOID z_sqrt(resx, z) doublecomplex *resx, *z;
#else
#undef abs
-#include "math.h"
+#include <math.h>
extern double f__cabs(double, double);
-void z_sqrt(doublecomplex *r, doublecomplex *z)
+void z_sqrt(doublecomplex *resx, doublecomplex *z)
#endif
{
- double mag, zi = z->i, zr = z->r;
+double mag;
+doublecomplex res;
- if( (mag = f__cabs(zr, zi)) == 0.)
- r->r = r->i = 0.;
- else if(zr > 0)
- {
- r->r = sqrt(0.5 * (mag + zr) );
- r->i = zi / r->r / 2;
- }
- else
- {
- r->i = sqrt(0.5 * (mag - zr) );
- if(zi < 0)
- r->i = - r->i;
- r->r = zi / r->i / 2;
- }
+if( (mag = f__cabs(z->r, z->i)) == 0.)
+ res.r = res.i = 0.;
+else if(z->r > 0)
+ {
+ res.r = sqrt(0.5 * (mag + z->r) );
+ res.i = z->i / res.r / 2;
}
+else
+ {
+ res.i = sqrt(0.5 * (mag - z->r) );
+ if(z->i < 0)
+ res.i = - res.i;
+ res.r = z->i / res.i / 2;
+ }
+
+resx->r = res.r;
+resx->i = res.i;
+}