Mail Archives: djgpp/1993/11/04/13:13:22
In a recent post to this list, Jim Lupo gave instructions for
compiling f2c using djgpp. In attempting to do this myself with
the latest f2c sources, I ran into the following error on the file
"close.c" in "libI77":
"close.c" contains the lines,
#include "f2c.h"
#include "fio.h"
"fio.h" contains the line,
#include "errno.h"
"errno.h" is from the djgpp include subdirectory.
"errno.h" contains the line,
#include <std.h>
There is a conflict between "f2c.h" and "std.h" in the definition
of "abs". In "f2c.h" one has:
#define abs(x) ((x) >= 0 ? (x) : -(x))
while in "std.h" one has:
int abs(int);
Thus when compiling, one gets a parse error at line 50 in "std.h".
Is the correct fix to remove the definition from "f2c.h", or from "std.h"?
(Note: I am using djgpp 1.09, which has gcc -version give 2.2.2.
I do not see how the combination above could avoid an error
with any version, since it would be processing
"int (int) >= 0 ? (int) : -(int);"
)
- Raw text -