src/endian_check.cpp
changeset 5838 9c3129cb019b
parent 5835 e0ff603ae0b7
child 6268 4b5241e5dd10
equal deleted inserted replaced
5837:96b4b92b86ae 5838:9c3129cb019b
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 #include <stdio.h>
     3 #include <stdio.h>
       
     4 #include <string.h>
     4 
     5 
     5 // This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN
     6 // This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN
     6 //  it does that by putting a 1 and a 0 in an array, and read it out as one
     7 //  it does that by putting a 1 and a 0 in an array, and read it out as one
     7 //  number. If it is 1, it is LITTLE_ENDIAN, if it is 256, it is BIG_ENDIAN
     8 //  number. If it is 1, it is LITTLE_ENDIAN, if it is 256, it is BIG_ENDIAN
     8 //
     9 //