diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-09-06 00:32:15 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-09-06 00:32:15 (GMT) |
commit | 6e13a562ae01a962612ca76f9afcc7211240236e (patch) | |
tree | 272a23269db39f82d12388554cac8497f2dc4bab /Modules/posixmodule.c | |
parent | 97f4a33e125dc14c72070bbf38f723aaa26b9df7 (diff) | |
download | cpython-6e13a562ae01a962612ca76f9afcc7211240236e.zip cpython-6e13a562ae01a962612ca76f9afcc7211240236e.tar.gz cpython-6e13a562ae01a962612ca76f9afcc7211240236e.tar.bz2 |
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).
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 5f6f21d..0b4b765 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -264,7 +264,7 @@ extern int lstat(const char *, struct stat *); /* choose the appropriate stat and fstat functions and return structs */ #undef STAT -#ifdef MS_WIN64 +#if defined(MS_WIN64) || defined(MS_WIN32) # define STAT _stati64 # define FSTAT _fstati64 # define STRUCT_STAT struct _stati64 @@ -3491,7 +3491,7 @@ static PyObject * posix_lseek(PyObject *self, PyObject *args) { int fd, how; -#ifdef MS_WIN64 +#if defined(MS_WIN64) || defined(MS_WIN32) LONG_LONG pos, res; #else off_t pos, res; @@ -3518,7 +3518,7 @@ posix_lseek(PyObject *self, PyObject *args) return NULL; Py_BEGIN_ALLOW_THREADS -#ifdef MS_WIN64 +#if defined(MS_WIN64) || defined(MS_WIN32) res = _lseeki64(fd, pos, how); #else res = lseek(fd, pos, how); |