]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
SF patch [#466353] Py_HUGE_VAL on BeOS for Intel.
authorTim Peters <tim.peters@gmail.com>
Mon, 1 Oct 2001 19:50:06 +0000 (19:50 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 1 Oct 2001 19:50:06 +0000 (19:50 +0000)
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.

Include/pyport.h

index 15a480a8bbea519e1fdbc2e17b37393221ad5e12..5f8ccf7c132da8ab88bfc7da2ff9ab634b533afb 100644 (file)
@@ -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