Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Harvey J. Stein <hjstein@bfr.co.il>
Subject: Re: Redhat 5.0 - The *real* questions.
Date: 25 Nov 1997 21:41:40 +0200	[thread overview]
Message-ID: <ccdaca4923276361bbd7e61fa99c4bc9.axp-list@archive.invalid> (raw)

"M. Nicklaus" <mn1@helix.nih.gov> writes:

> 
> Harvey J. Stein <hjstein@blinky.bfr.co.il> writes:
> 
> > "M. Nicklaus" <mn1@helix.nih.gov> writes:
> > 
> > > Roger Hill-Cottingham <eesrjhc@ee.bath.ac.uk> wrote:
> > > > > > 
> > > > > If you just compile f2c from the sources at netlib, it will work.
> > > > 
> > > > OK, just done that, and it is fine for little things, but large code
> > > > I get millions of
>
> I've checked the README files that came with f2c (the--hopefully--newest
> version from netlib.bell-labs.com).  Although I found a few points which
> may, or may not, be related to the above problem, I'm not sure I got the
> full picture.  (Linux is only mentioned explicitly once; and axp-linux
> never.)
> 
> Before I waste a lot of time trying this and that, could you please
> elaborate?

You have to delete various "long"s.  There are notes about 64 bit
machines & alphas.

Here it is:

/* f2c.h  --  Standard Fortran to C header file */

/**  barf  [ba:rf]  2.  "He suggested using FORTRAN, and everybody barfed."

	- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */

#ifndef F2C_INCLUDE
#define F2C_INCLUDE

typedef int integer;
typedef unsigned uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#ifdef 1	/* Adjust for integer*8. */
typedef long longint;		/* system-dependent */
typedef unsigned long ulongint;	/* system-dependent */
#define qbit_clear(a,b)	((a) & ~((ulongint)1 << (b)))
#define qbit_set(a,b)	((a) |  ((ulongint)1 << (b)))
#endif

#define TRUE_ (1)
#define FALSE_ (0)

/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif

/* I/O stuff */

#ifdef f2c_i2
/* for -i2 */
typedef short flag;
typedef short ftnlen;
typedef short ftnint;
#else
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
#endif

/*external read, write*/
typedef struct
{	flag cierr;
	ftnint ciunit;
	flag ciend;
	char *cifmt;
	ftnint cirec;
} cilist;

/*internal read, write*/
typedef struct
{	flag icierr;
	char *iciunit;
	flag iciend;
	char *icifmt;
	ftnint icirlen;
	ftnint icirnum;
} icilist;

/*open*/
typedef struct
{	flag oerr;
	ftnint ounit;
	char *ofnm;
	ftnlen ofnmlen;
	char *osta;
	char *oacc;
	char *ofm;
	ftnint orl;
	char *oblnk;
} olist;

/*close*/
typedef struct
{	flag cerr;
	ftnint cunit;
	char *csta;
} cllist;

/*rewind, backspace, endfile*/
typedef struct
{	flag aerr;
	ftnint aunit;
} alist;

/* inquire */
typedef struct
{	flag inerr;
	ftnint inunit;
	char *infile;
	ftnlen infilen;
	ftnint	*inex;	/*parameters in standard's order*/
	ftnint	*inopen;
	ftnint	*innum;
	ftnint	*innamed;
	char	*inname;
	ftnlen	innamlen;
	char	*inacc;
	ftnlen	inacclen;
	char	*inseq;
	ftnlen	inseqlen;
	char 	*indir;
	ftnlen	indirlen;
	char	*infmt;
	ftnlen	infmtlen;
	char	*inform;
	ftnint	informlen;
	char	*inunf;
	ftnlen	inunflen;
	ftnint	*inrecl;
	ftnint	*innrec;
	char	*inblank;
	ftnlen	inblanklen;
} inlist;

#define VOID void

union Multitype {	/* for multiple entry points */
	integer1 g;
	shortint h;
	integer i;
	/* longint j; */
	real r;
	doublereal d;
	complex c;
	doublecomplex z;
	};

typedef union Multitype Multitype;

/*typedef long int Long;*/	/* No longer used; formerly in Namelist */

struct Vardesc {	/* for Namelist */
	char *name;
	char *addr;
	ftnlen *dims;
	int  type;
	};
