Index: trunk/Objects/intobject.c =================================================================== --- trunk/Objects/intobject.c (revision 60883) +++ trunk/Objects/intobject.c (working copy) @@ -1038,7 +1038,7 @@ static PyObject * int_getN(PyIntObject *v, void *context) { - return PyInt_FromLong((intptr_t)context); + return PyInt_FromLong((Py_intptr_t)context); } /* Convert an integer to the given base. Returns a string. Index: trunk/Objects/longobject.c =================================================================== --- trunk/Objects/longobject.c (revision 60883) +++ trunk/Objects/longobject.c (working copy) @@ -3378,7 +3378,7 @@ static PyObject * long_getN(PyLongObject *v, void *context) { - return PyLong_FromLong((intptr_t)context); + return PyLong_FromLong((Py_intptr_t)context); } static PyObject * Index: trunk/PC/VC6/pythoncore.dsp =================================================================== --- trunk/PC/VC6/pythoncore.dsp (revision 60883) +++ trunk/PC/VC6/pythoncore.dsp (working copy) @@ -329,6 +329,10 @@ # End Source File # Begin Source File +SOURCE=..\..\Parser\firstsets.c +# End Source File +# Begin Source File + SOURCE=..\..\Objects\floatobject.c # End Source File # Begin Source File @@ -406,10 +410,18 @@ # End Source File # Begin Source File +SOURCE=..\..\Parser\grammar.c +# End Source File +# Begin Source File + SOURCE=..\..\Parser\grammar1.c # End Source File # Begin Source File +SOURCE=..\..\Modules\zlib\gzio.c +# End Source File +# Begin Source File + SOURCE=..\..\Modules\imageop.c # End Source File # Begin Source File @@ -427,6 +439,10 @@ # End Source File # Begin Source File +SOURCE=..\..\Modules\zlib\infback.c +# End Source File +# Begin Source File + SOURCE=..\..\Modules\zlib\inffast.c # End Source File # Begin Source File @@ -571,6 +587,10 @@ # End Source File # Begin Source File +SOURCE=..\..\Python\pystrcmp.c +# End Source File +# Begin Source File + SOURCE=..\..\Python\pystrtod.c # End Source File # Begin Source File @@ -679,6 +699,10 @@ # End Source File # Begin Source File +SOURCE=..\..\Modules\zlib\uncompr.c +# End Source File +# Begin Source File + SOURCE=..\..\Objects\unicodectype.c # End Source File # Begin Source File Index: trunk/PC/VC6/_bsddb.dsp =================================================================== --- trunk/PC/VC6/_bsddb.dsp (revision 60883) +++ trunk/PC/VC6/_bsddb.dsp (working copy) @@ -54,7 +54,7 @@ # 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 ..\..\..\db-4.4.20\build_win32\Release\libdb44s.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"./_bsddb.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 ..\..\..\db-4.4.20\build_win32\Release\libdb44s.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /out:"./_bsddb.pyd" # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "_bsddb - Win32 Debug" Index: trunk/PC/VC6/python.dsp =================================================================== --- trunk/PC/VC6/python.dsp (revision 60883) +++ trunk/PC/VC6/python.dsp (working copy) @@ -77,6 +77,11 @@ # 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:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1d000000" /subsystem:console /debug /machine:I386 /out:"./python_d.exe" /pdbtype:sept # SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Changing stack size... +PostBuild_Cmds=editbin /STACK:0x200000 python_d.exe +# End Special Build Tool !ENDIF Index: trunk/PC/VC6/build_ssl.py =================================================================== --- trunk/PC/VC6/build_ssl.py (revision 60883) +++ trunk/PC/VC6/build_ssl.py (working copy) @@ -8,7 +8,7 @@ # directory. It is likely you will already find the zlib library and # any other external packages there. # * Install ActivePerl and ensure it is somewhere on your path. -# * Run this script from the PCBuild directory. +# * Run this script from the PC/VC6 directory. # # it should configure and build SSL, then build the ssl Python extension # without intervention. Index: trunk/PC/VC6/readme.txt =================================================================== --- trunk/PC/VC6/readme.txt (revision 60883) +++ trunk/PC/VC6/readme.txt (working copy) @@ -1,7 +1,9 @@ Building Python using VC++ 6.0 or 5.0 ------------------------------------- This directory is used to build Python for Win32 platforms, e.g. Windows -95, 98 and NT. It requires Microsoft Visual C++ 6.x or 5.x. +2000 and XP. It requires Microsoft Visual C++ 6.x or 5.x and Platform +SDK February 2003 Edition (Core SDK). You can download this SDK from +http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm. (For other Windows platforms and compilers, see ../readme.txt.) All you need to do is open the workspace "pcbuild.dsw" in MSVC++, select @@ -11,9 +13,7 @@ The proper order to build subprojects: 1) pythoncore (this builds the main Python DLL and library files, - python21.{dll, lib} in Release mode) - NOTE: in previous releases, this subproject was - named after the release number, e.g. python20. + python26.{dll, lib} in Release mode) 2) python (this builds the main Python executable, python.exe in Release mode) @@ -24,7 +24,7 @@ to the subsystems they implement; see SUBPROJECTS below) When using the Debug setting, the output files have a _d added to -their name: python21_d.dll, python_d.exe, parser_d.pyd, and so on. +their name: python26_d.dll, python_d.exe, pyexpat_d.pyd, and so on. SUBPROJECTS ----------- @@ -39,6 +39,8 @@ .exe pythonw pythonw.exe, a variant of python.exe that doesn't pop up a DOS box +_msi + _msi.c. You need to install Windows Installer SDK to build this module. _socket socketmodule.c _testcapi @@ -177,6 +179,17 @@ XXX threads are invisible to unittest). +_sqlite3 + Python wrapper for SQLite library. + + Get the source code through + + svn export http://svn.python.org/projects/external/sqlite-source-3.3.4 + + To use the extension module in a Python build tree, copy sqlite3.dll into + the PC/VC6 folder. + + _ssl Python wrapper for the secure sockets library. @@ -199,12 +212,10 @@ http://www.activestate.com/Products/ActivePerl/ as this is used by the OpenSSL build process. Complain to them . - The MSVC project simply invokes PCBuild/build_ssl.py to perform + The MSVC project simply invokes PC/VC6/build_ssl.py to perform the build. This Python script locates and builds your OpenSSL installation, then invokes a simple makefile to build the final .pyd. - Win9x users: see "Win9x note" below. - build_ssl.py attempts to catch the most common errors (such as not being able to find OpenSSL sources, or not being able to find a Perl that works with OpenSSL) and give a reasonable error message. @@ -216,31 +227,7 @@ build_ssl.py/MSVC isn't clever enough to clean OpenSSL - you must do this by hand. - Win9x note: If, near the start of the build process, you see - something like - C:\Code\openssl-0.9.6g>set OPTS=no-asm - Out of environment space - - then you're in trouble, and will probably also see these errors near - the end of the process: - - NMAKE : fatal error U1073: don't know how to make - 'crypto\md5\asm\m5_win32.asm' - Stop. - NMAKE : fatal error U1073: don't know how to make - 'C:\Code\openssl-0.9.6g/out32/libeay32.lib' - Stop. - - You need more environment space. Win9x only has room for 256 bytes - by default, and especially after installing ActivePerl (which fiddles - the PATH envar), you're likely to run out. KB Q230205 - - http://support.microsoft.com/default.aspx?scid=KB;en-us;q230205 - - explains how to edit CONFIG.SYS to cure this. - - YOUR OWN EXTENSION DLLs ----------------------- If you want to create your own extension module DLL, there's an example Index: trunk/PC/VC6/_socket.dsp =================================================================== --- trunk/PC/VC6/_socket.dsp (revision 60883) +++ trunk/PC/VC6/_socket.dsp (working copy) @@ -54,7 +54,7 @@ # 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 @@ # 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 Index: trunk/PC/VC6/_msi.dsp =================================================================== --- trunk/PC/VC6/_msi.dsp (revision 0) +++ trunk/PC/VC6/_msi.dsp (revision 0) @@ -0,0 +1,99 @@ +# Microsoft Developer Studio Project File - Name="_msi" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=_msi - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "_msi.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "_msi.mak" CFG="_msi - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "_msi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "_msi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "_msi" +# PROP Scc_LocalPath ".." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "_msi - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "." +# PROP Intermediate_Dir "x86-temp-release\_msi" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +F90=df.exe +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# 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 fci.lib msi.lib rpcrt4.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD 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 fci.lib msi.lib rpcrt4.lib /nologo /base:"0x1d1a0000" /subsystem:windows /dll /debug /machine:I386 /out:"./_msi.pyd" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "_msi - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "." +# PROP Intermediate_Dir "x86-temp-debug\_msi" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +F90=df.exe +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# 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 fci.lib msi.lib rpcrt4.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD 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 fci.lib msi.lib rpcrt4.lib /nologo /base:"0x1d1a0000" /subsystem:windows /dll /debug /machine:I386 /out:"./_msi_d.pyd" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "_msi - Win32 Release" +# Name "_msi - Win32 Debug" +# Begin Source File + +SOURCE=..\..\PC\_msi.c +# End Source File +# End Target +# End Project Index: trunk/PC/VC6/pcbuild.dsw =================================================================== --- trunk/PC/VC6/pcbuild.dsw (revision 60883) +++ trunk/PC/VC6/pcbuild.dsw (working copy) @@ -57,6 +57,21 @@ ############################################################################### +Project: "_msi"=".\_msi.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name pythoncore + End Project Dependency +}}} + +############################################################################### + Project: "_socket"=".\_socket.dsp" - Package Owner=<4> Package=<5> Index: trunk/PC/pyconfig.h =================================================================== --- trunk/PC/pyconfig.h (revision 60883) +++ trunk/PC/pyconfig.h (working copy) @@ -158,11 +158,11 @@ /* set the version macros for the windows headers */ #ifdef MS_WINX64 /* 64 bit only runs on XP or greater */ -#define Py_WINVER _WIN32_WINNT_WINXP +#define Py_WINVER 0x0501 /* _WIN32_WINNT_WINXP */ #define Py_NTDDI NTDDI_WINXP #else /* Python 2.6+ requires Windows 2000 or greater */ -#define Py_WINVER _WIN32_WINNT_WIN2K +#define Py_WINVER 0x0500 /* _WIN32_WINNT_WIN2K */ #define Py_NTDDI NTDDI_WIN2KSP4 #endif @@ -462,13 +462,6 @@ /* Define to `unsigned' if doesn't define. */ /* #undef size_t */ -/* Define to `int' if 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 Index: trunk/PC/msvcrtmodule.c =================================================================== --- trunk/PC/msvcrtmodule.c (revision 60883) +++ trunk/PC/msvcrtmodule.c (working copy) @@ -143,6 +143,7 @@ return PyString_FromStringAndSize(s, 1); } +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_getwch(PyObject *self, PyObject *args) { @@ -158,6 +159,7 @@ u[0] = ch; return PyUnicode_FromUnicode(u, 1); } +#endif static PyObject * msvcrt_getche(PyObject *self, PyObject *args) @@ -175,6 +177,7 @@ return PyString_FromStringAndSize(s, 1); } +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_getwche(PyObject *self, PyObject *args) { @@ -190,6 +193,7 @@ s[0] = ch; return PyUnicode_FromUnicode(s, 1); } +#endif static PyObject * msvcrt_putch(PyObject *self, PyObject *args) @@ -204,7 +208,7 @@ return Py_None; } - +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_putwch(PyObject *self, PyObject *args) { @@ -223,6 +227,7 @@ Py_RETURN_NONE; } +#endif static PyObject * msvcrt_ungetch(PyObject *self, PyObject *args) @@ -238,6 +243,7 @@ return Py_None; } +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_ungetwch(PyObject *self, PyObject *args) { @@ -251,6 +257,7 @@ Py_INCREF(Py_None); return Py_None; } +#endif static void insertint(PyObject *d, char *name, int value) @@ -279,11 +286,12 @@ {"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} }; Index: trunk/Modules/socketmodule.c =================================================================== --- trunk/Modules/socketmodule.c (revision 60883) +++ trunk/Modules/socketmodule.c (working copy) @@ -5235,8 +5235,12 @@ PyModule_AddIntConstant(m, "RCVALL_OFF", RCVALL_OFF); PyModule_AddIntConstant(m, "RCVALL_ON", RCVALL_ON); PyModule_AddIntConstant(m, "RCVALL_SOCKETLEVELONLY", RCVALL_SOCKETLEVELONLY); +#ifdef RCVALL_IPLEVEL PyModule_AddIntConstant(m, "RCVALL_IPLEVEL", RCVALL_IPLEVEL); +#endif +#ifdef RCVALL_MAX PyModule_AddIntConstant(m, "RCVALL_MAX", RCVALL_MAX); +#endif #endif /* _MSTCPIP_ */ /* Initialize gethostbyname lock */ Index: trunk/Modules/socketmodule.h =================================================================== --- trunk/Modules/socketmodule.h (revision 60883) +++ trunk/Modules/socketmodule.h (working copy) @@ -13,7 +13,6 @@ # endif #else /* MS_WINDOWS */ -#if _MSC_VER >= 1300 # include # include # include /* for SIO_RCVALL */ @@ -22,10 +21,7 @@ # define HAVE_GETADDRINFO # define HAVE_GETNAMEINFO # define ENABLE_IPV6 -#else -# include #endif -#endif #ifdef HAVE_SYS_UN_H # include @@ -133,7 +129,7 @@ /* Short explanation of what this C API export mechanism does and how it works: - The _ssl module needs access to the type object defined in + The _ssl module needs access to the type object defined in the _socket module. Since cross-DLL linking introduces a lot of problems on many platforms, the "trick" is to wrap the C API of a module in a struct which then gets exported to @@ -155,7 +151,7 @@ Load _socket module and its C API; this sets up the global PySocketModule: - + if (PySocketModule_ImportModuleAndAPI()) return; @@ -172,7 +168,7 @@ return NULL; Support could easily be extended to export more C APIs/symbols - this way. Currently, only the type object is exported, + this way. Currently, only the type object is exported, other candidates would be socket constructors and socket access functions. @@ -186,7 +182,7 @@ /* XXX The net effect of the following appears to be to define a function XXX named PySocketModule_APIObject in _ssl.c. It's unclear why it isn't - XXX defined there directly. + XXX defined there directly. >>> It's defined here because other modules might also want to use >>> the C API.