From owner-freebsd-standards Fri Jan 3 16:52:32 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30BB237B401 for ; Fri, 3 Jan 2003 16:52:30 -0800 (PST) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CFDD43EC2 for ; Fri, 3 Jan 2003 16:52:29 -0800 (PST) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id 904E79C10; Fri, 3 Jan 2003 19:41:48 -0500 (EST) Date: Fri, 3 Jan 2003 19:41:48 -0500 From: Mike Barcroft To: Kyle Martin Cc: Ryan Younce , standards@freebsd.org Subject: Re: a few missing types in math.h Message-ID: <20030103194148.A79470@espresso.q9media.com> References: <20021017213133.GE364@marvin.bsdng.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021017213133.GE364@marvin.bsdng.org>; from mkm@ieee.org on Thu, Oct 17, 2002 at 04:31:33PM -0500 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [Sorry for the very late reply.] Kyle Martin writes: > double_t and float_t were missing, easy enough: > > Index: math.h > =================================================================== > RCS file: /home/ncvs/src/lib/msun/src/math.h,v > retrieving revision 1.18 > diff -c -r1.18 math.h > *** math.h 1 Oct 2002 11:44:35 -0000 1.18 > --- math.h 17 Oct 2002 20:56:31 -0000 > *************** > *** 24,29 **** > --- 24,35 ---- > #define HUGE_VAL (*(double *) __infinity) > > /* > + * C99 > + */ > + typedef float float_t; > + typedef double double_t; > + > + /* > * XOPEN/SVID > */ > #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) This needs to at least be conditional on __ISO_C_VISIBLE >= 1999, but I wonder if we should make these variable types MD. If we don't want to make them MD, I'd recommend the following patch: %%% Index: math.h =================================================================== RCS file: /work/repo/src/lib/msun/src/math.h,v retrieving revision 1.20 diff -u -r1.20 math.h --- math.h 31 Oct 2002 23:05:20 -0000 1.20 +++ math.h 4 Nov 2002 15:25:29 -0000 @@ -17,6 +17,8 @@ #ifndef _MATH_H_ #define _MATH_H_ +#include + /* * ANSI/POSIX */ @@ -26,6 +28,12 @@ } __infinity; #define HUGE_VAL (__infinity.__ud) +#if __ISO_C_VISIBLE >= 1999 +typedef float float_t; +typedef double double_t; +#define FLT_EVAL_METHOD 0 +#endif + /* * XOPEN/SVID */ @@ -102,8 +110,6 @@ #endif /* !_XOPEN_SOURCE */ #endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ - -#include /* * Most of these functions have the side effect of setting errno, so they %%% Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message