Some VS 6.0 compatibility fixes from Hirokazu Yamamoto which are also… · pythoncapi/cpython@c36625b · GitHub
Skip to content

Commit c36625b

Browse files
committed
Some VS 6.0 compatibility fixes from Hirokazu Yamamoto which are also useful for later versions of MSVC. VS6 claims that fortran is a reserved word
1 parent 8fd7b0c commit c36625b

6 files changed

Lines changed: 19 additions & 6 deletions

File tree

Include/abstract.h

Lines changed: 5 additions & 5 deletions

Modules/errnomodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
/* Windows socket errors (WSA*) */
77
#ifdef MS_WINDOWS
8+
#define WIN32_LEAN_AND_MEAN
89
#include <winsock.h>
910
#endif
1011

Modules/selectmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ extern void bzero(void *, int);
4444
#endif
4545

4646
#ifdef MS_WINDOWS
47+
# define WIN32_LEAN_AND_MEAN
4748
# include <winsock.h>
4849
#else
4950
# define SOCKET int

Modules/socketmodule.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# define HAVE_GETNAMEINFO
2323
# define ENABLE_IPV6
2424
#else
25+
# define WIN32_LEAN_AND_MEAN
2526
# include <winsock.h>
2627
#endif
2728
#endif

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3530,7 +3530,7 @@ long_getnewargs(PyLongObject *v)
35303530

35313531
static PyObject *
35323532
long_getN(PyLongObject *v, void *context) {
3533-
return PyLong_FromLong((intptr_t)context);
3533+
return PyLong_FromLong((Py_intptr_t)context);
35343534
}
35353535

35363536
static PyObject *

PC/msvcrtmodule.c

Lines changed: 10 additions & 0 deletions

0 commit comments

Comments
 (0)