Re: seq: revert Solaris 8 work-around that caused x86 regression
From:
Jim Meyering
Subject:
Re: seq: revert Solaris 8 work-around that caused x86 regression
Date:
Sat, 25 Oct 2008 16:49:30 +0200
Jim Meyering <address@hidden> wrote:
> Paul Eggert <address@hidden> wrote:
>> Here's the bug:
>>
>> $ seq 9223372036854775807 9223372036854775808
>> 9223372036854775807
>> 9223372036854775808
>> 9223372036854775809
> ...
>> We can't easily add the above test case, since it's not portable to
>> hosts where long double == double.
>
> Here's a proposed patch.
> Do any of you know of a system on which it would fail?
I found two:
powerpc-apple-darwin8.11.0
--- out 2008-10-25
+++ exp 2008-10-25
@@ -1,2 +1,2 @@
-18446744073709551615
+9223372036854775807
9223372036854775808
FreeBSD i386-unknown-freebsd6.1
+ diff -u out exp
--- out 2008-10-25
+++ exp 2008-10-25
@@ -1,1026 +1,2 @@
9223372036854775807
9223372036854775808
-9223372036854775808
-9223372036854775808
...
-9223372036854775808
-9223372036854775808
While neither is new and both should be addressed,
fixing corner cases like these is not high priority for me.
Obviously, using gmp here (like in expr and factor) would solve
this nicely.
So either the sizeof test is insufficient, or
there are other bugs (I suspect the latter).
For now, I may just sweep this under the rug
and skip the test on systems without glibc.
Alternative patches welcome.