Re: 8.0.0beta1: make check fails on solaris8 - Mailing list pgsql-bugs

From Martin Münstermann
Subject Re: 8.0.0beta1: make check fails on solaris8
Date
Msg-id 411A3999.6060409@betrusted.com
Whole thread Raw
In response to Re: 8.0.0beta1: make check fails on solaris8  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:
> So forget my previous proposed patch and try this one:
>
>     /* skip leading whitespace */
>     while (*num != '\0' && isspace((unsigned char) *num))
>         num++;
>
>     errno = 0;
>     val = strtod(num, &endptr);
>
> +    if (endptr != num && endptr[-1] == 0)
> +        endptr--;
>
>     /* did we not see anything that looks like a double? */

Yeah, with this patch the tests just pass on solaris8.

--- float.c.orig        Wed Aug  4 23:34:02 2004
+++ float.c     Wed Aug 11 16:37:00 2004
@@ -282,6 +282,9 @@        errno = 0;        val = strtod(num, &endptr);

+       if (endptr != num && endptr[-1] == 0)
+               endptr--;
+        /* did we not see anything that looks like a double? */        if (endptr == num || errno != 0)        {
@@ -446,6 +449,10 @@
        errno = 0;        val = strtod(num, &endptr);
+
+       if (endptr != num && endptr[-1] == 0)
+               endptr--;
+
        /* did we not see anything that looks like a double? */        if (endptr == num || errno != 0)


Regards, Martin Muenstermann


pgsql-bugs by date:

Previous
From: Andras Kutrovics
Date:
Subject: PostgreSQL 8.0
Next
From: andrea.martano@lighthousetc.net
Date:
Subject: SOLARIS 9 ULTRASPARC BUILD