You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ian Holsman <Ia...@cnet.com> on 2001/04/27 19:06:16 UTC
apr_snprintf fails on solaris 2.6
Solaris 2.6 does not have a 'isinf' function
Index: apr_snprintf.c
===================================================================
RCS file: /home/cvspublic/apr/strings/apr_snprintf.c,v
retrieving revision 1.13
diff -u -r1.13 apr_snprintf.c
--- apr_snprintf.c 2001/04/27 13:01:59 1.13
+++ apr_snprintf.c 2001/04/27 17:10:34
@@ -958,10 +958,6 @@
s = "nan";
s_len = 3;
}
- else if (isinf(fp_num)) {
- s = "inf";
- s_len = 3;
- }
else {
s = conv_fp(*fmt, fp_num, alternate_form,
(adjust_precision == NO) ? FLOAT_DIGITS : precision,
--
Ian Holsman
Performance Measurement & Analysis
415-364-8608
Re: apr_snprintf fails on solaris 2.6
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Fri, Apr 27, 2001 at 10:06:16AM -0700, Ian Holsman wrote:
> Solaris 2.6 does not have a 'isinf' function
mail.apache.org seems to be lagging about 10 minutes behind. Makes
for duplicate patches everywhere... =)
I've also seen some stuff for Netware go in. Yum. -- justin
Re: apr_snprintf fails on solaris 2.6
Posted by Jeff Trawick <tr...@bellsouth.net>.
Sascha Schumann <sa...@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...
Re: apr_snprintf fails on solaris 2.6
Posted by Sascha Schumann <sa...@schumann.cx>.
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)
- Sascha Experience IRCG
http://schumann.cx/ http://schumann.cx/ircg