Paul Eggert <[email protected]> writes:

> Here's a simpler test case that illustrates the Solaris bug,
> in case there's anybody here who can get bug fixes
> into Solaris:
>
> #include <stdio.h>
> int
> main (void)
> {
>   char buf[1000];
>   int n = snprintf (buf, sizeof buf, "%.511f", 1.0);
>   printf ("%d %s\n", n, buf);
>   return 0;
> }
>
> This prints "513 0.0...." rather than the correct "513 1.0....".

Wouldn't it make sense to add a self-test for this, which would fail on
all other platforms, but on Solaris, return -77 to cause a SKIP?
Possibly also print a message with a link to this thread.  That way,
people building on Solaris will notice the issue and someone may
eventually get it fixed upstream.

If there are no objections, I'll write up a self-test.

/Simon

Reply via email to