Source: clucene-core
Version: 2.3.3.4-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Control: forwarded -1 http://sourceforge.net/p/clucene/bugs/217/

Hi,

clucene-core 2.3.3.4 does not compile on GNU/Hurd [1].

The failure happens because pthread_t (whose actual definition is
implementation-defined) is a typedef to int, and thus the
lucene::util::Misc::toString implementation for the
_LUCENE_THREADID_TYPE type (= pthread_t) conflicts with int32_t
implementation.

I reported the problem upstream [2]; in the meanwhile (upstream seems
dead?) could it be possible to apply the proposed quick fix to disable
one of the two toString on Hurd?

[1] 
https://buildd.debian.org/status/fetch.php?pkg=clucene-core&arch=hurd-i386&ver=2.3.3.4-3&stamp=1375020418
[2] http://sourceforge.net/p/clucene/bugs/217/

Thanks,
-- 
Pino
--- a/src/shared/CLucene/util/Misc.cpp
+++ b/src/shared/CLucene/util/Misc.cpp
@@ -466,6 +466,7 @@ bool Misc::listFiles(const char* directo
 std::string Misc::toString(const bool value){
   return value ? "true" : "false";
 }
+#ifndef __GNU__
 std::string Misc::toString(_LUCENE_THREADID_TYPE value){
   static int32_t nextindex = 0;
   static std::map<_LUCENE_THREADID_TYPE, int32_t> ids;
@@ -474,6 +475,7 @@ std::string Misc::toString(_LUCENE_THREA
   }
   return toString(ids[value]);
 }
+#endif
 std::string Misc::toString(const int32_t value){
   char buf[20];
   TCHAR tbuf[20];
--- a/src/shared/CLucene/util/Misc.h
+++ b/src/shared/CLucene/util/Misc.h
@@ -67,7 +67,9 @@ CL_NS_DEF(util)
 
   static std::string toString(const int32_t value);
   static std::string toString(const int64_t value);
+#ifndef __GNU__
   static std::string toString(const _LUCENE_THREADID_TYPE value);
+#endif
   static std::string toString(const bool value);
   static std::string toString(const float_t value);
   static std::string toString(const TCHAR* s, int32_t len=-1);

Reply via email to