*BSD News Article 11471


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA1811 ; Tue, 23 Feb 93 14:59:18 EST
Newsgroups: comp.os.386bsd.bugs,comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!gatech!hubcap!ncrcae!ncrhub2!ncrgw2!psinntp!uuneo!sugar!karl
From: karl@NeoSoft.com (Karl Lehenbauer)
Subject: patch to math.h and g++/values.h
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Sun, 21 Feb 1993 00:46:57 GMT
Message-ID: <C2rwuA.54u@sugar.neosoft.com>
Lines: 56

Our SIGNAL 6 PATCH from earlier, the standalone one, not the one in
patchkit format, didn't include a patch for /usr/include/math.h to
change HUGE_VAL.  Also g++/values.h needed the treatment for MAX_DOUBLE.

(Can someone tell me why values.h doesn't also appear in /usr/include?)

To apply, cd to /usr/include and do a "patch -p0 <file" or equivalent.

This is, of course, unofficial, so have a backout strategy and expect to
see an official unofficial patch at some point in the future.

P.S.  The real problem is in conversion errors in atof and friends, so this
is more of a workaround than a fix.  --KL

*** math.h.pre-neosoft	Thu Feb 18 00:02:53 1993
--- math.h	Sat Feb 20 17:18:07 1993
***************
*** 39,45 ****
  #if defined(vax) || defined(tahoe)		/* DBL_MAX from float.h */
  #define	HUGE_VAL	1.701411834604692294E+38
  #else
! #define	HUGE_VAL	1e500			/* IEEE: positive infinity */
  #endif
  
  #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
--- 39,45 ----
  #if defined(vax) || defined(tahoe)		/* DBL_MAX from float.h */
  #define	HUGE_VAL	1.701411834604692294E+38
  #else
! #define	HUGE_VAL	1.797693134862315E+308	/* IEEE: positive infinity */
  #endif
  
  #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
*** g++/values.h.pre-neosoft	Sat Feb 20 17:29:07 1993
--- g++/values.h	Sat Feb 20 18:45:41 1993
***************
*** 109,115 ****
  #define FMAXEXP     ((1 << _FEXPLEN - 1) - 1 + _IEEE)
  
  #elif defined(i386)
! #define MAXDOUBLE   1.79769313486231570e+308
  #define MAXFLOAT    ((float)3.40282346638528860e+38)
  #define MINDOUBLE   2.22507385850720140e-308
  #define MINFLOAT    ((float)1.17549435082228750e-38)
--- 109,115 ----
  #define FMAXEXP     ((1 << _FEXPLEN - 1) - 1 + _IEEE)
  
  #elif defined(i386)
! #define MAXDOUBLE    1.797693134862315E+308
  #define MAXFLOAT    ((float)3.40282346638528860e+38)
  #define MINDOUBLE   2.22507385850720140e-308
  #define MINFLOAT    ((float)1.17549435082228750e-38)
-- 
-- Email info@NeoSoft.com for info on getting interactive Internet access.
"I didn't have time to write a short letter, so I wrote a long one instead."
-- Twain