delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/07/14:58:30

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
Message-ID: <3F09C2AC.5020001@redhat.com>
Date: Mon, 07 Jul 2003 14:57:48 -0400
From: "J. Johnston" <jjohnstn AT redhat DOT com>
Organization: Red Hat Inc.
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: "Billinghurst, David (CRTS)" <David DOT Billinghurst AT riotinto DOT com>
Cc: cygwin AT cygwin DOT com, newlib AT sources DOT redhat DOT com
Subject: Re: C99/C++ patch for /usr/include/math.h
References: <FAC87D7C874EAB46A847604DA4FD5A640348B6 AT crtsmail DOT corp DOT riotinto DOT org>

David,

   Could you provide more details on the failure.  Does the latest version of the testcases test long
double by any chance?  The newlib version matches the C99 sample definition except that it is
missing long double support.

-- Jeff J.

Billinghurst, David (CRTS) wrote:
> I have been working through some gcc-3.4 libstdc++-v3 testsuite failures on cygwin.
> 
> The tests:
>  - 26_numerics/c99_classification_macros_c++.cc
>  - 26_numerics/c99_classification_macros_c.cc
> fail because C99 and C++ disagree over fpclassify()
> 
> The following patch to /usr/include/math.h does the job, but I haven't checked it against the standards.  I don't have a newlib tree at present, so I am unsure
> which source file needs the patch.
> 
> Tested by successful compilation of above tests.
> 
> 2003-07-05  David Billinghurst <David DOT Billinghurst AT riotinto DOT com>
> 
> 	* math.h:  Do not define ISO C99 types and macros for C++
> 
> --- math.h.orig	2003-07-05 09:10:07.000000000 +1000
> +++ math.h	2003-07-05 09:23:25.000000000 +1000
> @@ -63,9 +63,8 @@
>  #endif /* ! defined (__math_68881) */
>  #endif /* ! defined (_REENT_ONLY) */
>  
> -#ifndef __STRICT_ANSI__
> -
>  /* ISO C99 types and macros. */
> +#if ! defined (__STRICT_ANSI__) && ! defined (__cplusplus)
>  
>  #ifndef FLT_EVAL_METHOD
>  #define FLT_EVAL_METHOD 0
> @@ -116,8 +115,10 @@
>            (__extension__ ({__typeof__(x) __x = (x); __typeof__(y) __y = (y); \
>                             fpclassify(__x) == FP_NAN || fpclassify(__y) == FP_NAN;}))
>  
> -/* Non ANSI double precision functions.  */
> +#endif /* ! defined (__STRICT_ANSI__) && ! defined (__cplusplus) */
>  
> +/* Non ANSI double precision functions.  */
> +#ifndef __STRICT_ANSI__
>  extern double infinity _PARAMS((void));
>  extern double nan _PARAMS((void));
>  extern int isnan _PARAMS((double));
> 



--
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