#1368 closed bug (fixed)
seq is not working.
Reported by: | rdaneel | Owned by: | korli |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/libroot.so | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is the Haiku's seq output: ~> seq 10 0 0 0 0 0 0 4 c2 00
It should be: 1 2 3 4 5 6 7 8 9 10
I dont know where the problema is. The source looks good: http://svn.berlios.de/viewcvs/haiku/haiku/trunk/src/bin/coreutils/src/seq.c?rev=19747&view=markup
And this sample program is working. #include <stdio.h> int main() {
int max = 5; long i; for (i=0; i < max ; i++) printf("%L ",i);
}
Change History (9)
comment:1 by , 17 years ago
Component: | - Applications/Command Line Tools → System/libroot.so |
---|---|
Owner: | changed from | to
comment:2 by , 17 years ago
Just had a look and the weird thing is : it's working ok with a gcc4 build, but not a gcc2.95.3 ...
comment:3 by , 17 years ago
Probably the compiler would need long long double support and gcc 2.95.3 might not implement it (properly), while gcc 4 does. I suppose it's some configuration issue of glibc (or coreutils?), but Axel and I didn't spot it.
comment:4 by , 17 years ago
seq was changed in 6.7 to use long double : http://svn.berlios.de/viewcvs/haiku/haiku/trunk/src/bin/coreutils/src/seq.c?rev=19747&r1=17309&r2=19747
using the older version works with gcc2.95.
Could we keep the old copy around to build with gcc 2.95 ?
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I copied the old seq.c to be used with gcc 2.95 in hrev21883.
comment:6 by , 17 years ago
I wonder, if other programs of the coreutils have similar problems. Maybe it would be better to have a complete copy of the old coreutils. Not sure...
comment:7 by , 17 years ago
I would guess they might also have fixed several vulnerabilities, and also improved the usage of several commands, so I don't think it's a good idea to just remove those changes.
I think replacing seq with an older version is the way to go, though, and we could take a similar route for other apps, but IMO we should only do so when we actually encounter any problems with them.
comment:9 by , 17 years ago
(clearing up) As the fix is for gcc, it should be rebuilt to have the bug fixed.
Ingo and I had investigated the issue a while back, and it looks our printf() is broken for "long long double". Since Korli had last worked on glibc's printf(), I'm assigning it to him - I hope he'll like it :-)