summaryrefslogtreecommitdiffstats
path: root/lang/f2c/files/patch-f2c.h
blob: a28769698f1e0cefc29f3988c5101cbb6cd53a55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
taken from /usr/src/gnu/lib/libg2c/g2c.h of FreeBSD 6.2-RELEASE

--- src/xsum0.out	Mon Jan 15 16:39:12 2007
+++ src/xsum0.out	Mon Jan 15 16:39:45 2007
@@ -10,7 +10,7 @@
 expr.c	6bfe005	72276
 f2c.1	b0441b2	7532
 f2c.1t	bf1f87	7574
-f2c.h	e770b7d8	4688
+f2c.h	119ccae4	5589
 format.c	bc32336	59652
 format.h	b396862	458
 formatdata.c	11a95834	28870

--- libf2c/f2c.h0.orig	Tue Sep  7 13:46:24 1999
+++ libf2c/f2c.h0	Mon Jan 15 16:39:12 2007
@@ -1,4 +1,13 @@
-/* f2c.h  --  Standard Fortran to C header file */
+/* 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,
+   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."
 
@@ -7,24 +16,24 @@
 #ifndef F2C_INCLUDE
 #define F2C_INCLUDE
 
-typedef long int integer;
-typedef unsigned long int uinteger;
+/* F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems */
+/* we assume short, float are OK */
+typedef int /* long int */ integer;
+typedef unsigned long int /* long */ 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 long int logical;
+typedef int /* long int */ logical;
 typedef short int shortlogical;
 typedef char logical1;
 typedef char integer1;
-#ifdef INTEGER_STAR_8	/* Adjust for integer*8. */
-typedef long long longint;		/* system-dependent */
-typedef unsigned long long ulongint;	/* system-dependent */
+typedef long long int /* long long */ longint;		/* system-dependent */
+typedef unsigned long long int /* long 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)
@@ -37,14 +46,15 @@
 /* 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 long int flag;
-typedef long int ftnlen;
-typedef long int ftnint;
+typedef int /* long int */ flag;
+typedef int /* long int */ ftnlen;
+typedef int /* long int */ ftnint;
 #endif
 
 /*external read, write*/
@@ -201,6 +211,9 @@
 /* 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

--- src/f2c.h.orig	Mon Jan 15 16:39:12 2007
+++ src/f2c.h	Mon Jan 15 16:39:12 2007
@@ -1,4 +1,13 @@
-/* f2c.h  --  Standard Fortran to C header file */
+/* 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,
+   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."
 
@@ -7,24 +16,24 @@
 #ifndef F2C_INCLUDE
 #define F2C_INCLUDE
 
-typedef long int integer;
-typedef unsigned long int uinteger;
+/* F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems */
+/* we assume short, float are OK */
+typedef int /* long int */ integer;
+typedef unsigned long int /* long */ 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 long int logical;
+typedef int /* long int */ logical;
 typedef short int shortlogical;
 typedef char logical1;
 typedef char integer1;
-#ifdef INTEGER_STAR_8	/* Adjust for integer*8. */
-typedef long long longint;		/* system-dependent */
-typedef unsigned long long ulongint;	/* system-dependent */
+typedef long long int /* long long */ longint;		/* system-dependent */
+typedef unsigned long long int /* long 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)
@@ -37,14 +46,15 @@
 /* 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 long int flag;
-typedef long int ftnlen;
-typedef long int ftnint;
+typedef int /* long int */ flag;
+typedef int /* long int */ ftnlen;
+typedef int /* long int */ ftnint;
 #endif
 
 /*external read, write*/
@@ -201,6 +211,9 @@
 /* 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
OpenPOWER on IntegriCloud