1. Coin3D
  2. Coin

Commits

Roy Walmsley  committed 5b810b7 Merge

Merged in TheHubbit/coin/issue45mathundef (pull request #8)

Don't undefine float-versions of math functions when using clang (OS X)

  • Participants
  • Parent commits 963f54f, 9099b11
  • Branches default

Comments (0)

Files changed (1)

File include/Inventor/C/base/math-undefs.h

View file
   This block was originally part of Inventor/C/basic.h, but since the
   #undef's were mangled by the config.status process, it did not really
   work as intended.  20070518 larsa
-*/
+ 
+ cmath from "The LLVM Compiler Infrastructure" uses float-versions of the
+ math functions below. Therefore don't undefine them when __clang__ is
+ defined.
+ 
+ */
+
+#ifndef __clang__
 
 #undef cosf
 #define cosf(x) NO_SINGLEPREC /* whatever that'll give us a compile error... */
 #undef atan2f
 #define atan2f(x) NO_SINGLEPREC
 
+#endif // !__clang__
+
+
 /* *********************************************************************** */
 
 #endif // !COIN_MATH_UNDEFS_H