Can't return signed longs from .c

BlitzMax Forums/BlitzMax Programming/Can't return signed longs from .c

Hi,

I was messing with hires timers which use longs. I can't return a signed long from some .c code, am I doing something wrong?

This won't even return 1, let alone 9223372036854775807.

If I change ReturnLong:Long() to ReturnLong:Int() I get '4147483647'

Cheers
Tom



.C
//longtest.c
signed int ReturnInt()
{
	return 2147483647;
}

signed long ReturnLong()
{
	return 1; //9223372036854775807;
}


B'Max

Import "longtest.c"
Extern 
	Function ReturnInt:Int()
	Function ReturnLong:Long()
End Extern

i:Int = ReturnInt()
t:Long = ReturnLong()

Print i '2147483647
Print t 'always 0 ?