delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/08/11:59:16

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs
Date: Mon, 8 Sep 2003 10:58:48 -0500 (CDT)
From: Brian Ford <ford AT vss DOT fsi DOT com>
X-X-Sender: ford AT eos
To: cygwin AT cygwin DOT com
Subject: Re: OT? Legacy code and constants / good and portable coding (RE:
Compiling Wine in Cygwin)
Message-ID: <Pine.GSO.4.56.0309081047010.685@eos>
MIME-Version: 1.0

On Sun, 7 Sep 2003, Hannu E K Nevalainen wrote:

> Ughhh... I wonder who it was that wrote:
>
It was me.

>> On Fri, 5 Sep 2003, Igor Pechtchanski wrote:
>>
>>> HUGE is a SVID-specific value that is equal to MAXFLOAT on my RedHat
>>> 7.3 box.  That is *not* the same as HUGE_VAL, BTW, so I'd use MAXFLOAT
>>> instead.
>>>
>>
>> MAXFLOAT is outdated.  I would suggest FLT_MAX in float.h.
>
> As there seems to some confusion regarding this: Thus I wonder;
>
> Is there ANY good reading on what is legacy/outdated - and what isn't!?
>
Not that I am really aware of.  I just went through a porting effort from
Sun Solaris to Cygwin and then to Linux.  I found the above from the Linux
port while looking for a common denominator.

On my Redhat 9 box, MAXFLOAT is found in values.h that contains this
comment:

Old compatibility names for <limits.h> and <float.h> constants.
This interface is obsolete.  New programs should use <limits.h> and/or
<float.h> instead of <values.h>.

float.h, on the other hand, is provided by gcc and contains IEEE
floating point standard definitions as stated by "info libc" on the same
box.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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