Patch #1576954: Update VC6 build directory; remove redundant
files in VC7. Will backport to 2.5.
diff --git a/Misc/NEWS b/Misc/NEWS
index 9800a9b..1dcd6aa 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -211,6 +211,9 @@
 Build
 -----
 
+- Patch #1576954: Update VC6 build directory; remove redundant
+  files in VC7.
+
 - Bug #1568842: Fix test for uintptr_t.
 
 - Patch #1540470, for OpenBSD 4.0.
diff --git a/PC/VC6/pythoncore.dsp b/PC/VC6/pythoncore.dsp
index ec2ec3e..ca504d6 100644
--- a/PC/VC6/pythoncore.dsp
+++ b/PC/VC6/pythoncore.dsp
@@ -44,7 +44,7 @@
 # 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" /D "USE_DL_EXPORT" /YX /FD /Zm200 /c

+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /I "..\..\modules\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_DL_EXPORT" /YX /FD /Zm200 /c

 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"

 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"

 # ADD BASE RSC /l 0x409 /d "NDEBUG"

@@ -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 largeint.lib kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1e000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./python25.dll"

+# ADD LINK32 largeint.lib kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1e000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./python26.dll"

 # SUBTRACT LINK32 /pdb:none

 

 !ELSEIF  "$(CFG)" == "pythoncore - Win32 Debug"

@@ -72,7 +72,7 @@
 # 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 "USE_DL_EXPORT" /D "WIN32" /D "_WINDOWS" /YX /FD /Zm200 /c

+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /I "..\..\modules\zlib" /D "_DEBUG" /D "USE_DL_EXPORT" /D "WIN32" /D "_WINDOWS" /YX /FD /Zm200 /c

 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"

 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"

 # ADD BASE RSC /l 0x409 /d "_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 largeint.lib kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1e000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./python25_d.dll" /pdbtype:sept

+# ADD LINK32 largeint.lib kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1e000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./python26_d.dll" /pdbtype:sept

 # SUBTRACT LINK32 /pdb:none

 

 !ENDIF 

@@ -129,6 +129,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\_functoolsmodule.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Modules\_heapqmodule.c

 # End Source File

 # Begin Source File

@@ -141,6 +145,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\_lsprof.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Modules\_randommodule.c

 # End Source File

 # Begin Source File

@@ -149,10 +157,18 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\_struct.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\PC\_subprocess.c

 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\_typesmodule.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Modules\_weakref.c

 # End Source File

 # Begin Source File

@@ -169,6 +185,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\zlib\adler32.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Modules\arraymodule.c

 # End Source File

 # Begin Source File

@@ -245,6 +265,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\zlib\compress.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\config.c

 # End Source File

 # Begin Source File

@@ -253,6 +277,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\zlib\crc32.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Modules\cStringIO.c

 # End Source File

 # Begin Source File

@@ -261,6 +289,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\zlib\deflate.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Objects\descrobject.c

 # End Source File

 # Begin Source File

@@ -289,7 +321,7 @@
 # End Source File

 # Begin Source File

 

-SOURCE=..\..\Python\exceptions.c

+SOURCE=..\..\Objects\exceptions.c

 # End Source File

 # Begin Source File

 

@@ -313,10 +345,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=..\..\Modules\_functoolsmodule.c

-# End Source File

-# Begin Source File

-

 SOURCE=..\..\Python\future.c

 # End Source File

 # Begin Source File

@@ -391,6 +419,18 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\zlib\inffast.c

+# End Source File

+# Begin Source File

+

+SOURCE=..\..\Modules\zlib\inflate.c

+# End Source File

+# Begin Source File

+

+SOURCE=..\..\Modules\zlib\inftrees.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Objects\intobject.c

 # End Source File

 # Begin Source File

@@ -427,7 +467,7 @@
 # End Source File

 # Begin Source File

 

-SOURCE=..\..\Modules\md5c.c

+SOURCE=..\..\Modules\md5.c

 # End Source File

 # Begin Source File

 

@@ -503,10 +543,18 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Python\peephole.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Modules\posixmodule.c

 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Python\pyarena.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Python\pyfpe.c

 # End Source File

 # Begin Source File

@@ -519,11 +567,11 @@
 # End Source File

 # Begin Source File

 

-SOURCE=..\python_nt.rc

+SOURCE="..\..\Python\Python-ast.c"

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\Python\Python-ast.c

+SOURCE=..\python_nt.rc

 # End Source File

 # Begin Source File

 

@@ -539,11 +587,11 @@
 # End Source File

 # Begin Source File

 

-SOURCE=..\..\Objects\setobject.c

+SOURCE=..\..\Modules\rotatingtree.c

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\Modules\shamodule.c

+SOURCE=..\..\Objects\setobject.c

 # End Source File

 # Begin Source File

 

@@ -555,6 +603,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\shamodule.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Modules\signalmodule.c

 # End Source File

 # Begin Source File

@@ -575,10 +627,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=..\..\Modules\structmodule.c

-# End Source File

-# Begin Source File

-

 SOURCE=..\..\Objects\structseq.c

 # End Source File

 # Begin Source File

@@ -615,6 +663,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\Modules\zlib\trees.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\Objects\tupleobject.c

 # End Source File

 # Begin Source File

@@ -645,5 +697,13 @@
 

 SOURCE=..\..\Modules\zipimport.c

 # End Source File

+# Begin Source File

+

+SOURCE=..\..\Modules\zlibmodule.c

+# End Source File

+# Begin Source File

+

+SOURCE=..\..\Modules\zlib\zutil.c

+# End Source File

 # End Target

 # End Project

diff --git a/PCbuild/pythoncore.vcproj b/PCbuild/pythoncore.vcproj
index b8d78c0..ebaa78f 100644
--- a/PCbuild/pythoncore.vcproj
+++ b/PCbuild/pythoncore.vcproj
@@ -464,9 +464,6 @@
 			RelativePath="..\Python\compile.c">
 		</File>
 		<File
-			RelativePath="..\Python\peephole.c">
-		</File>
-		<File
 			RelativePath="..\Objects\complexobject.c">
 		</File>
 		<File
@@ -686,6 +683,9 @@
 			RelativePath="..\Parser\parsetok.c">
 		</File>
 		<File
+			RelativePath="..\Python\peephole.c">
+		</File>
+		<File
 			RelativePath="..\Modules\posixmodule.c">
 		</File>
 		<File
@@ -728,18 +728,12 @@
 			RelativePath="..\Modules\sha512module.c">
 		</File>
 		<File
-			RelativePath="..\Modules\sha512module.c">
-		</File>
-		<File
 			RelativePath="..\Modules\shamodule.c">
 		</File>
 		<File
 			RelativePath="..\Modules\signalmodule.c">
 		</File>
 		<File
-			RelativePath="..\Modules\signalmodule.c">
-		</File>
-		<File
 			RelativePath="..\Objects\sliceobject.c">
 		</File>
 		<File