From: Arjen M. <arj...@wl...> - 2004-01-07 07:47:14
|
"Alan W. Irwin" wrote: > > On 2004-01-06 16:54-0800 Alan W. Irwin wrote: > > > * fortran single precision.... (I plan to do this tomorrow) > > Actually, I finished this tonight. configure --without-double turned up one > C++ example compile problem under these conditions (which shows how little > we use this single-precision option any more) I have a real need for it though ;) As for the underscore problem: I know that Burkhard Burow who developed the tool "cfortran.h" ran into this same problem (it seems to originate with f2c, a FORTRAN 77 to C translation program). His recommendation is to use the C side of the interface to solve the issue (it is well beyond the capabilities of C preprocessors). So you need to define either a macro with the trailing double underscores or to define an extra C routine which just calls the version with a single one ... Given the current set-up (Fortran programs call stubs to the actual C routines) it should be simple to solve this: for these compilers: #define FNAMEU(x,y) y##__ otherwise: #define FNAMEU(x,y) y##_ This introduces an extra STUB_LINKAGE case, but it keeps the Fortran names identical to the C ones. Regards, Arjen |