From owner-cvs-all Sun Jan 10 11:43:28 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA04680 for cvs-all-outgoing; Sun, 10 Jan 1999 11:43:28 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA04675; Sun, 10 Jan 1999 11:43:25 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.9.1/8.9.1) id LAA03808; Sun, 10 Jan 1999 11:50:04 -0800 (PST) (envelope-from sgk) From: Steve Kargl Message-Id: <199901101950.LAA03808@troutmask.apl.washington.edu> Subject: Re: cvs commit: src/usr.bin/f2c proc.c In-Reply-To: <199901101722.JAA24036@freefall.freebsd.org> from Doug Rabson at "Jan 10, 1999 9:22:51 am" To: dfr@FreeBSD.ORG (Doug Rabson) Date: Sun, 10 Jan 1999 11:50:03 -0800 (PST) Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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 cvs-all" in the body of the message