]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Two improvements to large file support:
authorGuido van Rossum <guido@python.org>
Thu, 1 Mar 2001 18:26:53 +0000 (18:26 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 1 Mar 2001 18:26:53 +0000 (18:26 +0000)
commit4f53da07bf79b98c4131fcb9a49e6987298973a7
tree463b7294c4fbfd1d418e9b87fe89d8517dac2e99
parentd1e87a8288b18541ab555fc95ab94d06758015a0
Two improvements to large file support:

- In _portable_ftell(), try fgetpos() before ftello() and ftell64().
  I ran into a situation on a 64-bit capable Linux where the C
  library's ftello() and ftell64() returned negative numbers despite
  fpos_t and off_t both being 64-bit types; fgetpos() did the right
  thing.

- Define a new typedef, Py_off_t, which is either fpos_t or off_t,
  depending on which one is 64 bits.  This removes the need for a lot
  of #ifdefs later on.  (XXX Should this be moved to pyport.h?  That
  file currently seems oblivious to large fille support, so for now
  I'll leave it here where it's needed.)
Objects/fileobject.c