[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixed-Point toolbox for octave-forge

From: Per Persson
Subject: Re: Fixed-Point toolbox for octave-forge
Date: Wed, 26 May 2004 16:04:15 +0200

On May 25, 2004, at 17:37, David Bateman wrote:

Dear All,

I've just committed a fixed-point toolbox for octave to octave-forge.

this is great!

I found three problems when compiling on Mac OS X:

1) A bug in OS X's cmath that causes isnan() and isinf() to be "undeclared" will need to be worked around in int/

The following should work (goes right after #include <cmath>):
#if defined(__APPLE__) && defined(__MACH__)
extern "C" int isnan (double);
extern "C" int isinf (double);

Maybe configure should test for this bug and define some properly named macro? AC_TRY_COMPILE([#include <cmath>], [isnan(1.0);], [AC_MSG_RESULT("Pass")], [AC_MSG_RESULT("Fail")])

2) The link fixed-int.o -> int/fixed.o needs to be before a second compile, otherwise ln will cause an error since the link already exist. Optionally, use ln -fs to create the link. Don't know if this is OS X specific.

3) The code in example/ won't work as is, because of the way OS X's ld works. I'll try and come up with a way to fix this, but it may be a few days before I can devote time to this.

After applying (1) and (2) and disabling the example target in Makefile, all tests passed.

Again, great stuff! Thanks!


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]