You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2001/02/16 20:49:32 UTC

cvs commit: xml-xalan/c/src/PlatformSupport DoubleSupport.cpp

dbertoni    01/02/16 11:49:32

  Modified:    c/src/PlatformSupport DoubleSupport.cpp
  Log:
  New way of determining -0.0, to work around xlC's optimizer.
  
  Revision  Changes    Path
  1.20      +6 -3      xml-xalan/c/src/PlatformSupport/DoubleSupport.cpp
  
  Index: DoubleSupport.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DoubleSupport.cpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- DoubleSupport.cpp	2001/02/01 18:31:25	1.19
  +++ DoubleSupport.cpp	2001/02/16 19:49:30	1.20
  @@ -71,10 +71,15 @@
   const double	DoubleSupport::s_positiveInfinity = HUGE_VAL;
   const double	DoubleSupport::s_negativeInfinity = -DoubleSupport::s_positiveInfinity;
   const double	DoubleSupport::s_positiveZero = 0.0;
  -const double	DoubleSupport::s_negativeZero = -DoubleSupport::s_positiveZero;
   
  +// Some compiler are overly aggressive and think that there is no such thing as -0,
  +// so we have to get it in a very sneaky way.
  +double	theDummy;
   
  +const double	DoubleSupport::s_negativeZero = modf(-7.0, &theDummy);
   
  +
  +
   const unsigned long*	DoubleSupport::s_NaNFirstDWORD =
   #if defined(XALAN_OLD_STYLE_CASTS)
   					(const unsigned long*)&s_NaN;
  @@ -700,8 +705,6 @@
   bool
   DoubleSupport::isValid(const XalanDOMChar*		theString)
   {
  -	bool	fDummy = false;
  -
   	return doValidate(theString);
   }