[Python-checkins] CVS: python/dist/src/Include pyport.h,2.36,2.37
Tim Peters
tim_one@users.sourceforge.net
2001年10月01日 12:50:09 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv23560/python/Include
Modified Files:
pyport.h
Log Message:
SF patch [#466353] Py_HUGE_VAL on BeOS for Intel.
The patch repaired internal gcc compiler errors on BeOS.
This checkin repairs them in a simpler way, by explicitly casting the
platform INFINITY to double.
Index: pyport.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
retrieving revision 2.36
retrieving revision 2.37
diff -C2 -d -r2.36 -r2.37
*** pyport.h 2001年09月05日 22:36:55 2.36
--- pyport.h 2001年10月01日 19:50:06 2.37
***************
*** 236,242 ****
* defined to be the largest positive finite rather than infinity. We need
* the std-conforming infinity meaning (provided the platform has one!).
*/
#ifdef INFINITY
! #define Py_HUGE_VAL INFINITY
#else
#define Py_HUGE_VAL HUGE_VAL
--- 236,246 ----
* defined to be the largest positive finite rather than infinity. We need
* the std-conforming infinity meaning (provided the platform has one!).
+ *
+ * Then, according to a bug report on SourceForge, defining Py_HUGE_VAL as
+ * INFINITY caused internal compiler errors under BeOS using some version
+ * of gcc. Explicitly casting INFINITY to double made that problem go away.
*/
#ifdef INFINITY
! #define Py_HUGE_VAL ((double)INFINITY)
#else
#define Py_HUGE_VAL HUGE_VAL