GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
endian.c
Go to the documentation of this file.
1 
30 {
31  union
32  {
33  int testWord;
34  char testByte[sizeof(int)];
35  } endianTest;
36 
37  endianTest.testWord = 1;
38 
39  if (endianTest.testByte[0] == 1)
40  return 1; /* true: little endian */
41 
42  return 0; /* false: big endian */
43 }
int
Definition: g3dcolor.c:48
int G_is_little_endian(void)
Tests for little ENDIAN.
Definition: endian.c:29