diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-11-22 20:00:34 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-11-22 20:00:34 (GMT) |
commit | 78e35f931128d017d5955841eac8c397ff32595c (patch) | |
tree | e78cb4a442ab6a7c2604967a8099a6ecce7083c4 | |
parent | 26897bf138df1b9b66ab61462347f000e8d67be1 (diff) | |
download | cpython-78e35f931128d017d5955841eac8c397ff32595c.zip cpython-78e35f931128d017d5955841eac8c397ff32595c.tar.gz cpython-78e35f931128d017d5955841eac8c397ff32595c.tar.bz2 |
Move Windows Python away from bsddb 1.85 and toward Sleepycat's latest.
The bsddb subproject is gone.
The _bsddb subproject is new.
There are problems here, but I'm out of time to work on this now. If
anyone can address an XXX comment or two in readme.txt, please do!
-rwxr-xr-x | Lib/test/regrtest.py | 1 | ||||
-rw-r--r-- | PCbuild/_bsddb.dsp (renamed from PCbuild/bsddb.dsp) | 211 | ||||
-rw-r--r-- | PCbuild/bsddb_patch.txt | 36 | ||||
-rw-r--r-- | PCbuild/pcbuild.dsw | 15 | ||||
-rw-r--r-- | PCbuild/readme.txt | 43 |
5 files changed, 173 insertions, 133 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 652432c..db81424 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -508,6 +508,7 @@ _expectations = { 'win32': """ test_al + test_bsddb3 test_cd test_cl test_commands diff --git a/PCbuild/bsddb.dsp b/PCbuild/_bsddb.dsp index 75fe562..3748d3a 100644 --- a/PCbuild/bsddb.dsp +++ b/PCbuild/_bsddb.dsp @@ -1,112 +1,99 @@ -# Microsoft Developer Studio Project File - Name="bsddb" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=bsddb - Win32 Release
-!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 "bsddb.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 "bsddb.mak" CFG="bsddb - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "bsddb - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "bsddb - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName "bsddb"
-# PROP Scc_LocalPath ".."
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "bsddb - 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\bsddb"
-# 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 "..\PC" /I "..\..\bsddb\include" /I "..\..\bsddb\port\include" /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 /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 ..\..\bsddb\port\win32\db.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /out:"./bsddb.pyd"
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "bsddb - 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\bsddb"
-# 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 "..\PC" /I "..\..\bsddb\include" /I "..\..\bsddb\port\include" /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 /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 ..\..\bsddb\port\win32\db.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"MSVCRT" /out:"./bsddb_d.pyd" /pdbtype:sept
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "bsddb - Win32 Release"
-# Name "bsddb - Win32 Debug"
-# Begin Source File
-
-SOURCE=..\Modules\bsddbmodule.c
-
-!IF "$(CFG)" == "bsddb - Win32 Release"
-
-# ADD CPP /I "..\..\bsddb\PORT\win32\include" /I "..\..\bsddb\PORT\include" /D "__DBINTERFACE_PRIVATE"
-# SUBTRACT CPP /X /I "..\..\bsddb\port\include"
-
-!ELSEIF "$(CFG)" == "bsddb - Win32 Debug"
-
-# ADD CPP /I "..\..\bsddb\PORT\win32\include" /I "..\..\bsddb\PORT\include" /D "__DBINTERFACE_PRIVATE"
-# SUBTRACT CPP /I "..\..\bsddb\port\include"
-
-!ENDIF
-
-# End Source File
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="_bsddb" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=_bsddb - Win32 Release +!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 "_bsddb.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 "_bsddb.mak" CFG="_bsddb - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "_bsddb - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "_bsddb - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "_bsddb" +# PROP Scc_LocalPath ".." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "_bsddb - 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\_bsddb" +# 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 "..\PC" /I "..\..\db-4.0.14\build_win32" /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 /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.0.14\build_win32\Release\libdb40.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /out:"./_bsddb.pyd" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "_bsddb - 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\_bsddb" +# 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 "..\PC" /I "..\..\db-4.0.14\build_win32" /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 /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 ..\..\db-4.0.14\build_win32\Release\libdb40.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"MSVCRT" /out:"./_bsddb_d.pyd" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "_bsddb - Win32 Release" +# Name "_bsddb - Win32 Debug" +# Begin Source File + +SOURCE=..\Modules\_bsddb.c +# End Source File +# End Target +# End Project diff --git a/PCbuild/bsddb_patch.txt b/PCbuild/bsddb_patch.txt new file mode 100644 index 0000000..d4c51bc --- /dev/null +++ b/PCbuild/bsddb_patch.txt @@ -0,0 +1,36 @@ +This patch is against Sleepycat's db-4.0.14 release. It's not on the +Sleepycat site. It fixes cases of database corruption Barry (Warsaw) +was seeing, and Barry got it from Sleepycat. + +*** db/db_reclaim.c.orig 2002/04/05 16:16:17 11.22 +--- db/db_reclaim.c 2002/04/10 18:53:13 11.23 +*************** +*** 195,202 **** + dbp->log_fileid, p->pgno, &LSN(meta), + PGNO_BASE_MD, &ldbt, meta->free)) != 0) + goto err; +- + LSN(p) = LSN(meta); + if ((ret = + __db_pg_alloc_log(dbp->dbenv, + param->dbc->txn, &LSN(meta), 0, +--- 195,202 ---- + dbp->log_fileid, p->pgno, &LSN(meta), + PGNO_BASE_MD, &ldbt, meta->free)) != 0) + goto err; + LSN(p) = LSN(meta); ++ + if ((ret = + __db_pg_alloc_log(dbp->dbenv, + param->dbc->txn, &LSN(meta), 0, +*************** +*** 206,211 **** +--- 206,213 ---- + (void)__TLPUT(param->dbc, metalock); + return (ret); + } ++ LSN(p) = LSN(meta); ++ + if ((ret = mpf->put(mpf, + (PAGE *)meta, DB_MPOOL_DIRTY)) != 0) { + (void)__TLPUT(param->dbc, metalock); diff --git a/PCbuild/pcbuild.dsw b/PCbuild/pcbuild.dsw index 1d16d08..856b44c 100644 --- a/PCbuild/pcbuild.dsw +++ b/PCbuild/pcbuild.dsw @@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ###############################################################################
-Project: "_socket"=.\_socket.dsp - Package Owner=<4>
+Project: "_bsddb"=.\_bsddb.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -11,14 +11,11 @@ Package=<5> Package=<4>
{{{
- Begin Project Dependency
- Project_Dep_Name pythoncore
- End Project Dependency
}}}
###############################################################################
-Project: "_sre"=.\_sre.dsp - Package Owner=<4>
+Project: "_socket"=.\_socket.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -33,7 +30,7 @@ Package=<4> ###############################################################################
-Project: "_symtable"=.\_symtable.dsp - Package Owner=<4>
+Project: "_sre"=.\_sre.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -48,7 +45,7 @@ Package=<4> ###############################################################################
-Project: "_testcapi"=.\_testcapi.dsp - Package Owner=<4>
+Project: "_symtable"=.\_symtable.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -63,7 +60,7 @@ Package=<4> ###############################################################################
-Project: "_tkinter"=.\_tkinter.dsp - Package Owner=<4>
+Project: "_testcapi"=.\_testcapi.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -78,7 +75,7 @@ Package=<4> ###############################################################################
-Project: "bsddb"=.\bsddb.dsp - Package Owner=<4>
+Project: "_tkinter"=.\_tkinter.dsp - Package Owner=<4>
Package=<5>
{{{
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index f6e8fcd..8771f03 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -160,19 +160,38 @@ bz2 project links in. +_bsddb + Go to Sleepycat's patches page: + http://www.sleepycat.com/update/index.html + and download + 4.0.14.zip + from the download page. The file name is db-4.0.14.zip. Unpack into + dist\db-4.0.14 + + Apply the patch file bsddb_patch.txt in this (PCbuild) directory + against the file + dist\db-4.0.14\db\db_reclaim.c + + Go to + http://www.sleepycat.com/docs/ref/build_win/intro.html + and follow the instructions for building the Sleepycat software. + Build the Release version. + + XXX You have to copy + XXX dist\db-4.0.14\build_win32\Release\libdb40.dll + XXX into PCbuild (or elsewhere on your path) before the tests + XXX will run. + + XXX A debug-mode build blows up when running this, presumably because + XXX I'm mixing debug-mode MS stuff with Sleepycat's release-mode + XXX DLL. This gives me a headache. I would *like* to, as the old + XXX bsddb 1.85 project apparently managed to do, link the Berkeley + XXX DLL into the guts of our _bsddb.pyd. I don't know how to. + + XXX The installer needs to be changed accordingly. -bsddb - Python wrapper for the BSD database 1.85. Requires db.1.85.win32.zip, - from the "bsd db" link at - http://www.nightmare.com/software.html - Unpack into dist\bsddb. - You then need to compile it: cd to dist\bsddb\Port\win32, and run - nmake -f makefile_nt.msc - This builds bsddb\Port\win32\db.lib, which the MSVC project links in. - Note that if you're running Win9X, you'll need to run vcvars32.bat - before running nmake (this batch file is in your MSVC installation). - TODO: make this work like zlib (in particular, MSVC runs the prelink - step in an enviroment that already has the correct envars set up). + XXX The Sleepycat release we use will probably change before + XXX 2.3a1. YOUR OWN EXTENSION DLLs |