--- Marc Kleine-Budde <[EMAIL PROTECTED]> wrote: > On Fri, Jun 27, 2003 at 10:01:49AM -0700, Dalibor Topic wrote: > > it seems that divjava fails because long remainder is broken on > powerpc-linux. > > Could you try out the following C program, and report back what it prints > out:
#include <stdio.h>
#include <limits.h>
#define T long
#ifndef LONG_MIN
# define LONG_MIN ((((unsigned T)(~(T)0))>>1)+1)
#endif
T foo(T i, T j);
int main() {
T tmp = foo(LONG_MIN, -1l);
printf ("%ld\n", tmp);
return
0;}
T foo(T i, T j) { return i % j; }
since I'm curious what exactly is returned by powerpc-linux. -1 I assume.
In any case, does the attached patch fix the issue?
cheers,
dalibor topic
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
powerpc-linux-divtest.diff
Description: powerpc-linux-divtest.diff
