|
From: Ethan M. <merritt@u.washington.edu> - 2010-10-01 01:20:08
|
On Thursday 30 September 2010 04:24:36 pm Tatsuro MATSUOKA wrote:
> Hello
>
> I have tried Ethan's modification to config.dj2.
> It seems to work fine on gnuplot 4.4.2 and 4.5.
>
> Before Patch
> gnuplot> print NaN
> undefined variable: NaN
> After patch
> gnuplot> print NaN
> 0.0
Unfortunately, that shows isnan() is found but the initialization of
the user variable NaN is not working correctly.
NaN should print as "NaN" or "nan" rather than 0.0.
Could you please try this patch to see if the initialization
method used for Microsoft C also works for DJGPP?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- gnuplot-cvs/src/stdfn.c 2010-07-30 12:11:40.000000000 -0700
+++ gnuplot-djgpp/src/stdfn.c 2010-09-30 18:12:55.000000000 -0700
@@ -458,7 +458,7 @@
double
not_a_number(void)
{
-#ifdef __MSC__
+#if defined(__MSC__) || defined(DJGPP) || defined(__DJGPP__)
unsigned long lnan[2]={0xffffffff, 0x7fffffff};
return *( double* )lnan;
#else
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
thanks,
Ethan
>
> and candlesticks.dem works without error.
>
> Thanks!!
>
> Tatsuro
> --- Hans-Bernhard Br将モker wrote:
>
> > On 29.09.2010 19:32, Ethan Merritt wrote:
> >
> > > If you change the configuration file config.dj2 does it build properly?
> > >
> > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> > > --- config.dj2.old 2010-09-29 10:21:42.000000000 -0700
> > > +++ config.dj2 2010-09-29 10:22:06.000000000 -0700
> > > @@ -142,7 +142,7 @@
> > > #endif
> > >
> > > /* Define to 1 if you have the `isnan' function. */
> > > -/* #undef HAVE_ISNAN */
> > > +#define HAVE_ISNAN
> >
> > FWIW 'configure' doesn't believe DJGPP has isnan(). The autoconf test
> > for it yields false because it looks for a function, not a macro, but
> > it's done without -lm. So it finds neither the macro, nor the function
> > in libm.a.
> >
> > I can't currently perform any real tests of my own using DJGPP --- gcc
> > 4.4.4 consistently crashes on me in term.c with a heap fault.
> >
> >
>
>
> --------------------------------------
> Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
> http://pr.mail.yahoo.co.jp/ie8/
>
--
Ethan A Merritt
Biomolecular Structure Center, K-428 Health Sciences Bldg
University of Washington, Seattle 98195-7742
|