can you use the pmac on the computer(linux), and what is the kernel
of linux?
[quote='artag' pid='1109' dateline='1295344723']
I'm having some difficulty in using the 'long long' data type on the PPMAC.
I'm using IDE 22/07/2010 1.1.1026, firmware 1.2.1.5 and this example code :
[code]
#include
int main(void)
{
int i;
double dd = 0.0;
long long ll = 0;
for (i = 0; i < 4; ++i) {
dd += 1000000001.0;
ll = dd;
printf("int i %d; double dd %f; long long ll %lld\n",
i,dd,ll);
}
}
[/code]
I can compile this on another machine (x86 linux), and get the result I expect :
[code]
int i 0; double dd 1000000001.000000; long long ll 1000000001
int i 1; double dd 2000000002.000000; long long ll 2000000002
int i 2; double dd 3000000003.000000; long long ll 3000000003
int i 3; double dd 4000000004.000000; long long ll 4000000004
[/code]
I can also compile it natively on the PPMAC and get the same result.
However, if I compile it using the IDE, I get :
[code]
int i 0; double dd 1000000001.000000; long long ll 0
int i 1; double dd 2000000002.000000; long long ll 0
int i 2; double dd 3000000003.000000; long long ll 0
int i 3; double dd 4000000004.000000; long long ll 0
[/code]
I guess this is due to a difference between the cross and native compilers, either due to the crosscompilation or merely an older version. Does the forthcoming IDE release fix this ?
-adrian
[/quote]