summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-06-24 22:37:25 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-06-24 22:37:25 (GMT)
commit14b9b110982fd7f00392b898230c4015bd2bdaaa (patch)
tree77ed33b8f8db6c8b91fd253978ea5bc8c859bca6 /Modules/posixmodule.c
parentb28a375f2f4724c129e8683f548c8f1477e00a68 (diff)
downloadcpython-14b9b110982fd7f00392b898230c4015bd2bdaaa.zip
cpython-14b9b110982fd7f00392b898230c4015bd2bdaaa.tar.gz
cpython-14b9b110982fd7f00392b898230c4015bd2bdaaa.tar.bz2
If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index baad299..fd4628c 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -361,7 +361,7 @@ static int win32_can_symlink = 0;
#undef STAT
#undef FSTAT
#undef STRUCT_STAT
-#if defined(MS_WIN64) || defined(MS_WINDOWS)
+#ifdef MS_WINDOWS
# define STAT win32_stat
# define LSTAT win32_lstat
# define FSTAT win32_fstat
@@ -7425,7 +7425,7 @@ static PyObject *
posix_lseek(PyObject *self, PyObject *args)
{
int fd, how;
-#if defined(MS_WIN64) || defined(MS_WINDOWS)
+#ifdef MS_WINDOWS
PY_LONG_LONG pos, res;
#else
off_t pos, res;
@@ -7453,7 +7453,7 @@ posix_lseek(PyObject *self, PyObject *args)
if (!_PyVerify_fd(fd))
return posix_error();
Py_BEGIN_ALLOW_THREADS
-#if defined(MS_WIN64) || defined(MS_WINDOWS)
+#ifdef MS_WINDOWS
res = _lseeki64(fd, pos, how);
#else
res = lseek(fd, pos, how);
@@ -7659,7 +7659,7 @@ posix_write(PyObject *self, PyObject *args)
}
len = pbuf.len;
Py_BEGIN_ALLOW_THREADS
-#if defined(MS_WIN64) || defined(MS_WINDOWS)
+#ifdef MS_WINDOWS
if (len > INT_MAX)
len = INT_MAX;
size = write(fd, pbuf.buf, (int)len);