blob: 3bd8817c781e67fee9692fd88ad2ad9cca71d275 [file] [log] [blame]
diff -aur DD13\python\Python-2.7.10\Include\fileobject.h D13\python\Python-2.7.10\Include\fileobject.h
--- DD13\python\Python-2.7.10\Include\fileobject.h 2015-05-23 09:08:59.000000000 -0700
+++ D13\python\Python-2.7.10\Include\fileobject.h 2016-02-01 07:44:58.584039000 -0800
@@ -70,16 +70,13 @@
*/
int _PyFile_SanitizeMode(char *mode);
-#if defined _MSC_VER && _MSC_VER >= 1400
+#if defined _MSC_VER && _MSC_VER < 1900
/* A routine to check if a file descriptor is valid on Windows. Returns 0
* and sets errno to EBADF if it isn't. This is to avoid Assertions
* from various functions in the Windows CRT beginning with
* Visual Studio 2005
*/
int _PyVerify_fd(int fd);
-#elif defined _MSC_VER && _MSC_VER >= 1200
-/* fdopen doesn't set errno EBADF and crashes for large fd on debug build */
-#define _PyVerify_fd(fd) (_get_osfhandle(fd) >= 0)
#else
#define _PyVerify_fd(A) (1) /* dummy */
#endif
diff -aur DD13\python\Python-2.7.10\Modules\posixmodule.c D13\python\Python-2.7.10\Modules\posixmodule.c
--- DD13\python\Python-2.7.10\Modules\posixmodule.c 2015-05-23 09:09:20.000000000 -0700
+++ D13\python\Python-2.7.10\Modules\posixmodule.c 2016-02-01 07:45:21.684348800 -0800
@@ -529,7 +529,7 @@
#endif
-#if defined _MSC_VER && _MSC_VER >= 1400
+#if defined _MSC_VER && _MSC_VER < 1900
/* Microsoft CRT in VS2005 and higher will verify that a filehandle is
* valid and raise an assertion if it isn't.
* Normally, an invalid fd is likely to be a C program error and therefore
@@ -619,7 +619,7 @@
}
#else
/* dummy version. _PyVerify_fd() is already defined in fileobject.h */
-#define _PyVerify_fd_dup2(A, B) (1)
+#define _PyVerify_fd_dup2(fd1, fd2) (_PyVerify_fd(fd1) && (fd2) >= 0)
#endif
/* Return a dictionary corresponding to the POSIX environment table */
diff -aur DD13/python/Python-2.7.10/Modules/timemodule.c D13/python/Python-2.7.10/Modules/timemodule.c
--- DD13/python/Python-2.7.10/Modules/timemodule.c 2015-05-23 09:09:21.000000000 -0700
+++ D13/python/Python-2.7.10/Modules/timemodule.c 2016-02-01 07:08:57.757978000 -0800
@@ -710,7 +710,7 @@
#ifdef PYOS_OS2
PyModule_AddIntConstant(m, "timezone", _timezone);
#else /* !PYOS_OS2 */
- PyModule_AddIntConstant(m, "timezone", timezone);
+ PyModule_AddIntConstant(m, "timezone", _timezone);
#endif /* PYOS_OS2 */
#ifdef HAVE_ALTZONE
PyModule_AddIntConstant(m, "altzone", altzone);
@@ -718,12 +718,12 @@
#ifdef PYOS_OS2
PyModule_AddIntConstant(m, "altzone", _timezone-3600);
#else /* !PYOS_OS2 */
- PyModule_AddIntConstant(m, "altzone", timezone-3600);
+ PyModule_AddIntConstant(m, "altzone", _timezone-3600);
#endif /* PYOS_OS2 */
#endif
- PyModule_AddIntConstant(m, "daylight", daylight);
+ PyModule_AddIntConstant(m, "daylight", _daylight);
PyModule_AddObject(m, "tzname",
- Py_BuildValue("(zz)", tzname[0], tzname[1]));
+ Py_BuildValue("(zz)", _tzname[0], _tzname[1]));
#else /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
#ifdef HAVE_STRUCT_TM_TM_ZONE
{