mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-05 09:40:38 +00:00
autodetect endian and wordsize with gnuisms
(Logical change 1.179) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@601 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
bb1a4d9a53
commit
bfe42ca422
@ -26,21 +26,18 @@
|
||||
typedef unsigned long ulong32;
|
||||
typedef unsigned long long ulong64;
|
||||
|
||||
/*
|
||||
* Tested on arm2401, i386, x86_64
|
||||
*/
|
||||
#if defined(__arm__)
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define ENDIAN_LITTLE
|
||||
#endif
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
#define ENDIAN_BIG
|
||||
#define ENDIAN_32BITWORD
|
||||
#endif
|
||||
#if defined(__i386__)
|
||||
#define ENDIAN_LITTLE
|
||||
#define ENDIAN_32BITWORD
|
||||
#endif
|
||||
#if defined(__x86_64__)
|
||||
#define ENDIAN_LITTLE
|
||||
#if __WORDIZE == 64
|
||||
#define ENDIAN_64BITWORD
|
||||
#endif
|
||||
#if __WORDIZE == 32
|
||||
#define ENDIAN_32BITWORD
|
||||
#endif
|
||||
|
||||
/* ---- HELPER MACROS ---- */
|
||||
#ifdef ENDIAN_NEUTRAL
|
||||
|
Loading…
Reference in New Issue
Block a user