summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-01 19:50:06 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-01 19:50:06 (GMT)
commit092a7a80fd95b6f347b53779066af3319d3669f8 (patch)
treee08ccf6d7cb553ee832c7ec35aeee69a3457895f
parent1538c23decbd6232fbf636b19d309dec25436cf5 (diff)
downloadcpython-092a7a80fd95b6f347b53779066af3319d3669f8.zip
cpython-092a7a80fd95b6f347b53779066af3319d3669f8.tar.gz
cpython-092a7a80fd95b6f347b53779066af3319d3669f8.tar.bz2
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.
-rw-r--r--Include/pyport.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index 15a480a..5f8ccf7 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -235,9 +235,13 @@ extern "C" {
* on some Cray systems HUGE_VAL is incorrectly (according to the C std)
* 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 INFINITY
+#define Py_HUGE_VAL ((double)INFINITY)
#else
#define Py_HUGE_VAL HUGE_VAL
#endif