Date: Sun, 10 Jan 1999 19:46:51 +0000 (GMT) From: Doug Rabson <dfr@nlsystems.com> To: alpha@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/f2c proc.c (fwd) Message-ID: <Pine.BSF.4.01.9901101946440.543-100000@herring.nlsystems.com>
index | next in thread | raw e-mail
--
Doug Rabson Mail: dfr@nlsystems.com
Nonlinear Systems Ltd. Phone: +44 181 442 9037
---------- Forwarded message ----------
Date: Sun, 10 Jan 1999 11:50:03 -0800 (PST)
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: Doug Rabson <dfr@FreeBSD.ORG>
Cc: cvs-committers@FreeBSD.ORG,
cvs-all@FreeBSD.ORG
Subject: Re: cvs commit: src/usr.bin/f2c proc.c
According to Doug Rabson:
> dfr 1999/01/10 09:22:51 PST
>
> Modified files:
> usr.bin/f2c proc.c
> Log:
> From the submitter:
>
> I found the reason why f77 so offen dies on alpha. Here is a fix.
> "Const" is a union of int and double.
> If nelt->constblock.Const.ci > 0 then it trys to evaluate it as double
> and floating point exception occurs.
>
There may be worse problems with f2c on alpha machines. My Alphastation
runs Digital Unix, so I haven't had a channce to FreeBSD/axp.
>From http://www.netlib.org/f2c/readme:
NOTE: f2c.h defines several types, e.g., real, integer, doublereal.
The definitions in f2c.h are suitable for most machines, but if
your machine has sizeof(double) > 2*sizeof(long), you may need
to adjust f2c.h appropriately. f2c assumes
sizeof(doublecomplex) = 2*sizeof(doublereal)
sizeof(doublereal) = sizeof(complex)
sizeof(doublereal) = 2*sizeof(real)
sizeof(real) = sizeof(integer)
sizeof(real) = sizeof(logical)
sizeof(real) = 2*sizeof(shortint)
EQUIVALENCEs may not be translated correctly if these
assumptions are violated.
On machines, such as those using a DEC Alpha processor, on
which sizeof(short) == 2, sizeof(int) == sizeof(float) == 4,
and sizeof(long) == sizeof(double) == 8, it suffices to
modify f2c.h by removing the first occurrence of "long "
on each line containing "long ", e.g., by issuing the
commands
mv f2c.h f2c.h0
sed 's/long //' f2c.h0 >f2c.h
On such machines, one can enable INTEGER*8 by uncommenting
the typedef of longint in f2c.h, so it reads
typedef long longint;
by compiling libI77 with -DAllow_TYQUAD, and by adjusting
libF77/makefile as described in libF77/README.
Some machines may have sizeof(int) == 4, sizeof(float) == 8,
and sizeof(long long) == 8. On such machines, adjust f2c.h
by changing "long int " to "long long ", e.g., by saying
mv f2c.h f2c.h0
sed 's/long int /long long /' f2c.h0 >f2c.h
One can enable INTEGER*8 on such machines as described
above, but with
typedef long long longint;
--
Steve
finger kargl@troutmask.apl.washington.edu
http://troutmask.apl.washington.edu/~clesceri/kargl.html
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9901101946440.543-100000>
