www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/09/19:59:17

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1963
Newsgroups: comp.os.msdos.djgpp
Path: news-dnh.mv.net!dj
From: dj (DJ Delorie)
Subject: Re: No HUGE_VAL
Nntp-Posting-Host: delorie.com
Sender: usenet AT jade DOT mv DOT net (System Administrator)
Organization: DJ Delorie/DJGPP Support
Date: Sat, 9 Sep 1995 22:57:04 GMT
References: <42qt33$gje AT pearl DOT whoi DOT edu>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

In article <42qt33$gje AT pearl DOT whoi DOT edu> gie AT charon DOT er DOT usgs DOT gov (Gerald I. Evenden) writes:
> I ran into a failure with djgpp's math.h: HUGE_VAL is not defined
> (see sec. 4.5.1, X3.159-1989).

It's defined, but to a value that exists only in libm.a.  Cause:
libm.a is new, the header was copied from there, and I missed it.

> A lesser problem, not in violation of ANSI standards but noxious
> nontheless, was the inclusion in math.h of definitions like PI which
> conflict with my own definitions.  If these are to be included they
> should be prefixed with __ so as to avoid potential user definitions.
> Safe programming practice assumes that *only* the standard definitions
> are in the system headers and "useful constants" do not exist.

Same issue - I copied the math.h that went with libm.a.  I'll bring it
up to my usual specs - which means that you must define _POSIX_SOURCE
to avoid the common extra stuff.

> Lastly, is there some definition like __DOS__ automatically declared?

__MSDOS__ and __DJGPP__ are defined.  __GO32__ is defined for backward
compatibility with V1.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019