[Bf-committers] [PATCH]Fix build issue on blender-2.61 agains gcc-4.7

Campbell Barton ideasman42 at gmail.com
Thu Feb 9 08:06:34 CET 2012


thanks, committed r44000, this also makes CLang build with fluids.

On Thu, Feb 9, 2012 at 6:01 AM, Jochen Schmitt <Jochen at herr-schmitt.de> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hallo,
>
> the following patch allows you to build blender-2.61 agains the
> prerelease of gcc-4.7
>
> The main issue witch gcc-4.7 is, that you have to declare inline function
> before they will be used
>
> Best Regards:
>
> Jochen Schmitt
>
> diff -up blender-2.61/intern/elbeem/intern/ntl_vector3dim.h.gcc47
> blender-2.61/intern/elbeem/intern/ntl_vector3dim.h
> - --- blender-2.61/intern/elbeem/intern/ntl_vector3dim.h.gcc47
> 2012-02-08 18:57:14.006686472 +0100
> +++ blender-2.61/intern/elbeem/intern/ntl_vector3dim.h    2012-02-08
> 19:01:36.319268168 +0100
> @@ -27,6 +27,12 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>
> +/* absolute value */
> +template < class T >
> +inline T
> +ABS( T a )
> +{ return (0 < a) ? a : -a ; }
> +
>  // hack for MSVC6.0 compiler
>  #ifdef _MSC_VER
>  #if _MSC_VER < 1300
> diff -up blender-2.61/intern/elbeem/intern/utilities.h.gcc47
> blender-2.61/intern/elbeem/intern/utilities.h
> - --- blender-2.61/intern/elbeem/intern/utilities.h.gcc47    2011-12-13
> 20:42:21.000000000 +0100
> +++ blender-2.61/intern/elbeem/intern/utilities.h    2012-02-08
> 19:01:37.519253177 +0100
> @@ -10,8 +10,8 @@
>  *
>
> *****************************************************************************/
>  #ifndef UTILITIES_H
> - -#include "ntl_vector3dim.h"
>
> +#include "ntl_vector3dim.h"
>
>  /* debugging outputs , debug level 0 (off) to 10 (max) */
>  #ifdef ELBEEM_PLUGIN
> @@ -177,12 +177,6 @@ inline T
>  MAX( T a, T b )
>  { return (a < b) ? b : a ; }
>
> - -/* absolute value */
> - -template < class T >
> - -inline T
> - -ABS( T a )
> - -{ return (0 < a) ? a : -a ; }
> - -
>  /* sign of the value */
>  template < class T >
>  inline T
> @@ -208,4 +202,5 @@ SQUARE( T a )
>
>
>  #define UTILITIES_H
> +
>  #endif
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iJwEAQECAAYFAk8yxnAACgkQZLAIBz9lVu8uGAQA2TRCNo1iwqTKnNzluIT4XJmB
> cbspcGwlGDm75d9MYyw0Y0wbrN16NwpeC19Ert2YnRJWSbea+5PTJR9AoAWdmAL7
> 8vZW1WT+K8oudEpWMg+jk7R/TLiRRZQqJO+eYQiDrDbdbF4GvkeDElCOxMZdOc0A
> I+0ojtYS7/ByDBnZKYo=
> =dqUy
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



-- 
- Campbell


More information about the Bf-committers mailing list