mxflib/system.h
static bool IsLittleEndian()
	{
		unsigned int val = 0x12345678;
	    unsigned char *p;

   		p = (unsigned char *)&val;

    	if (p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78)
        	return false;
    	else if (p[0] == 0x78 && p[1] == 0x56 && p[2] == 0x34 && p[3] == 0x12)
        	return true;

		return false;
	}
// Runtime detection of endian-ness using detection code that executes once.
// The variable littleEndian is then used to check if bytes read/written to
// files need to be swapped.
Runtime detection of endian-ness using detection code that executes once.
The variable littleEndian is then used to check if bytes read/written to
files need to be swapped.
Runtime detection of endian - ness using detection code that executes once . The variable littleEndian is then used to check if bytes read / written to files need to be swapped .
static bool IsLittleEndian()
	{
		unsigned int val = 0x12345678;
	    unsigned char *p;
   		p = (unsigned char *)&val;
    	if (p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78)
        	return false;
    	else if (p[0] == 0x78 && p[1] == 0x56 && p[2] == 0x34 && p[3] == 0x12)
        	return true;
		return false;
	}
static bool IsLittleEndian ( ) { unsigned int val = 0x12345678 ; unsigned char * p ; p = ( unsigned char * ) & val ; if ( p [ 0 ] == 0x12 && p [ 1 ] == 0x34 && p [ 2 ] == 0x56 && p [ 3 ] == 0x78 ) return false ; else if ( p [ 0 ] == 0x78 && p [ 1 ] == 0x56 && p [ 2 ] == 0x34 && p [ 3 ] == 0x12 ) return true ; return false ; }
Runtime detection of endian-ness using detection code that executes once.
Runtime detection of endian - ness using detection code that executes once .