summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-06-13 00:42:22 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-06-13 00:42:22 (GMT)
commita4dd2e20e2302cc41a027cae5d0057dc2dff2ba6 (patch)
treec70e9c1bfc706b80cdd7e9343a13e41136ac99ef /PC
parent114f7e5ffff86daef0a9e9802317e7b259c447f9 (diff)
downloadcpython-a4dd2e20e2302cc41a027cae5d0057dc2dff2ba6.zip
cpython-a4dd2e20e2302cc41a027cae5d0057dc2dff2ba6.tar.gz
cpython-a4dd2e20e2302cc41a027cae5d0057dc2dff2ba6.tar.bz2
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.dsp4
-rw-r--r--PC/VC6/pythoncore.dsp4
-rwxr-xr-xPC/msvcrtmodule.c12
-rw-r--r--PC/pyconfig.h7
4 files changed, 16 insertions, 11 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 992f816..1fc2a38 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
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
index e110ed8..95e369b 100755
--- a/PC/msvcrtmodule.c
+++ b/PC/msvcrtmodule.c
@@ -143,6 +143,7 @@ msvcrt_getch(PyObject *self, PyObject *args)
return PyString_FromStringAndSize(s, 1);
}
+#ifdef _WCONIO_DEFINED
static PyObject *
msvcrt_getwch(PyObject *self, PyObject *args)
{
@@ -158,6 +159,7 @@ msvcrt_getwch(PyObject *self, PyObject *args)
u[0] = ch;
return PyUnicode_FromUnicode(u, 1);
}
+#endif
static PyObject *
msvcrt_getche(PyObject *self, PyObject *args)
@@ -175,6 +177,7 @@ msvcrt_getche(PyObject *self, PyObject *args)
return PyString_FromStringAndSize(s, 1);
}
+#ifdef _WCONIO_DEFINED
static PyObject *
msvcrt_getwche(PyObject *self, PyObject *args)
{
@@ -190,6 +193,7 @@ msvcrt_getwche(PyObject *self, PyObject *args)
s[0] = ch;
return PyUnicode_FromUnicode(s, 1);
}
+#endif
static PyObject *
msvcrt_putch(PyObject *self, PyObject *args)
@@ -204,7 +208,7 @@ msvcrt_putch(PyObject *self, PyObject *args)
return Py_None;
}
-
+#ifdef _WCONIO_DEFINED
static PyObject *
msvcrt_putwch(PyObject *self, PyObject *args)
{
@@ -223,6 +227,7 @@ msvcrt_putwch(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
+#endif
static PyObject *
msvcrt_ungetch(PyObject *self, PyObject *args)
@@ -238,6 +243,7 @@ msvcrt_ungetch(PyObject *self, PyObject *args)
return Py_None;
}
+#ifdef _WCONIO_DEFINED
static PyObject *
msvcrt_ungetwch(PyObject *self, PyObject *args)
{
@@ -251,6 +257,7 @@ msvcrt_ungetwch(PyObject *self, PyObject *args)
Py_INCREF(Py_None);
return Py_None;
}
+#endif
static void
insertint(PyObject *d, char *name, int value)
@@ -279,11 +286,12 @@ static struct PyMethodDef msvcrt_functions[] = {
{"getche", msvcrt_getche, METH_VARARGS},
{"putch", msvcrt_putch, METH_VARARGS},
{"ungetch", msvcrt_ungetch, METH_VARARGS},
+#ifdef _WCONIO_DEFINED
{"getwch", msvcrt_getwch, METH_VARARGS},
{"getwche", msvcrt_getwche, METH_VARARGS},
{"putwch", msvcrt_putwch, METH_VARARGS},
{"ungetwch", msvcrt_ungetwch, METH_VARARGS},
-
+#endif
{NULL, NULL}
};
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 98d79ad..93dbc09 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -467,13 +467,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