[Python-checkins] r71698 - python/branches/py3k/Include/pyport.h

mark.dickinson python-checkins at python.org
Sat Apr 18 12:16:36 CEST 2009


Author: mark.dickinson
Date: Sat Apr 18 12:16:35 2009
New Revision: 71698

Log:
Issue #5781: Only use legacy string<->double conversions when
we can't figure out how to get and set the x87 control word.


Modified:
   python/branches/py3k/Include/pyport.h

Modified: python/branches/py3k/Include/pyport.h
==============================================================================
--- python/branches/py3k/Include/pyport.h	(original)
+++ python/branches/py3k/Include/pyport.h	Sat Apr 18 12:16:35 2009
@@ -506,8 +506,10 @@
 #define PY_NO_SHORT_FLOAT_REPR
 #endif
 
-/* double rounding is symptomatic of use of extended precision on x86 */
-#ifdef X87_DOUBLE_ROUNDING
+/* double rounding is symptomatic of use of extended precision on x86.  If
+   we're seeing double rounding, and we don't have any mechanism available for
+   changing the FPU rounding precision, then don't use Python/dtoa.c. */
+#if defined(X87_DOUBLE_ROUNDING) && !defined(HAVE_GCC_ASM_FOR_X87)
 #define PY_NO_SHORT_FLOAT_REPR
 #endif
 


More information about the Python-checkins mailing list