Author LRN
Recipients BreamoreBoy, LRN, WhiteTiger, davidfraser, giampaolo.rodola, lkcl, rpetrov, rschoon.old, tarek, zooko
Date 2010-08-07.22:41:54
SpamBayes Score 6.10623e-16
Marked as misclassified No
Message-id <>
New version of my patch. Addresses some issues i've found since the last one. Diff against a recent trunk is attached.

Changes (relative to previous patch):

* Added a call to _set_abort_behavior(). That should fix

* Changed _MSC_VER to MS_WINDOWS, since the code does not seem to be MSVC-specific
* Added AC_DEFINE for Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE (for MSVC-based builds it is hardcoded in PC/pyconfig.h)
* Added -no-undefined LDFLAG for Windows builds - helps find missing library dependencies at buildtime
* Added -fno-common and -mms-bitfields CFLAGS for Windows builds. -fno-common could fix some hidden problem with aligned commons, and -mms-bitfields should improve compatibility with MSVC-built binaries
* Added -D_GNU_SOURCE CFLAG. Defining this enables MinGW non-ANSI extensions, including the custom printf() implementation that supports %z format
* Added AC_DEFINE for HAVE_GETPEERNAME, because testing lws2_32 for it is tricky
* Removed PY_FORMAT_SIZE_T fiddling, since with GNU extensions %z is supported
* _subprocess module is now built on win32 to support subprocess extension
* msvcrt, winreg and winsound modules are built as well

* Added REG_LEGAL_CHANGE_FILTER definition (MinGW does not define it)

* Fixed PFN_ADDREFACTCTX and PFN_RELEASEACTCTX - according to MSDN, they return nothing
* Fixed the way AddRefActCtx is called (GetLastError() is being checked for errors instead of return value)

* Added return 0 to prevent generrmap.exe from "failing" (returning something other than 0)

* Added #ifdef guards around crtdbg.h, because only MSVC provides it

* Extended os.sep == '/' (why isn't tested?) to msys
* Extended addbuilddir calling condition to msys

* Extended some posix conditions to msys, restricted some nt conditions to non-msys

* Disabled this test for MSys (MinGW can't build msi module)

* An extra hack to add $(srcdir) to library_dirs at build time

* Some MSys-specific configuration magic

* Added a reminder that realpath() can now be implemented

* Added msys-only variation of directory layout (copied from posix)

* Widened os.sep == '/' condition to MSys
* Fixed CFLAGS order for Objects/exceptions.o target (won't include pyconfig.h from PC anymore)

* Massive fixes. Most thigs are copied from PC/getpathp.c (who had the bright idea of having two separate, but almost identical headers?)
* Ripped a readlink() implementation from posixmodule.c to use here. By the way, it was buggy, so i had to fix it as well.

* Added some definitions for MinGW - these aren't in current MinGW w32api package, and will (probably) never get there.

* Added more gurads on crtdbg stuff, because it is MSVC-only

* Changed some guards from _MSC_VER to MS_WINDOWS, because the code is not MSVC-specific

* Changed some guards to work for MinGW as well
* Discovered why i previously had to fix mkdir() call. Now that's not necessary anymore (but i left previous fix as it is, can't hurt to be careful)

I ran some tests and tried to make my Python build pass them, which partially fueled my bugfixing efforts.

_ctypes test (namely - test_callconv_1) crashes the interpreter (SIGSEGV in libffi), so i had to comment it out.

test_capi fails (but that should be now fixed in MSVC builds, can't test it in a MinGW build)
test_cmath fails (i have no idea why)
test_cmd_line fails (i think it is not adapted to MSys; and i'm not sure it needs to be - after all, this Python build is NOT intended to be ran in MSys most of the time)
test_distutils fails (i've fixed that only partially)
test_email fails (wrong crlfs)
test_format fails (?)
test_heapq fails (but when i re-run it, it passes; because of pre-compilation?)
test_platform fails (doesn't work well with symlinked python, because realpath isn't implemented on NT yet)
test_smtplib fails (no idea - why)
test_sundry fails (?)
test_sysconfig fails (didn't try to fix)
test_tarfile fails (didn't try to fix)
test_tcl fails (didn't try to fix)
test_trace (didn't try to fix)
test_urllib2 (didn't try to fix)

test_multiprocessing is skipped because there's no test for multiprocessing in Lib/test/

282 tests OK.
Date User Action Args
2010-08-07 22:42:27LRNsetrecipients: + LRN, lkcl, zooko, davidfraser, giampaolo.rodola, tarek, rpetrov, rschoon.old, WhiteTiger, BreamoreBoy
2010-08-07 22:42:26LRNsetmessageid: <>
2010-08-07 22:42:24LRNlinkissue3871 messages
2010-08-07 22:42:20LRNcreate