apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: apr_snprintf fails on solaris 2.6
Date Sat, 28 Apr 2001 12:25:29 GMT
Sascha Schumann <sascha@schumann.cx> writes:

> On Fri, 27 Apr 2001, Ian Holsman wrote:
> 
> > Solaris 2.6 does not have a 'isinf' function
> 
>     There are various ways:
> 
>     Linux, BSD:  isinf(a)
>     C99:         (a) == INFINITY
>     Solaris:     (fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF)

Cool...  For now a ISINF() macro local to apr_snprintf.c sounds
appropriate... 

#if defined(HAVE_ISINF)
#define ISINF(a) isinf(a)
#elif defined(HAVE_FPCLASS)                       <<<< add check for this fn
#define ISINF(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
#elif defined(INFINITY)
#define ISINF(a) ((a) == INFINITY)                <<<< hopefully nobody else uses
this
#else
#define ISINF(a) 0                                <<<< maybe leads to warnings?
#endif

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message