[Python-bugs-list] [ python-Bugs-407915 ] largefile support under Linux
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 21 Mar 2001 16:08:42 -0800
Bugs item #407915, was updated on 2001-03-12 06:43
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=407915&group_id=5470
Category: Build
Group: Platform-specific
Status: Open
>Priority: 3
Submitted By: Hans-Joachim Widmaier (hjwidmai)
Assigned to: Guido van Rossum (gvanrossum)
Summary: largefile support under Linux
Initial Comment:
While trying to build 2.1b1 with support for large
files under Linux (2.4, glibc 2.2),
Objects/fileobject.c didn't compile:
gcc -D_FILE_OFFSET_BITS=64 -c -g -O2 -Wall
-Wstrict-prototypes -I. -I./Include -DHAVE_CONFIG_H -o
Objects/fileobject.o Objects/fileobject.c
Objects/fileobject.c: In function `_portable_ftell':
Objects/fileobject.c:267: incompatible types in return
Objects/fileobject.c:275: warning: control reaches end
of non-void function
This is because fpos_t is a structure holding 2 long
longs. After changing
return pos
to
return pos.__pos
I got it to compile and it seems to work ok.
This is, of course, not a portable solution.
Alas, I don't really understand why there are 3 Methods
of getting largefile support (/usr/include/feature.h)
in glibc, even less why I'm bothered with defining
CFLAGS to get it; but configure seems unable to figure
out that itself. But this is not Python's fault.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-03-20 10:45
Message:
Logged In: YES
user_id=6380
Sigh. You can't win with this stuff!
Try this for now:
http://python.sourceforge.net/devel-docs/lib/posix-large-files.html
It suggests to add -D_LARGEFILE64_SOURCE which makes fpos a
long long.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=407915&group_id=5470