about log2 for octave-3.1.51 (Not 3.1.50)
Tatsuro MATSUOKA
tmacchant at yahoo.co.jp
Fri Jul 25 04:09:52 CDT 2008
Hello
Thank you Jaroslav.
I will try the below tomorrow.
Regards
Tatsuro
--- Jaroslav Hajek <highegg at gmail.com> wrote:
> On Fri, Jul 25, 2008 at 9:43 AM, Tatsuro MATSUOKA <tmacchant at yahoo.co.jp> wrote:
> > Hello
> >
> >
> > I have gottten the imformation at cygwin ML.
> >
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA256
> >
> > Tatsuro MATSUOKA wrote:
> > | The following lines the config.log which are related to log2.
> > | The existence of log2 is found. However it did not go well octave
> > configure test.
> >
> > log2 is defined as a cpp macro in <math.h>. You either need to fix the
> > configure test, or you may find it easier to pass "ac_cv_func_log2=yes"
> > to configure.
> >
> >
> > Yaakov
> > -----BEGIN PGP SIGNATURE-----
> >
> > Is the above useful?
> >
>
> I think we're getting closer :) math.h should never be included in any
> c++ header, but rather cmath (this is handled by liboctave/lo-math.h).
> The cmath header tries to undefine the functional macros defined in
> math.h - but log2 is apparently missing. I reckon this is a bug in
> g++; given that log and log10 are both there, log2 should probably be
> as well. Would you like to report this to gcc bugzilla?
> Still, it's reasonable to workaround the bug in some way. The easiest
> fix I can think of is the attached changeset. After all, the
> interfering macro is quite useless for us, because we already have the
> proper wrappers in lo-mappers.cc.
> Can you try if the changeset fixes the problem for you?
>
> cheers
>
> > Regards
> >
> > Tatsuro
> >
> >
>
>
>
>
> --
> RNDr. Jaroslav Hajek
> computing expert
> Aeronautical Research and Test Institute (VZLU)
> Prague, Czech Republic
> url: www.highegg.matfyz.cz
> > # HG changeset patch
> # User Jaroslav Hajek <highegg at gmail.com>
> # Date 1216976198 -7200
> # Node ID b4059d3f01b0eea844c958945e0536f26bf7ea5e
> # Parent 4f9e8eeb2059cf6d20e821958233d4e773ef4cff
> [mq]: log2
>
> diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog
> --- a/liboctave/ChangeLog
> +++ b/liboctave/ChangeLog
> @@ -1,3 +1,7 @@
> +2008-07-25 Jaroslav Hajek <highegg at gmail.com>
> +
> + * lo-math.h: Ensure log2 is undefined from cmath in C++ mode.
> +
> 2008-07-21 Michael Goffioul <michael.goffioul at gmail.com>
>
> * oct-mutex.h (octave_base_mutex::octave_base_mutex): Initialize
> diff --git a/liboctave/lo-math.h b/liboctave/lo-math.h
> --- a/liboctave/lo-math.h
> +++ b/liboctave/lo-math.h
> @@ -25,6 +25,10 @@
>
> #if defined (__cplusplus)
> #include <cmath>
> +// if #undef log2 is missing in cmath, undef it here
> +#if defined (log2)
> +#undef log2
> +#endif
> #else
> #include <math.h>
> #endif
>
--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/
More information about the Bug-octave
mailing list