[Kstars-devel] Compilation of KStars/htmesh broken on FreeBSD

Joseph Kerian jkerian at gmail.com
Thu Oct 4 19:57:08 CEST 2007


Regarding the first part of the patch... does kstars actually compile
on any arch that doesn't support boolean? If so... I suspect explicit
testing for those archs (Solaris?) might be easier than enumerating
the exceptions.

In the second part, LONG_LONG_MAX doesn't seem to be defined anywhere
in C++98 or C99. limits.h (or climits) defines LLONG_MAX, which
perhaps this line should be changed to outright.

--a non kstars dev
Joe

===================================================================
--- kstars/htmesh/SpatialGeneral.h      (revision 720996)
+++ kstars/htmesh/SpatialGeneral.h      (working copy)
@@ -75,7 +75,7 @@

 // emulate the standard bool type where not supported by compiler

-#  if !defined(SXGENERAL_H) && !defined(__sgi) && !defined(__linux)
&& !defined(_WIN32)
+#  if !defined(SXGENERAL_H) && !defined(__sgi) && !defined(__linux)
&& !defined(_WIN32) && !defined(__FreeBSD__)
 #    ifdef __unix
 /*
  * The following ifndef must ALWAYS be present since C++ may use
Index: kstars/htmesh/SkipListElement.h
===================================================================
--- kstars/htmesh/SkipListElement.h     (revision 720996)
+++ kstars/htmesh/SkipListElement.h     (working copy)
@@ -24,7 +24,11 @@
 #ifdef _WIN32
 #define KEY_MAX _I64_MAX
 #else
-#define KEY_MAX LONG_LONG_MAX
+#  ifdef __FreeBSD__
+#    define KEY_MAX LLONG_MAX
+#  else
+#    define KEY_MAX LONG_LONG_MAX
+#  endif
 #endif

 typedef int64 Key;            // key type


More information about the Kstars-devel mailing list