diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-06-13 01:09:34 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-06-13 01:09:34 (GMT) |
commit | 3d17a5c5aec27ad483f68f36855ee9761181857f (patch) | |
tree | fb85759d072a4deb86b2460d9de5fec69b0a2a0a /PC | |
parent | e68df0fbe51fc6980d48265e85664341f74fc9eb (diff) | |
download | cpython-3d17a5c5aec27ad483f68f36855ee9761181857f.zip cpython-3d17a5c5aec27ad483f68f36855ee9761181857f.tar.gz cpython-3d17a5c5aec27ad483f68f36855ee9761181857f.tar.bz2 |
Merged revisions 64214 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64214 | amaury.forgeotdarc | 2008-06-13 02:42:22 +0200 (ven., 13 juin 2008) | 6 lines
Restore support for Microsoft VC6 compiler.
Some functions in the msvcrt module are skipped,
and socket.ioctl is enabled only when using a more recent Platform SDK.
(and yes, there are still companies that use a 10-years old compiler)
........
Diffstat (limited to 'PC')
-rw-r--r-- | PC/VC6/_socket.dsp | 4 | ||||
-rw-r--r-- | PC/VC6/pythoncore.dsp | 28 | ||||
-rw-r--r-- | PC/getpathp.c | 3 | ||||
-rwxr-xr-x | PC/msvcrtmodule.c | 11 | ||||
-rw-r--r-- | PC/pyconfig.h | 7 |
5 files changed, 16 insertions, 37 deletions
diff --git a/PC/VC6/_socket.dsp b/PC/VC6/_socket.dsp index 85d2bf0..4e84055 100644 --- a/PC/VC6/_socket.dsp +++ b/PC/VC6/_socket.dsp @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /base:"0x1e1D0000" /subsystem:windows /dll /debug /machine:I386 /out:"./_socket.pyd"
+# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /base:"0x1e1D0000" /subsystem:windows /dll /debug /machine:I386 /out:"./_socket.pyd"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "_socket - Win32 Debug"
@@ -82,7 +82,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /base:"0x1e1D0000" /subsystem:windows /dll /debug /machine:I386 /out:"./_socket_d.pyd" /pdbtype:sept
+# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /base:"0x1e1D0000" /subsystem:windows /dll /debug /machine:I386 /out:"./_socket_d.pyd" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
diff --git a/PC/VC6/pythoncore.dsp b/PC/VC6/pythoncore.dsp index fde4be3..80d0220 100644 --- a/PC/VC6/pythoncore.dsp +++ b/PC/VC6/pythoncore.dsp @@ -97,6 +97,10 @@ SOURCE=..\..\Modules\_bisectmodule.c # End Source File
# Begin Source File
+SOURCE=..\..\Modules\_bytesio.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Modules\cjkcodecs\_codecs_cn.c
# End Source File
# Begin Source File
@@ -137,10 +141,6 @@ SOURCE=..\..\Modules\_fileio.c # End Source File
# Begin Source File
-SOURCE=..\..\Modules\_bytesio.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Modules\_functoolsmodule.c
# End Source File
# Begin Source File
@@ -245,6 +245,10 @@ SOURCE=..\..\Objects\boolobject.c # End Source File
# Begin Source File
+SOURCE=..\..\Objects\bytearrayobject.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Objects\bytes_methods.c
# End Source File
# Begin Source File
@@ -281,10 +285,6 @@ SOURCE=..\..\Objects\codeobject.c # End Source File
# Begin Source File
-SOURCE=..\..\Modules\_collectionsmodule.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Python\compile.c
# End Source File
# Begin Source File
@@ -365,10 +365,6 @@ SOURCE=..\..\Objects\floatobject.c # End Source File
# Begin Source File
-SOURCE=..\..\Python\formatter_string.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Python\formatter_unicode.c
# End Source File
# Begin Source File
@@ -377,10 +373,6 @@ SOURCE=..\..\Objects\frameobject.c # End Source File
# Begin Source File
-SOURCE=..\..\Python\formatter_unicode.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Python\frozen.c
# End Source File
# Begin Source File
@@ -659,10 +651,6 @@ SOURCE=..\..\Objects\sliceobject.c # End Source File
# Begin Source File
-SOURCE=..\..\Objects\stringobject.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Python\structmember.c
# End Source File
# Begin Source File
diff --git a/PC/getpathp.c b/PC/getpathp.c index e2beec1..669ed9f 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -117,8 +117,7 @@ reduce(wchar_t *dir) static int exists(wchar_t *filename) { - struct _stat64 buf; - return _wstat64(filename, &buf) == 0; + return GetFileAttributesW(filename) != 0xFFFFFFFF; } /* Assumes 'filename' MAXPATHLEN+1 bytes long - diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c index 225121f..542b4f7 100755 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -145,7 +145,7 @@ msvcrt_getch(PyObject *self, PyObject *args) return PyBytes_FromStringAndSize(s, 1); } -#if _MSC_VER >= 1300 +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_getwch(PyObject *self, PyObject *args) { @@ -179,7 +179,7 @@ msvcrt_getche(PyObject *self, PyObject *args) return PyBytes_FromStringAndSize(s, 1); } -#if _MSC_VER >= 1300 +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_getwche(PyObject *self, PyObject *args) { @@ -210,8 +210,7 @@ msvcrt_putch(PyObject *self, PyObject *args) return Py_None; } - -#if _MSC_VER >= 1300 +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_putwch(PyObject *self, PyObject *args) { @@ -246,7 +245,7 @@ msvcrt_ungetch(PyObject *self, PyObject *args) return Py_None; } -#if _MSC_VER >= 1300 +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_ungetwch(PyObject *self, PyObject *args) { @@ -349,7 +348,7 @@ static struct PyMethodDef msvcrt_functions[] = { {"CrtSetReportMode", msvcrt_setreportmode, METH_VARARGS}, {"set_error_mode", msvcrt_seterrormode, METH_VARARGS}, #endif -#if _MSC_VER >= 1300 +#ifdef _WCONIO_DEFINED {"getwch", msvcrt_getwch, METH_VARARGS}, {"getwche", msvcrt_getwche, METH_VARARGS}, {"putwch", msvcrt_putwch, METH_VARARGS}, diff --git a/PC/pyconfig.h b/PC/pyconfig.h index 0a27ff0..987c326 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -463,13 +463,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ /* Define to `unsigned' if <sys/types.h> doesn't define. */ /* #undef size_t */ -/* Define to `int' if <sys/types.h> doesn't define. */ -#if _MSC_VER + 0 >= 1300 -/* VC.NET typedefs socklen_t in ws2tcpip.h. */ -#else -#define socklen_t int -#endif - /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 |