Ticket #41786: Coin-math-undefs.patch

File Coin-math-undefs.patch, 2.1 KB (added by mojca (Mojca Miklavec), 10 years ago)
  • Portfile

     
    3030patchfiles          configure.patch \
    3131                    for.patch \
    3232                    clang-name-lookup.diff \
    33                     fix-weird-error.diff
     33                    fix-weird-error.diff \
     34                    patch-include-Inventor-C-base-math-undefs.h.diff
    3435
    3536configure.args      --with-simage=${prefix} \
    3637                    --mandir=${prefix}/share/man
  • files/for.patch

     
    11Index: src/shadows/SoShadowGroup.cpp
    22===================================================================
    3 1869c1869
     31699c1699
    44<   for (int i = 0; i < numshadowlights; i++) {
    55---
    66>   for (i = 0; i < numshadowlights; i++) {
  • files/patch-include-Inventor-C-base-math-undefs.h.diff

     
     1https://bitbucket.org/Coin3D/coin/commits/9099b117765e03f96bd38ffd9cf58d055b07a4b4
     2
     3--- include/Inventor/C/base/math-undefs.h.orig
     4+++ include/Inventor/C/base/math-undefs.h
     5@@ -38,7 +38,14 @@
     6   This block was originally part of Inventor/C/basic.h, but since the
     7   #undef's were mangled by the config.status process, it did not really
     8   work as intended.  20070518 larsa
     9-*/
     10+
     11+ cmath from "The LLVM Compiler Infrastructure" uses float-versions of the
     12+ math functions below. Therefore don't undefine them when __clang__ is
     13+ defined.
     14+
     15+ */
     16+
     17+#ifndef __clang__
     18 
     19 #undef cosf
     20 #define cosf(x) NO_SINGLEPREC /* whatever that'll give us a compile error... */
     21@@ -59,6 +66,9 @@
     22 #undef atan2f
     23 #define atan2f(x) NO_SINGLEPREC
     24 
     25+#endif // !__clang__
     26+
     27+
     28 /* *********************************************************************** */
     29 
     30 #endif // !COIN_MATH_UNDEFS_H