Subject: RE: x11/kdelibs3 compile problems on Solaris
To: None <pkgsrc-users@netbsd.org,>
From: Jake Kupersmith <jakerosoft@gmail.com>
List: pkgsrc-users
Date: 10/18/2006 00:19:34
> Hi, I'm building x11/kdelibs3 with GCC-4.1.1 on Sparc Solaris. Could anyone who
> knows C++ suggest how to fix the following error:

This patch fixes the problem for me..

$ cat /pkgsrc/local-patches/x11/kdelibs3/kjs_operations_cpp
--- kjs/operations.cpp.orig     Wed Oct 18 00:02:46 2006
+++ kjs/operations.cpp  Wed Oct 18 00:10:04 2006
@@ -38,11 +38,16 @@
 #include <sunmath.h>
 #endif

-#ifndef HAVE_FUNC_ISINF
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
+#if defined (__SVR4) && defined (__sun) && ! defined (isinf)
+#  include <ieeefp.h>
+  static inline int isinf(double x) { return !finite(x) && x==x; }
+#else
+#  ifndef HAVE_FUNC_ISINF
+#  ifdef HAVE_IEEEFP_H
+#    include <ieeefp.h>
+#  endif
+#  endif /* HAVE_FUNC_ISINF */
 #endif
-#endif /* HAVE_FUNC_ISINF */

 #if HAVE_FLOAT_H
 #include <float.h>