chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Solaris 10 / SPARC - missing isinf


From: Claude Marinier
Subject: [Chicken-users] Solaris 10 / SPARC - missing isinf
Date: Tue, 5 Jul 2011 13:20:54 -0400 (EDT)
User-agent: Alpine 2.00 (GSO 1167 2008-08-23)

Hi,

Building chicken 4.7.0 on Solaris 10 running on SPARC (M5000) with gcc 3.4.6 from SunFreeware.

Linking chicken fails with missing isinf. Added definition to chicken.h after line 954.

    #define C_isinf(f)                 isinf(f)"

Found definition on autoconf web site. See below.

A better solution is needed.

Thanks.

--
Claude Marinier



#ifndef isinf
# define isinf(x) \
    (sizeof (x) == sizeof (long double) ? isinf_ld (x) \
     : sizeof (x) == sizeof (double) ? isinf_d (x) \
     : isinf_f (x))
static inline int isinf_f  (float       x)
{ return !isnan (x) && isnan (x - x); }
static inline int isinf_d  (double      x)
{ return !isnan (x) && isnan (x - x); }
static inline int isinf_ld (long double x)
{ return !isnan (x) && isnan (x - x); }
#endif




reply via email to

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