Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-19 12:02:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-19 12:02:17 +0400
commit83a2f02a78cd01aaf31b9b4ae8a217a1ecea6a49 (patch)
tree9a2b9e2d5aa4f5b5bc4835848c3dc78029643d9a /source/blender/blenkernel/BKE_global.h
parent425a81a29b8adf1fc2d913dfc679d6ca62cd05fa (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/blenkernel/BKE_global.h')
-rw-r--r--source/blender/blenkernel/BKE_global.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 0e48673f1b1..a59d43d315d 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -151,9 +151,18 @@ typedef struct Global {
/* ENDIAN_ORDER: indicates what endianness the platform where the file was
* written had. */
+#if !defined( __BIG_ENDIAN__ ) && !defined( __LITTLE_ENDIAN__ )
+# error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined.
+#endif
+
#define L_ENDIAN 1
#define B_ENDIAN 0
-extern short ENDIAN_ORDER;
+
+#ifdef __BIG_ENDIAN__
+# define ENDIAN_ORDER B_ENDIAN
+#else
+# define ENDIAN_ORDER L_ENDIAN
+#endif
/* G.moving, signals drawing in (3d) window to denote transform */
#define G_TRANSFORM_OBJ 1