www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/12/16/16:13:12

Date: 16 Dec 1993 14:12:49 -0500 (EST)
From: pek AT logos DOT res DOT utc DOT com (Paul Kirschner)
Subject: Has anyone tried f2c with v1.11?
To: djgpp AT sun DOT soe DOT clarkson DOT EDU

I'm having trouble compiling f2c with djgpp 1.11 - I thought I had it
working with 1.10 but now I think that my fortran answers were bogus.

The trouble is that f2c.h defines abs(x) as a macro.  After that "std.h"
is included and defines it as an "int abs(int)".  f2c needs the macro
construction since this works for both int's and float's.

It is interesting to note that linux uses gcc and the compilation works
correctly.  There is no "std.h".  The prototype for abs is in stdlib.h.
(where it's supposed to be according to the ANSI C K&R book?)

Any idea how to solve this?  Do 9 system headers files need to be reworked
so that std.h does not include the kitchen sink in them?  What IS 
standard anyways?

(I thought I had this working under 1.10 by deleting the abs macro in f2c.h.
Now I think that the abs function used on floats was failing.)

------------------------------------------------------------------------------
Paul Kirschner                                       #include <disclaimer.std>
pek AT logos DOT res DOT utc DOT com
United Technologies Research Center

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019