From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5cf735edaa2e4dca1f8c573f73ac0432.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199610292231.RAA06687@ulexite.nist.gov> Date: Tue, 29 Oct 1996 17:31:42 -0500 From: Michael J. Donahue Subject: Re: f2c and 4-byte integers >> Sorry if I'm overlooking something obvious, but how do I get f2c to >> map INTEGER*4 to 4-byte integers on Linux/AXP? > >This is broken. I was posting in the past on the topic but without >a trace of a comment from anybody. It may, or may not, have also >an impact on a performance. AFAIK nobody was doing testing. > >Why exectly you need that? There are some workarounds. There are 2 issues: 1) I'm working with mixed C/fortran code across several platforms. On the Linux/AXP system the fortran code is being built through f2c, but elsewhere it is compiled using f77. When the C code calls the fortran code, it has to know what size variable to send (call by address). 2) Presumably the fortran code is taking a performance hit when it is working with 8-byte integers instead of 4-byte. I guess I could handle the first problem by #define'ing a constant at compile time specifying whether I'm linking with an f2c or an f77 built object, and adjusting the function calls appropriately. This is painful and ugly, and is also dangerous since AFAIK I can't get the compiler/linker to insure that the C and fortran code are in agreement. I suspect issue 2 is minor for my particular code, but I haven't tested it. -mike michael.donahue@nist.gov -- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null