#include <stdio.h>
Go to the source code of this file.
Function Documentation
Definition at line 36 of file endian.c.
{
int i = 0;
((char *) (&i))[0] = 1;
return (i == 1);
}
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 48 of file endian.c.
{
printf("#ifndef ENDIAN_H\n");
printf("#define ENDIAN_H\n");
printf("#define __LITTLE_ENDIAN 1234\n");
printf("#define __BIG_ENDIAN 4321\n");
printf("#define __BYTE_ORDER __%s_ENDIAN\n", litend()? "LITTLE" : "BIG");
printf("#endif\n");
return 0;
}