From: | Martin Münstermann <mmuenstermann(at)betrusted(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: 8.0.0beta1: make check fails on solaris8 |
Date: | 2004-08-11 15:22:01 |
Message-ID: | 411A3999.6060409@betrusted.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | andrea.martano | 2004-08-11 15:37:40 | SOLARIS 9 ULTRASPARC BUILD |
Previous Message | Michael Fuhr | 2004-08-11 14:43:19 | Re: 8.0.0beta1: make check fails on solaris8 |