Add a function to test indianness of the platform

This commit is contained in:
2015-05-23 11:39:00 +03:00
parent 5138fe1db6
commit d5fcd52188
2 changed files with 74 additions and 0 deletions

20
src/littlebigman.c Normal file
View File

@ -0,0 +1,20 @@
/*
* littlebigman.c
*
* Created on: 23 mai 2015
* Author: coissac
*/
#include <littlebigman.h>
bool islittlend()
{
union { int entier;
char caractere[4] ;
} test;
test.entier=0x01020304;
return (test.caractere[3] == 1);
}