IsLittleEndian macro

Mon, 28 Jan 2008 23:43:35 -0500 - Author:

Here is an inline method to determine the byte order of the running computer.

inline int IsLittleEndian(){
  int i = 1 ;
  return (*((char *) &i )) ? 1 : 0;
}