diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-01 17:11:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-01 17:11:35 +0000 |
commit | fd2436817f0466d182ac4478f1fee3f2368a81ea (patch) | |
tree | 06e45dbd118d89504fbfd87ed2787266e607f1e3 /src/include/gnunet_common.h | |
parent | 67f3331b28aee547a80a972099c85e91cb3d5382 (diff) | |
download | gnunet-fd2436817f0466d182ac4478f1fee3f2368a81ea.tar.gz gnunet-fd2436817f0466d182ac4478f1fee3f2368a81ea.zip |
-barato's byte order patch, might even help with #2130
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r-- | src/include/gnunet_common.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 7e6d20b15..35db82a3a 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -66,20 +66,32 @@ | |||
66 | 66 | ||
67 | #define GNUNET_MAX(a,b) (((a) > (b)) ? (a) : (b)) | 67 | #define GNUNET_MAX(a,b) (((a) > (b)) ? (a) : (b)) |
68 | 68 | ||
69 | /* some systems use one underscore only... */ | 69 | /* some systems use one underscore only, and mingw uses no underscore... */ |
70 | #ifndef __BYTE_ORDER | 70 | #ifndef __BYTE_ORDER |
71 | #ifdef _BYTE_ORDER | 71 | #ifdef _BYTE_ORDER |
72 | #define __BYTE_ORDER _BYTE_ORDER | 72 | #define __BYTE_ORDER _BYTE_ORDER |
73 | #else | ||
74 | #ifdef BYTE_ORDER | ||
75 | #define __BYTE_ORDER BYTE_ORDER | ||
76 | #endif | ||
73 | #endif | 77 | #endif |
74 | #endif | 78 | #endif |
75 | #ifndef __BIG_ENDIAN | 79 | #ifndef __BIG_ENDIAN |
76 | #ifdef _BIG_ENDIAN | 80 | #ifdef _BIG_ENDIAN |
77 | #define __BIG_ENDIAN _BIG_ENDIAN | 81 | #define __BIG_ENDIAN _BIG_ENDIAN |
82 | #else | ||
83 | #ifdef BIG_ENDIAN | ||
84 | #define __BIG_ENDIAN BIG_ENDIAN | ||
85 | #endif | ||
78 | #endif | 86 | #endif |
79 | #endif | 87 | #endif |
80 | #ifndef __LITTLE_ENDIAN | 88 | #ifndef __LITTLE_ENDIAN |
81 | #ifdef _LITTLE_ENDIAN | 89 | #ifdef _LITTLE_ENDIAN |
82 | #define __LITTLE_ENDIAN _LITTLE_ENDIAN | 90 | #define __LITTLE_ENDIAN _LITTLE_ENDIAN |
91 | #else | ||
92 | #ifdef LITTLE_ENDIAN | ||
93 | #define __LITTLE_ENDIAN LITTLE_ENDIAN | ||
94 | #endif | ||
83 | #endif | 95 | #endif |
84 | #endif | 96 | #endif |
85 | 97 | ||