summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.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/socketmodule.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/socketmodule.c')
-rw-r--r--Modules/socketmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index bd0a20a..0fd14ab 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -2553,7 +2553,7 @@ sock_recv_guts(PySocketSockObject *s, char* cbuf, Py_ssize_t len, int flags)
Py_BEGIN_ALLOW_THREADS
timeout = internal_select_ex(s, 0, interval);
if (!timeout) {
-#if defined(MS_WIN64) || defined(MS_WINDOWS)
+#ifdef MS_WINDOWS
if (len > INT_MAX)
len = INT_MAX;
outlen = recv(s->sock_fd, cbuf, (int)len, flags);
@@ -3251,7 +3251,7 @@ sock_send(PySocketSockObject *s, PyObject *args)
if (!timeout) {
#ifdef __VMS
n = sendsegmented(s->sock_fd, buf, len, flags);
-#elif defined(MS_WIN64) || defined(MS_WINDOWS)
+#elif defined(MS_WINDOWS)
if (len > INT_MAX)
len = INT_MAX;
n = send(s->sock_fd, buf, (int)len, flags);
@@ -3308,7 +3308,7 @@ sock_sendall(PySocketSockObject *s, PyObject *args)
if (!timeout) {
#ifdef __VMS
n = sendsegmented(s->sock_fd, buf, len, flags);
-#elif defined(MS_WIN64) || defined(MS_WINDOWS)
+#elif defined(MS_WINDOWS)
if (len > INT_MAX)
len = INT_MAX;
n = send(s->sock_fd, buf, (int)len, flags);
@@ -3407,7 +3407,7 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
Py_BEGIN_ALLOW_THREADS
timeout = internal_select_ex(s, 1, interval);
if (!timeout) {
-#if defined(MS_WIN64) || defined(MS_WINDOWS)
+#ifdef MS_WINDOWS
if (len > INT_MAX)
len = INT_MAX;
n = sendto(s->sock_fd, buf, (int)len, flags,