[Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.198,2.199
Tim Peters
tim_one@users.sourceforge.net
Wed, 05 Sep 2001 17:32:17 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv19489/python/Modules
Modified Files:
posixmodule.c
Log Message:
Enable large file support on Win32 systems.
Curious: the MS docs say stati64 etc are supported even on Win95, but
Win95 doesn't support a filesystem that allows partitions > 2 Gb.
test_largefile: This was opening its test file in text mode. I have no
idea how that worked under Win64, but it sure needs binary mode on Win98.
BTW, on Win98 test_largefile runs quickly (under a second).
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.198
retrieving revision 2.199
diff -C2 -d -r2.198 -r2.199
*** posixmodule.c 2001/08/29 21:37:09 2.198
--- posixmodule.c 2001/09/06 00:32:15 2.199
***************
*** 265,269 ****
/* choose the appropriate stat and fstat functions and return structs */
#undef STAT
! #ifdef MS_WIN64
# define STAT _stati64
# define FSTAT _fstati64
--- 265,269 ----
/* choose the appropriate stat and fstat functions and return structs */
#undef STAT
! #if defined(MS_WIN64) || defined(MS_WIN32)
# define STAT _stati64
# define FSTAT _fstati64
***************
*** 3492,3496 ****
{
int fd, how;
! #ifdef MS_WIN64
LONG_LONG pos, res;
#else
--- 3492,3496 ----
{
int fd, how;
! #if defined(MS_WIN64) || defined(MS_WIN32)
LONG_LONG pos, res;
#else
***************
*** 3519,3523 ****
Py_BEGIN_ALLOW_THREADS
! #ifdef MS_WIN64
res = _lseeki64(fd, pos, how);
#else
--- 3519,3523 ----
Py_BEGIN_ALLOW_THREADS
! #if defined(MS_WIN64) || defined(MS_WIN32)
res = _lseeki64(fd, pos, how);
#else