How to determine the problem of the size of the machine, see it in the code of the ORBACUS, this is discharged.
int
Main ()
{
/ * Are We little or big endian? From Harbison & Steler. * /
union
{
Long L;
Char C [sizeof (long);
} u;
u.l = 1;
Exit (u.c [sizeof (long) - 1] == 1);
}
2.
#include
#include
int
Main ()
{
#if byte_order! = BIG_ENDIAN
NOT BIG ENDIAN
#ENDIF
;
Return 0;
}
3.
#include
#include
int
Main ()
{
#if! Byte_Order ||! BIG_ENDIAN ||! Little_ENDIAN
Bogus Endian Macros
#ENDIF
;
Return 0;
}