There's a bug in (IIRC) math.h on gcc3.3 that causes those symbols to
be undefined in certain circumstances.

dan

On Mon, Sep 04, 2006 at 12:11:43PM -0400, S?bastien Maret wrote:
> Hello,
> 
> I tried to removed isfinite and isnan in gdl patch, as you suggested.
> It compiles fine on 10.4, but fails on 10.3 because isfinite and isnan
> are undefined (see the attached patch for 10.3 that Dominique sent
> me).
> 
> I thought that isfinite and isnan were defined on both 10.3 and 10.4?
> 
> --bmaret
> 
> ---------- Forwarded message ----------
> From: Dominique Dhumieres <[EMAIL PROTECTED]>
> Date: Sep 4, 2006 3:41 AM
> Subject: Re: Failed: phase compiling: gdl-0.8.11-2 failed
> To: [EMAIL PROTECTED]
> 
> 
> S?bastien,
> 
> Thanks for the answer.
> 
> > Can you give a try with the info and patch file in my experimental branch:
> > http://fink.cvs.sourceforge.net/fink/experimental/bmaret/finkinfo/
> >
> > The one for 10.3 is gdl-0.8.11-3.info.
> 
> Your patch did not work, but using the patch I buit Friday (it did not
> allow the build with the original info file) with your gdl-0.8.11-3.info
> worked.
> 
> Thanks
> 
> Dominique
> 
> ------------------------------- working patch for 10.3 
> ------------------------
> 
> diff -ruN gdl-0.8.10/src/datatypes.cpp gdl-0.8.10.patched/src/datatypes.cpp
> --- gdl-0.8.10/src/datatypes.cpp        2005-07-10 11:00:06.000000000 -0400
> +++ gdl-0.8.10.patched/src/datatypes.cpp        2005-08-10
> 13:07:46.000000000 -0400
> @@ -35,19 +35,11 @@
>  #include <assert.h>
> 
>  // on OS X isnan is not defined
> -#if defined(__APPLE__) && !defined(isnan)
> 
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -#define      isnan( x )         ( ( sizeof ( x ) == sizeof(double) ) ?  \
> -                              __isnand ( x ) :                          \
> -                                ( sizeof ( x ) == sizeof( float) ) ?    \
> -                              __isnanf ( x ) :                          \
> -                              __isnan  ( x ) )
> -#ifdef __cplusplus
> -}
> -#endif
> +#if defined(__APPLE__) && !defined(isnan)
> +#define isnan( x ) ( ( sizeof ( (x) ) == sizeof( float) ) ?  \
> +                    __isnanf ( (float)(x) ) :  \
> +                    __isnand  ( (double)(x) ) )
>  #endif
> 
>  using namespace std;
> diff -ruN gdl-0.8.10/src/math_fun_jmg.cpp
> gdl-0.8.10.patched/src/math_fun_jmg.cpp
> --- gdl-0.8.10/src/math_fun_jmg.cpp     2005-07-10 11:00:06.000000000 -0400
> +++ gdl-0.8.10.patched/src/math_fun_jmg.cpp     2005-08-10
> 13:08:02.000000000 -0400
> @@ -31,20 +31,10 @@
> 
>  // on OS X isfinite is not defined
>  #if defined(__APPLE__) && !defined(isfinite)
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -#define      isfinite( x )      ( ( sizeof ( x ) == sizeof(double) ) ?       
> \
> -                              __isfinited ( x ) :                            
> \
> -                                ( sizeof ( x ) == sizeof( float) ) ?         
> \
> -                              __isfinitef ( x ) :                            
> \
> -                              __isfinite  ( x ) )
> -#ifdef __cplusplus
> -}
> +#define isfinite( x ) ( ( sizeof ( (x) ) == sizeof( float) ) ? \
> +                       __isfinitef ( (float)(x) ) : \
> +                       __isfinited  ( (double)(x) ) )
>  #endif
> -#endif
> -
> 
>  using namespace std;
> 
> diff -ruN gdl-0.8.10/src/basic_fun.cpp gdl-0.8.10.patched/src/basic_fun.cpp
> --- gdl-0.8.10/src/basic_fun.cpp        2005-07-10 11:00:06.000000000 -0400
> +++ gdl-0.8.10.patched/src/basic_fun.cpp        2005-08-10
> 13:08:02.000000000 -0400
> @@ -33,6 +33,13 @@
>  #include <unistd.h>
>  #endif
> 
> +// on OS X isfinite is not defined
> + #if defined(__APPLE__) && !defined(isfinite)
> + #define isfinite( x ) ( ( sizeof ( (x) ) == sizeof( float) ) ? \
> +                         __isfinitef ( (float)(x) ) : \
> +                         __isfinited  ( (double)(x) ) )
> +#endif
> +
>  #include "datatypes.hpp"
>  #include "envt.hpp"
>  #include "dpro.hpp"
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Fink-devel mailing list
> Fink-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fink-devel
> 

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to