endian_check.c
changeset 2186 461a2aff3486
parent 1692 2587eee1c632
child 2713 9f06e1f94ce9
equal deleted inserted replaced
2185:b06d0e4a26eb 2186:461a2aff3486
       
     1 /* $Id$ */
       
     2 
     1 #include <stdio.h>
     3 #include <stdio.h>
     2 
     4 
     3 // This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN
     5 // This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN
     4 //  it does that by putting a 1 and a 0 in an array, and read it out as one
     6 //  it does that by putting a 1 and a 0 in an array, and read it out as one
     5 //  number. If it is 1, it is LITTLE_ENDIAN, if it is 256, it is BIG_ENDIAN
     7 //  number. If it is 1, it is LITTLE_ENDIAN, if it is 256, it is BIG_ENDIAN