freebsd-ports/math/freemat/files/extra-patch-libs__libFN__FNFun.cpp
Greg Larkin d3f4123373 - Added new patches to support building under gcc 4.5 due to impending
default gcc version change when USE_FORTRAN=yes. Patches included from
  http://bugs.gentoo.org/show_bug.cgi?id=318045. [1]

- Renamed and conditionalized some patches to support tgammaf function
  on OSVERSION < 800023.  Previously, it was included even when present
  in the system math library.  Also fixed name-mangling problem in the
  patches.  Declarations were wrapped in 'extern "C"', but the
  definitions were not, causing a linker error.

- Added a patch to CMakeLists.txt to prevent cmake from changing rpath
  during the installation phase.  That caused libstdc++ from /usr/lib
  to be used instead of the one supplied with gcc 4.5.

Requested by:	gerald [1]
2010-09-24 14:58:14 +00:00

17 lines
397 B
C++

--- ./libs/libFN/FNFun.cpp.orig 2009-10-09 02:23:29.000000000 -0400
+++ ./libs/libFN/FNFun.cpp 2010-09-22 15:29:22.000000000 -0400
@@ -35,6 +35,14 @@
double trunc( double x );
float truncf( float x );
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+ float lgammaf(float x);
+ float tgammaf(float x);
+#ifdef __cplusplus
+}
+#endif
//!
//@Module ERFC Complimentary Error Function