summaryrefslogtreecommitdiffstats
path: root/Modules/errnomodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/errnomodule.c')
-rw-r--r--Modules/errnomodule.c67
1 files changed, 35 insertions, 32 deletions
diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c
index 301ad83..25cd7e9 100644
--- a/Modules/errnomodule.c
+++ b/Modules/errnomodule.c
@@ -1,41 +1,44 @@
-
/* Errno module */
+// Need PyModuleDef_Slot added to limited C API version 3.5
+#define Py_LIMITED_API 0x03050000
+
#include "Python.h"
/* Windows socket errors (WSA*) */
#ifdef MS_WINDOWS
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-/* The following constants were added to errno.h in VS2010 but have
- preferred WSA equivalents. */
-#undef EADDRINUSE
-#undef EADDRNOTAVAIL
-#undef EAFNOSUPPORT
-#undef EALREADY
-#undef ECONNABORTED
-#undef ECONNREFUSED
-#undef ECONNRESET
-#undef EDESTADDRREQ
-#undef EHOSTUNREACH
-#undef EINPROGRESS
-#undef EISCONN
-#undef ELOOP
-#undef EMSGSIZE
-#undef ENETDOWN
-#undef ENETRESET
-#undef ENETUNREACH
-#undef ENOBUFS
-#undef ENOPROTOOPT
-#undef ENOTCONN
-#undef ENOTSOCK
-#undef EOPNOTSUPP
-#undef EPROTONOSUPPORT
-#undef EPROTOTYPE
-#undef ETIMEDOUT
-#undef EWOULDBLOCK
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+
+ // The following constants were added to errno.h in VS2010 but have
+ // preferred WSA equivalents.
+# undef EADDRINUSE
+# undef EADDRNOTAVAIL
+# undef EAFNOSUPPORT
+# undef EALREADY
+# undef ECONNABORTED
+# undef ECONNREFUSED
+# undef ECONNRESET
+# undef EDESTADDRREQ
+# undef EHOSTUNREACH
+# undef EINPROGRESS
+# undef EISCONN
+# undef ELOOP
+# undef EMSGSIZE
+# undef ENETDOWN
+# undef ENETRESET
+# undef ENETUNREACH
+# undef ENOBUFS
+# undef ENOPROTOOPT
+# undef ENOTCONN
+# undef ENOTSOCK
+# undef EOPNOTSUPP
+# undef EPROTONOSUPPORT
+# undef EPROTOTYPE
+# undef ETIMEDOUT
+# undef EWOULDBLOCK
#endif
/*