aboutsummaryrefslogtreecommitdiff
path: root/tools/iDSK/src/endianPPC.cpp
blob: 7b51225bad6c4f1210f4fb4d637eeacde09115ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include <cstdlib>
using namespace std;
#include "endianPPC.h"

#ifndef _MSC_VER
#include <sys/param.h>
#include <endian.h>
#endif

bool isBigEndian(void)
{
#ifdef BYTE_ORDER
    	return BYTE_ORDER == BIG_ENDIAN;
#elif defined _MSC_VER
	return true; // It doesn't run on anything except x86, right?
#else
    return __BYTE_ORDER == __BIG_ENDIAN;
#endif
}