This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
gfc_offset question (32 vs. 64 bits)
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: fortran at gcc dot gnu dot org
- Date: Tue, 14 Dec 2004 09:33:02 -0800 (PST)
- Subject: gfc_offset question (32 vs. 64 bits)
- Reply-to: sje at cup dot hp dot com
While fixing a couple of bugs in the gfortran library involving IO
I noticed that gfc_offset is set to off_t (if off_t exists). On the
platform I am running (ia64-hp-hpux11.23) this is a 64 bit value.
The FORTRAN compiler on this system currently defaults to using a 32 bit
value here so unformatted sequential files created by the two compilers
are incompatible.
I would like to have the GNU fortran compiler use a 32 bit gfc_offset on
this platform so it will be compatible with the system fortran compiler.
Does anyone have any advice on how this could/should be done? I guess
the simplest way would be to put an ifdef in the libgfortran.h file. Or
one could put something in the configure script that could set
gfc_offset based on the target OS/CPU. Or one could have a config/cpu
directory like listdc++-v3 has.
Opinions?
Steve Ellcey
sje@cup.hp.com