gfc_offset question (32 vs. 64 bits)
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Tue Dec 14 17:55:00 GMT 2004
Steve Ellcey wrote:
> 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?
there have been discussion of related issues before:
http://gcc.gnu.org/ml/fortran/2004-06/msg00172.html
http://gcc.gnu.org/ml/fortran/2004-10/msg00002.html
http://gcc.gnu.org/ml/fortran/2004-10/msg00008.html
Maybe there are more threads where this was discussed, I also didn't find the
mail Bud refers to in the first link.
Hope this helps,
- Tobi
More information about the Fortran
mailing list