This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR25289 Cannot handle record numbers large than huge(0_4)
- From: "DeLisle, Jerry V" <Jerry_V_DeLisle at RL dot gov>
- To: <fortran at gcc dot gnu dot org>
- Date: Wed, 21 Jun 2006 12:27:51 -0700
- Subject: Re: [Patch, fortran] PR25289 Cannot handle record numbers large than huge(0_4)
Previously written:
> > If I use gfc_get_int_type (sizeof(off64_t)) all appears to work
fine.
> > Is it safe to assume off64_t is defined for all targets of interest?
>
> You cannot do that kind of things anyhow, because the host off64_t
> (which will be used when the front-end is compiled) might not have the
> same size as the target off64_t (which will be used for the library).
Err, AFAIK off64_t is pretty much defined to be 64 bits. But the
problem is that it's only available on platforms which have LFS
support.
-----------------------------
I have been digging around a bit on this. I have not discovered how to
determine on the frontend side what the target has. I think thet
./configure must check for __USE_LARGEFILE and set a parameter that is
checked when the frontend is compiled.
In fact it bothers me that off_t has two different sizes on my platform
here. It is 64 bit on the library side and 32 on the compiler side.
Off_t or off64_t should be consistant on a platform that is building for
itself.
However, I can test for __USE_LARGEFILE as it is currently defined and
use that to gfc_get_int_type (8) or (4) and this works on my machine
here without redefining gfc_offset in libgfortran.h. If LFS is not
available I use (4) which is what is being used now and is safe.
This is a case where the tree is easy to see, but the forest is
difficult. I will keep plowing around on this and will gladly except any
hints or direction from others.
My lunch break is about over.
Best regards,
Jerry