Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1368 closed bug (fixed)

seq is not working.

Reported by: rdaneel Owned by: korli
Priority: normal Milestone: R1
Component: System/ Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All


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:

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 axeld, 13 years ago

Component: - Applications/Command Line ToolsSystem/
Owner: changed from axeld to korli

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 :-)

comment:2 by korli, 13 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 bonefish, 13 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 korli, 13 years ago

seq was changed in 6.7 to use long double :

using the older version works with gcc2.95.

Could we keep the old copy around to build with gcc 2.95 ?

comment:5 by korli, 13 years ago

Resolution: fixed
Status: newclosed

I copied the old seq.c to be used with gcc 2.95 in hrev21883.

comment:6 by bonefish, 13 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 axeld, 13 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:8 by korli, 13 years ago

Fixed for real in hrev23127. Reverted hrev21883 in hrev23128.

comment:9 by korli, 13 years ago

(clearing up) As the fix is for gcc, it should be rebuilt to have the bug fixed.

Note: See TracTickets for help on using tickets.