This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,fortran] PRs 19363 and 19691, Cygwin failure in formatted write of Inf and NaN


On Tuesday 01 February 2005 00:16, Paul Thomas wrote:
> libgfortran.h has already got a test in it for missing isfinite(x).  The
> fastest fix would be to extend this to the case of the broken isfinite
> in Cygwin.  I know you do not like it Steven but it does put all the
> nastiness in one place!

Fair 'nuff.
Probably something like this, right?

Index: libgfortran.h
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/libgfortran.h,v
retrieving revision 1.22
diff -u -3 -p -r1.22 libgfortran.h
--- libgfortran.h       23 Jan 2005 00:14:27 -0000      1.22
+++ libgfortran.h       31 Jan 2005 23:22:02 -0000
@@ -173,7 +173,8 @@ typedef off_t gfc_offset;
    systems still provide fpclassify, and there is a `finite' function
    in BSD.  When isfinite is not available, try to use one of the
    alternatives, or bail out.  */
-#if !defined(isfinite)
+/* Also hack around a broken isfinite on Cygwin.  */
+#if (!defined(isfinite) || defined(__CYGWIN__))
 static inline int
 isfinite (double x)
 {

Hmm.  Actually you probably need to "#undef isfinite" too...

> Maybe if I submit a patch to do that and then 
> undertake to shift the whole lot to configure, when it gets back to the
> top of the todo pile?

I'm not sure if it'll ever reach the top again ;-)

Gr.
Steven


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]