typedef struct Vardesc Vardesc;

struct Namelist {
	char *name;
	Vardesc **vars;
	int nvars;
	};
typedef struct Namelist Namelist;

#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (doublereal)abs(x)
#define min(a,b) ((a) <= (b) ? (a) : (b))
#define max(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (doublereal)min(a,b)
#define dmax(a,b) (doublereal)max(a,b)
#define bit_test(a,b)	((a) >> (b) & 1)
#define bit_clear(a,b)	((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b)	((a) |  ((uinteger)1 << (b)))

/* procedure parameter types for -A and -C++ */

#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef int /* Unknown procedure type */ (*U_fp)(...);
typedef shortint (*J_fp)(...);
typedef integer (*I_fp)(...);
typedef real (*R_fp)(...);
typedef doublereal (*D_fp)(...), (*E_fp)(...);
typedef /* Complex */ VOID (*C_fp)(...);
typedef /* Double Complex */ VOID (*Z_fp)(...);
typedef logical (*L_fp)(...);
typedef shortlogical (*K_fp)(...);
typedef /* Character */ VOID (*H_fp)(...);
typedef /* Subroutine */ int (*S_fp)(...);
#else
typedef int /* Unknown procedure type */ (*U_fp)();
typedef shortint (*J_fp)();
typedef integer (*I_fp)();
typedef real (*R_fp)();
typedef doublereal (*D_fp)(), (*E_fp)();
typedef /* Complex */ VOID (*C_fp)();
typedef /* Double Complex */ VOID (*Z_fp)();
typedef logical (*L_fp)();
typedef shortlogical (*K_fp)();
typedef /* Character */ VOID (*H_fp)();
typedef /* Subroutine */ int (*S_fp)();
#endif
/* E_fp is for real functions when -R is not specified */
typedef VOID C_f;	/* complex function */
typedef VOID H_f;	/* character function */
typedef VOID Z_f;	/* double complex function */
typedef doublereal E_f;	/* real function with -R not specified */

/* undef any lower-case symbols that your C compiler predefines, e.g.: */

#ifndef Skip_f2c_Undefs
#undef cray
#undef gcos
#undef mc68010
#undef mc68020
#undef mips
#undef pdp11
#undef sgi
#undef sparc
#undef sun
#undef sun2
#undef sun3
#undef sun4
#undef u370
#undef u3b
#undef u3b2
#undef u3b5
#undef unix
#undef vax
#endif
#endif

-- 
Harvey J. Stein
Berger Financial Research
hjstein@bfr.co.il

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

             reply	other threads:[~1997-11-25 19:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-25 19:41 Harvey J. Stein [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-11-26 11:05 Redhat 5.0 - The *real* questions Harvey J. Stein
1997-11-26 10:46 R J Hill-Cottingham
1997-11-25 19:29 M. Nicklaus
1997-11-25 17:07 Harvey J. Stein
1997-11-25 16:33 M. Nicklaus
     [not found] <347AD767.FEB4A63F@voicenet.com>
1997-11-25 16:29 ` Hugo van der Kooij
1997-11-25 14:21 Harvey J. Stein
     [not found] <m2d8jpp5wq.fsf@blinky.bfr.co.il>
1997-11-25 11:57 ` Hugo van der Kooij
1997-11-25 13:55 ` Roman Martonak
1997-11-25 13:49 Uncle George
1997-11-25 12:01 R J Hill-Cottingham
1997-11-25 12:01 Harvey J. Stein
1997-11-25 11:30 Harvey J. Stein
1997-11-25 10:24 R J Hill-Cottingham
     [not found] <18009.9711241036@ee.bath.ac.uk>
1997-11-24 13:05 ` Roman Martonak
1997-11-24 10:36 R J Hill-Cottingham
1997-11-21 14:52 Toon Moene
     [not found] <12915.9711210950@ee.bath.ac.uk>
1997-11-21 13:50 ` Erik Troan
1997-11-21  9:50 R J Hill-Cottingham
1997-11-21  9:17 Stefan Schroepfer
     [not found] <m24t57bkhv.fsf@blinky.bfr.co.il>
1997-11-20 17:11 ` Erik Troan
1997-11-20 16:25 Harvey J. Stein
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox