GNU Info

Info Node: (python2.1-lib.info)Large File Support

(python2.1-lib.info)Large File Support


Next: Module Contents Prev: posix Up: posix
Enter node , (file) or (file)node

Large File Support
------------------

This manual section was written by Steve Clift <clift@mail.anacapa.net>.
Several operating systems (including AIX, HPUX, Irix and Solaris)
provide support for files that are larger than 2 Gb from a C
programming model where `int' and `long' are 32-bit values. This is
typically accomplished by defining the relevant size and offset types
as 64-bit values. Such files are sometimes referred to as "large files".

Large file support is enabled in Python when the size of an `off_t' is
larger than a `long' and the `long long' type is available and is at
least as large as an `off_t'. Python longs are then used to represent
file sizes, offsets and other values that can exceed the range of a
Python int. It may be necessary to configure and compile Python with
certain compiler flags to enable this mode. For example, it is enabled
by default with recent versions of Irix, but with Solaris 2.6 and 2.7
you need to do something like:

     CC="cc `getconf LFS_CFLAGS`" ./configure

On large-file-capable Linux systems, this might work:

     CC='gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure


automatically generated by info2www version 1.2.2.9