[Python-checkins] python/dist/src/Include pyport.h,2.63,2.64

anthonybaxter at users.sourceforge.net anthonybaxter at users.sourceforge.net
Tue Sep 30 10:59:01 EDT 2003


Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv9818

Modified Files:
	pyport.h 
Log Message:
workaround for OpenBSD compiler bug w.r.t. handling of overflows.


Index: pyport.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
retrieving revision 2.63
retrieving revision 2.64
diff -C2 -d -r2.63 -r2.64
*** pyport.h	4 Sep 2003 11:59:50 -0000	2.63
--- pyport.h	30 Sep 2003 14:58:59 -0000	2.64
***************
*** 258,263 ****
   *    X is evaluated more than once.
   * Some platforms have better way to spell this, so expect some #ifdef'ery.
   */
! #ifdef __FreeBSD__
  #define Py_OVERFLOWED(X) isinf(X)
  #else
--- 258,272 ----
   *    X is evaluated more than once.
   * Some platforms have better way to spell this, so expect some #ifdef'ery.
+  *
+  * OpenBSD uses 'isinf()' because a compiler bug on that platform causes
+  * the longer macro version to be mis-compiled. This isn't optimal, and 
+  * should be removed once a newer compiler is available on that platform.
+  * The system that had the failure was running OpenBSD 3.2 on Intel, with
+  * gcc 2.95.3.
+  *
+  * According to Tim's checkin, the FreeBSD systems use isinf() to work 
+  * around a FPE bug on that platform.
   */
! #if defined(__FreeBSD__) || defined(__OpenBSD__)
  #define Py_OVERFLOWED(X) isinf(X)
  #else





More information about the Python-checkins mailing list