[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-bugs] [bug #13790] Configure finds pthread but there are not u
From: |
spiralvoice |
Subject: |
[Mldonkey-bugs] [bug #13790] Configure finds pthread but there are not used |
Date: |
Wed, 20 Jul 2005 16:32:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.9) Gecko/20050714 Firefox/1.0.5 |
Follow-up Comment #3, bug #13790 (project mldonkey):
There need to be several things present in order to let MLDonkey
use threads:
Buildinfo uses:
if BasicSocket.has_threads () then " threads" else " no-threads"
in basicSocket.ml there is this code:
external has_threads : unit -> bool = "ml_has_pthread"
which is used in ./src/utils/lib/stubs_c.c:
#if !defined(HAVE_PTHREAD) || !(HAS_GETHOSTBYNAME_R ||
GETHOSTBYNAME_IS_REENTRANT)
...
value ml_has_pthread(value unit)
{ return Val_false; }
#else
...
value ml_has_pthread(value unit)
{ return Val_true; }
#endif
In ocaml/caml/config.h I have this line on Linux:
#define HAS_GETHOSTBYNAME_R 6
GETHOSTBYNAME_IS_REENTRANT is used for Windows systems (code from
stubs_c.c):
#ifdef _WIN32
#define GETHOSTBYADDR_IS_REENTRANT 1
#define GETHOSTBYNAME_IS_REENTRANT 1
#endif
So, in order for the core to recognize threads properly two things
must be present on your non-Windows system:
mldonkey/config/config.h
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
and
In ocaml/caml/config.h I have this line on Linux:
#define HAS_GETHOSTBYNAME_R 6
from Ocaml sourcecode, config/s-templ.h
#define HAS_GETHOSTBYNAME_R 6
/* Define HAS_GETHOSTBYNAME_R if gethostbyname_r() is available.
The value of this symbol is the number of arguments of
gethostbyname_r(): either 5 or 6 depending on prototype.
(5 is the Solaris version, 6 is the Linux version). */
Either one of this is missing on your system. Please let me know what.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=13790>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/