]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
This has been declared to work.
authorMichael W. Hudson <mwh@python.net>
Mon, 11 Mar 2002 10:16:23 +0000 (10:16 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 11 Mar 2002 10:16:23 +0000 (10:16 +0000)
commit879e96f716a444664f98382e292cb049b1ea7db2
tree2cf37b3b1835de04cc67215c311e42692ca8329e
parentdb780071b7e907479145eda085842638d0a990c8
This has been declared to work.

backport tim_one's checkin of
    revision 2.45 of pyport.h

SF bug 525705:  [2.2] underflow raise OverflowException.
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.
Include/pyport.h