diff options
| author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2006-07-03 14:59:05 (GMT) |
|---|---|---|
| committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2006-07-03 14:59:05 (GMT) |
| commit | 74c3ea0a0f6599da7dd9a502b5a66aeb9512d8c3 (patch) | |
| tree | 910adede1919c53bd243bbdf5fb2a62c5478fa0a /Objects/fileobject.c | |
| parent | 2eda1b78f9b3d03260445dc1bdbae477cb3e5885 (diff) | |
| download | cpython-74c3ea0a0f6599da7dd9a502b5a66aeb9512d8c3.zip cpython-74c3ea0a0f6599da7dd9a502b5a66aeb9512d8c3.tar.gz cpython-74c3ea0a0f6599da7dd9a502b5a66aeb9512d8c3.tar.bz2 | |
Fix build problems with the platform SDK on windows. It is not sufficient to test for the C compiler version when determining if we have the secure CRT from microsoft. Must test with an undocumented macro, __STDC_SECURE_LIB__ too.
Diffstat (limited to 'Objects/fileobject.c')
| -rw-r--r-- | Objects/fileobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 050146a..76b7da6 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -241,7 +241,7 @@ open_the_file(PyFileObject *f, char *name, char *mode) } if (f->f_fp == NULL) { -#if defined _MSC_VER && _MSC_VER < 1400 +#if defined _MSC_VER && (_MSC_VER < 1400 || !defined(__STDC_SECURE_LIB__)) /* MSVC 6 (Microsoft) leaves errno at 0 for bad mode strings, * across all Windows flavors. When it sets EINVAL varies * across Windows flavors, the exact conditions aren't |
