GRASS GIS 7 Programmer's Manual  7.0.3(2016)-r00000
endian.c
Go to the documentation of this file.
1 
25 {
26  union
27  {
28  int testWord;
29  char testByte[sizeof(int)];
30  } endianTest;
31 
32  endianTest.testWord = 1;
33 
34  if (endianTest.testByte[0] == 1)
35  return 1; /* true: little endian */
36 
37  return 0; /* false: big endian */
38 }
int G_is_little_endian(void)
Tests for little ENDIAN.
Definition: endian.c:24