diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-19 12:02:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-19 12:02:17 +0400 |
commit | 83a2f02a78cd01aaf31b9b4ae8a217a1ecea6a49 (patch) | |
tree | 9a2b9e2d5aa4f5b5bc4835848c3dc78029643d9a /source/blender/makesdna | |
parent | 425a81a29b8adf1fc2d913dfc679d6ca62cd05fa (diff) |
cleanup endian handling
- define __BIG_ENDIAN__ or __LITTLE_ENDIAN__ with cmake & scons.
- ENDIAN_ORDER is now a define rather than a global short.
- replace checks like this with single ifdef: #if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
- remove BKE_endian.h which isn't used
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 8fd9f49cd0a..80fc6f63363 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -146,16 +146,16 @@ typedef struct PreviewImage { * **/ -#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__) -/* big endian */ -#define MAKE_ID2(c, d) ( (c)<<8 | (d) ) -#define MOST_SIG_BYTE 0 -#define BBIG_ENDIAN +#ifdef __BIG_ENDIAN__ + /* big endian */ +# define MAKE_ID2(c, d) ( (c)<<8 | (d) ) +# define MOST_SIG_BYTE 0 +# define BBIG_ENDIAN #else -/* little endian */ -#define MAKE_ID2(c, d) ( (d)<<8 | (c) ) -#define MOST_SIG_BYTE 1 -#define BLITTLE_ENDIAN + /* little endian */ +# define MAKE_ID2(c, d) ( (d)<<8 | (c) ) +# define MOST_SIG_BYTE 1 +# define BLITTLE_ENDIAN #endif /* ID from database */ |