help-octave
[Top][All Lists]
Advanced

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

Re: Fixed-Point toolbox for octave-forge


From: David Bateman
Subject: Re: Fixed-Point toolbox for octave-forge
Date: Wed, 26 May 2004 16:42:55 +0200
User-agent: Mutt/1.4.1i

According to Per Persson <address@hidden> (on 05/26/04):
> 
> 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.
> 
> David,
> 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/fixed.cc.
> 
> The following should work (goes right after #include <cmath>):
> #if defined(__APPLE__) && defined(__MACH__)
> extern "C" int isnan (double);
> extern "C" int isinf (double);
> #endif
> 
> 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")])

Ok, for now I've commit your first fix...

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

No its not OS X specific, I spotted it after I committed and have already
fixed it..

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

It sounds like a similar problem under cygwin, where I have to create a 
seperate library for the fixed point type and then link to it... I don't
have access to a MAC and so can't fix this. But you should look at Makefile
for code like

ifeq (,$(findstring cygwin,$(canonical_host_type)))

  <NOT CYGWIN>
else

  <CYGWIN>

endif

And maybe apply something similar to OS X.. It'll be slightly different
due to the fact that I've hard coded the cygwin library names in certain
places.... Do you need the option "--out-implib" for OS X like I did
for cygwin?

> After applying (1) and (2) and disabling the example target in 
> Makefile, all tests passed.
> 
> Again, great stuff! Thanks!

Just, wish I wasn't block for the last 6 months from submitting it...

Regards
David

-- 
David Bateman                                address@hidden
Motorola CRM                                 +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax) 
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



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

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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