Opened 19 years ago

Last modified 19 years ago

#780 closed defect (wontfix)

linux + largefile cpl_config.h problems

Reported by: bolsen@… Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords: VERIFIED
Cc:

Description

After running

./configure --with-unix-stdio-64=yes

on linux (gentoo unstable, fedora core 2 & 3)

I end up having to edit port/cpl_config.h
Starting line 134

/* Define to 1, if you have fseek64 */
- #define VSI_FSEEK64 fseek64
+ #define VSI_FSEEK64 fseeko

/* Define to 1, if you have ftell64 */
- #define VSI_FTELL64 ftell64
+ #define VSI_FTELL64 ftello

/* Define to 1, if you have 64 bit STDIO API */
#define VSI_LARGE_API_SUPPORTED 1

/* Define to 1, if you have LARGEFILE64_SOURCE */
- /* #undef VSI_NEED_LARGEFILE64_SOURCE */
+ #define VSI_NEED_LARGEFILE64_SOURCE 1

Change History (2)

comment:1 by warmerdam, 19 years ago

Brian,

I think the problem here is that explicitly setting --with-unix-stdio-64
to yes on the configure commandline tells configure to use "64" version
of stdio functions without any further checking.  That is appropriate on a
few problem systems like IRIX, but not appropriate on Linux.  On Linux
you should just let it autodetect the correct 64bit options. 

I realize the configure options are *not* documented and so it can be hard
to know how to use them. 

I am closing this for now, though this area could definately be more
bullet proof.

comment:2 by bolsen@…, 19 years ago

I caused this problem initially trying to deal with another bug (6+GB img files).
The hand hacks below actually caused some error condition on amd64 fedora core 3
running i386 compatibility with file seek between 2GB & 4GB.  Reconfiguring as
suggested seemed to resolve this issue.
Note: See TracTickets for help on using tickets.