This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Fortran, committed to trunk] Preparing libf2c/libI77 for 64-bitfile sizes.


On Sun, 1 Jul 2001, Toon Moene wrote:

> To fix this shortcoming, I first updated all variables indicating file
> offsets to type `off_t'.  It is my understanding that configure will
> automatically convert `off_t' to `long' on systems that do not define
> `off_t'.

You also need to use the fseeko and ftello functions rather than fseek and
ftell (since fseek and ftell take long not off_t).

> Subsequently, I wanted to compile the libf2c/libI77 routines with
> preprocessor flags that enable 64-bit file operations.  Unfortunately, I
> couldn't get the obvious -D__USE_FILE_OFFSET64 and -D__USE_LARGEFILE64
> (Debian 2.2) to work.  Perhaps someone could kindly mail me an example
> ?  TIA.

Look at the comments in <features.h> - you probably want
-D_XOPEN_SOURCE=500L -D_FILE_OFFSET_BITS=64 (the latter being `getconf
LFS_CFLAGS`).  (Under GNU/Linux on 32-bit systems, you may also need glibc
2.2 and kernel 2.4 to use large files effectively.)

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]