[Python-checkins] python/dist/src/Include pyport.h,2.50,2.51

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2002年7月02日 20:31:22 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv19023/python/Include
Modified Files:
	pyport.h 
Log Message:
Stop trying to cater to platforms with a broken HUGE_VAL definition. It
breaks other platforms (in this case, the hack for broken Cray systems in
turn caused failure on a Mac system broken in a different way).
Index: pyport.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
retrieving revision 2.50
retrieving revision 2.51
diff -C2 -d -r2.50 -r2.51
*** pyport.h	4 Jun 2002 15:07:08 -0000	2.50
--- pyport.h	3 Jul 2002 03:31:20 -0000	2.51
***************
*** 230,246 ****
 #define Py_IS_INFINITY(X) ((X) && (X)*0.5 == (X))
 
! /* According to
! * http://www.cray.com/swpubs/manuals/SN-2194_2.0/html-SN-2194_2.0/x3138.htm
! * 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 ((double)INFINITY)
! #else
 #define Py_HUGE_VAL HUGE_VAL
 #endif
--- 230,241 ----
 #define Py_IS_INFINITY(X) ((X) && (X)*0.5 == (X))
 
! /* HUGE_VAL is supposed to expand to a positive double infinity. Python
! * uses Py_HUGE_VAL instead because some platforms are broken in this
! * respect. We used to embed code in pyport.h to try to worm around that,
! * but different platforms are broken in conflicting ways. If you're on
! * a platform where HUGE_VAL is defined incorrectly, fiddle your Python
! * config to #define Py_HUGE_VAL to something that works on your platform.
 */
! #ifndef Py_HUGE_VAL
 #define Py_HUGE_VAL HUGE_VAL
 #endif

AltStyle によって変換されたページ (->オリジナル) /