Is this a viable BIGENDIAN test:
int tmpvaluethatwillneverreallybeused=1;
bool bigendian=(*(char*)(&tmpvaluethatwillneverreallybeused)==1);
void myFunction()
{
if (bigendian)
{
//do big endian specific code
}
else
{
//do little-endian specific code
}
}