[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40064] trunk/blender: Apply small patch by Shane Ambler:
Nathan Letwory
nathan at letworyinteractive.com
Fri Sep 9 14:23:45 CEST 2011
Revision: 40064
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40064
Author: jesterking
Date: 2011-09-09 12:23:45 +0000 (Fri, 09 Sep 2011)
Log Message:
-----------
Apply small patch by Shane Ambler:
* inline of math funcs for Apple PPC
* eltopo big/little endian ifdef
Modified Paths:
--------------
trunk/blender/extern/eltopo/common/bfstream.h
trunk/blender/source/blender/blenlib/BLI_math_inline.h
Modified: trunk/blender/extern/eltopo/common/bfstream.h
===================================================================
--- trunk/blender/extern/eltopo/common/bfstream.h 2011-09-09 12:21:41 UTC (rev 40063)
+++ trunk/blender/extern/eltopo/common/bfstream.h 2011-09-09 12:23:45 UTC (rev 40064)
@@ -6,7 +6,16 @@
#include <cstdlib>
#include <fstream>
+// __BIG_ENDIAN__ or __LITTLE_ENDIAN__ should be defined before the compiler gets here
+// true in gcc 4.2 but may not be guarenteed between compilers/versions ??
+
+// list taken from source/blender/blenkernel/BKE_utildefines.h
+#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
+#define __BIG_ENDIAN__
+#else
#define __LITTLE_ENDIAN__
+#endif
+
#ifdef __BIG_ENDIAN__
#ifdef __LITTLE_ENDIAN__
#error Cannot be both big and little endian
Modified: trunk/blender/source/blender/blenlib/BLI_math_inline.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_inline.h 2011-09-09 12:21:41 UTC (rev 40063)
+++ trunk/blender/source/blender/blenlib/BLI_math_inline.h 2011-09-09 12:23:45 UTC (rev 40064)
@@ -45,8 +45,13 @@
#define MALWAYS_INLINE MINLINE
#else
#define MINLINE static inline
+#if (defined(__APPLE__) && defined(__ppc__))
+/* static inline __attribute__ here breaks osx ppc gcc42 build */
+#define MALWAYS_INLINE static __attribute__((always_inline))
+#else
#define MALWAYS_INLINE static inline __attribute__((always_inline))
#endif
+#endif
#else
#define MINLINE
#define MALWAYS_INLINE
More information about the Bf-blender-cvs
mailing list