Mail Archives: djgpp/2003/04/22/13:00:08
Richard Dawe wrote:
>I'm having trouble understanding why it doesn't just do % and /. Why is there
>all this other code?
>
div() and ldiv() were originally this way as well. I don't understand
why those extra tests were ever in there, since they not only complicate
the code, but result in incorrect behavior. At some point one gives up
trying to understand why the bugs were there, and just fixes them.
Somehow lldiv() was derived from the earlier buggy div() or ldiv(), so
it also needs to be fixed in an analogous way. My postings to
djgpp-workers somehow aren't showing up there, but perhaps one of the
maintainers could take appropriate action. I'd submit a new bug report,
but this is an old bug.
One big question for me is how div() could get fixed in the CVS tree on
2000-07-08, but the 2.03 libc.a, dated 2001-12-24, still contained the
old, buggy div(). It appears that the 2.03 tags didn't get updated.
I just looked at the CVS tips, and it appears that div() and ldiv() are
correct, but lldiv() is not.
-Eric Rudd
rudd AT cyberoptics DOT com
- Raw text -