gcc/libf2c/g2c.hin

235 lines
5.4 KiB
Plaintext
Raw Normal View History

Makefile.in (install): Don't install if $(libsubdir) is empty... Sat Jun 13 03:46:40 1998 Craig Burley <burley@gnu.org> * Makefile.in (install): Don't install if $(libsubdir) is empty; issue a diagnostic saying top-level Makefile must pass it in instead, and exit. * Makefile.in (g2c.h): Rename from f2c.h. * Makefile.in, libF77/Makefile.in, libI77/Makefile.in, libU77/Makefile.in: Rewrite config and var assignment sections to be even more minimal than before, and to more clearly documented what macros are expected to be set and to what sorts of values. Eliminate CROSS and related stuff, since there's no such things as CROSS in egcs. Rename GCC_FOR_TARGET to CC throughout. * Makefile.in (stamp-libi77, stamp-libf77, stamp-libu77): Eliminate CROSS. * configure.in: Eliminate CROSS. Rename libf2c.a and f2c.h to libg2c.a and g2c.h, normalize and simplify g77/libg2c build process: * Makefile.in: Remove all stuff pertaining to installation, cleaning, and so on. Parent Makefile does all that now. Pass F2C_H_DIR, G2C_H_DIR, and GCC_H_DIR, the pathnames for the directories containing f2c.h, g2c.h, and other #include files, to subdirectory Makefiles. (stamp-libf77, stamp-libi77, stamp-libu77): Don't specify `-f Makefile' anymore, it's not needed now that subdirectory makefile's from netlib are renamed to makefile.netlib in g77 source (and to makefile.ori by configuration process, in case they're still around somehow). (stamp-libe77): Don't make libE77 dir unless it doesn't exist, if it does just delete all objects in it. Compile using $(GCC_FOR_TARGET), not $(CC). (rebuilt): Remove this and all subordinate targets, as parent Makefile now handles all that. (*clean): Remove. * configure.in (Pad_UDread, ALWAYS_FLUSH, WANT_LEAD_0): Remove these and commentary to new f2c.h file. AC_OUTPUT g2c.h instead of f2c.h. Remove old commentary regarding concatenation. * g2c.h.in: Rename from f2c.h.in, add appropriate commentary. * f2c.h: New file, a wrapper for g2c.h that does libg2c-specific stuff. * libF77/Makefile.in, libI77/Makefile.in, libU77/Makefile.in: Change $(ALL_CFLAGS) to use F2C_H_DIR, G2C_H_DIR, and GCC_H_DIR macros. Remove F2C_H macro, replace use with explicit dependencies on f2c.h and g2c.h. (*clean): Remove. From-SVN: r20507
1998-06-15 09:52:05 +02:00
/* g2c.h -- g77 version of f2c (Standard Fortran to C header file) */
/* This file is generated by the g77 libg2c configuration process from a
file named g2c.hin. This process sets up the appropriate types,
Makefile.in (install): Don't install if $(libsubdir) is empty... Sat Jun 13 03:46:40 1998 Craig Burley <burley@gnu.org> * Makefile.in (install): Don't install if $(libsubdir) is empty; issue a diagnostic saying top-level Makefile must pass it in instead, and exit. * Makefile.in (g2c.h): Rename from f2c.h. * Makefile.in, libF77/Makefile.in, libI77/Makefile.in, libU77/Makefile.in: Rewrite config and var assignment sections to be even more minimal than before, and to more clearly documented what macros are expected to be set and to what sorts of values. Eliminate CROSS and related stuff, since there's no such things as CROSS in egcs. Rename GCC_FOR_TARGET to CC throughout. * Makefile.in (stamp-libi77, stamp-libf77, stamp-libu77): Eliminate CROSS. * configure.in: Eliminate CROSS. Rename libf2c.a and f2c.h to libg2c.a and g2c.h, normalize and simplify g77/libg2c build process: * Makefile.in: Remove all stuff pertaining to installation, cleaning, and so on. Parent Makefile does all that now. Pass F2C_H_DIR, G2C_H_DIR, and GCC_H_DIR, the pathnames for the directories containing f2c.h, g2c.h, and other #include files, to subdirectory Makefiles. (stamp-libf77, stamp-libi77, stamp-libu77): Don't specify `-f Makefile' anymore, it's not needed now that subdirectory makefile's from netlib are renamed to makefile.netlib in g77 source (and to makefile.ori by configuration process, in case they're still around somehow). (stamp-libe77): Don't make libE77 dir unless it doesn't exist, if it does just delete all objects in it. Compile using $(GCC_FOR_TARGET), not $(CC). (rebuilt): Remove this and all subordinate targets, as parent Makefile now handles all that. (*clean): Remove. * configure.in (Pad_UDread, ALWAYS_FLUSH, WANT_LEAD_0): Remove these and commentary to new f2c.h file. AC_OUTPUT g2c.h instead of f2c.h. Remove old commentary regarding concatenation. * g2c.h.in: Rename from f2c.h.in, add appropriate commentary. * f2c.h: New file, a wrapper for g2c.h that does libg2c-specific stuff. * libF77/Makefile.in, libI77/Makefile.in, libU77/Makefile.in: Change $(ALL_CFLAGS) to use F2C_H_DIR, G2C_H_DIR, and GCC_H_DIR macros. Remove F2C_H macro, replace use with explicit dependencies on f2c.h and g2c.h. (*clean): Remove. From-SVN: r20507
1998-06-15 09:52:05 +02:00
defines the appropriate macros, and so on. The resulting g2c.h file
is used to build g77's copy of libf2c, named libg2c, and also can
be used when compiling C code produced by f2c to link the resulting
object file(s) with those produced by the same version of g77 that
produced this file, allowing inter-operability of f2c-compiled and
g77-compiled code. */
/** 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
/* F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems */
/* we assume short, float are OK */
typedef __g77_integer integer;
typedef __g77_uinteger 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 __g77_integer logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
typedef __g77_longint longint; /* system-dependent */
typedef __g77_ulongint ulongint; /* system-dependent */
#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
#ifdef f2c_i2
#error "f2c_i2 will not work with g77!!!!"
/* for -i2 */
typedef short flag;
typedef short ftnlen;
typedef short ftnint;
#else
typedef __g77_integer flag;
typedef __g77_integer ftnlen;
typedef __g77_integer 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;
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
/* (No such symbols should be defined in a strict ANSI C compiler.
We can avoid trouble with f2c-translated code by using
gcc -ansi [-traditional].) */
#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