lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> At the moment, we're running on an eval board, and no one seems to know
> if it's little or big. Is there any way to tell using some Linux tool?

the exit status of the program below should be 0 if little, 1 if big:

static union { int x; char endian; } little = { 1 };
main() { exit(!little.endian); }