Another year in the quest to out-guess random C behavior.
Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y). The latter
is useful for functions with complex results. Two corrections to errno-
after-libm-call are attempted:
1. If the platform set errno to ERANGE due to underflow, clear errno.
Some unknown subset of libm versions and link options do this. It's
allowed by C89, but I never figured anyone would do it.
2. If the platform did not set errno but overflow occurred, force
errno to ERANGE. C89 required setting errno to ERANGE, but C99
doesn't. Some unknown subset of libm versions and link options do
it the C99 way now.
Bugfix candidate, but hold off until some Linux people actually try it,
with and without -lieee. I'll send a help plea to Python-Dev.
The doc string for cStringIO suggested that str() of a StringIO object
was equivalent to getvalue(). This was never true, so repair the doc
string. (doctest would have helped here.)
Bug fix candidate for any past versions.
mmap_find_method(): this obtained the string to find via s#, but it
ignored its length, acting as if it were \0-terminated instead.
Someone please run on Linux too (the extended test_mmap works on Windows).
Bugfix candidate.
over SEP, ALTSEP and MAXPATHLEN.
Patched up posixmodule.c for MSVC, but unsure what the story is now on
other non-Unixish platforms -- the preprocessor maze has no exit <wink>.
Modules/
posixmodule.c
- use SEP,ALTSEP #defines instead of hard coded path separator chars
- use EMX specific variants of chdir2(),getcwd() that support drive letters
- OS/2+EMX spawnv(),spawnve() support
- EMX specific popen[234]() derived from Win32 popen[234]() code
socketmodule.c. No code outside of the .c file references it, so it
doesn't belong the .h file (at least not yet ...), and declaring it
an imported symbol in the .h file can't be made to work on Windows (it's
a cross-DLL symbol then) without substantial code rewriting. Also
repaired the comment that goes along with the decl, to stop referring
to names and functions that haven't existed for 7 years <wink>.
socketmodule.c compiles cleanly on Windows again. The test_socket dies
at once, though (later).
helper module _ssl.
The support for the RAND_* APIs in _ssl is now only enabled
for OpenSSL 0.9.5 and up since they were added in that
release.
Note that socketmodule.* should really be renamed to _socket.* --
unfortunately, this seems to lose the CVS history of the file.
Please review and test... I was only able to test the header file
chaos in socketmodule.c/h on Linux. The test run through fine
and compiles don't give errors or warnings.
WARNING: This patch does *not* include changes to the various
non-Unix build process files.
where their capabilities intersect. Would be nice if people using non-
MSVC compilers (Borland etc) took a whack at doing something similar for
them (this code relies on the MS _cwait function).
[ #510644 ] test_curses segfaults
If we use the *object* *allocator*, we should use the *object* *deallocator*,
not the *raw memory* deallocator (confused yet?).
I think this was what caused segfaults when pymalloc was enabled.
Even if it wasn't the cause, it's still wrong.
2.2.1 candidate.
[ #504284 ] Last build problems on AIX
I'm ignoring the suggestion that this should be an autoconf test in the
interests of having a fix today. Feel free to quibble.