From owner-freebsd-questions Sun Feb 16 14:13:22 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E9DF37B401 for ; Sun, 16 Feb 2003 14:13:20 -0800 (PST) Received: from segfault.monkeys.com (segfault.monkeys.com [66.60.157.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0C4043FA3 for ; Sun, 16 Feb 2003 14:13:19 -0800 (PST) (envelope-from rfg@monkeys.com) Received: from monkeys.com (localhost [127.0.0.1]) by segfault.monkeys.com (Postfix) with ESMTP id D925441F62 for ; Sun, 16 Feb 2003 14:13:15 -0800 (PST) To: freebsd-questions@freebsd.org Subject: gethostbyaddr_r ? Date: Sun, 16 Feb 2003 14:13:15 -0800 Message-ID: <93311.1045433595@monkeys.com> From: "Ronald F. Guilmette" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Assume that I want to write a program that uses ``real'' threads, i.e. independently schedulable ones. First question: Are there any good tutorials around for how to do this under FreeBSD? (I've never actually done this before.) I gather that the Right Thing To Do is to compile and install the linuxthreads package, yes? What, if anything, do I need to set in my kernel config file in order to make sure that the kernel support (for rfork?) is present? Anything? OK, well, anyway, assuming that I can get past all of THAT stuff, can somebody please tell me (a) which library I should obtain a proper `gethostbyaddr_p' function from and (b) where I might find the relevant man page for that? It seems that there are at least three diferent libraries that I might be able to get a `gethostbyaddr_r' function from, i.e.: From the system C library (libc). From libbind.a (as supplied with the bind 8.3.4 distribution). Perhaps also from the linuxthreads package (?) Ok, so which one is the Right One To Use, and where man I find its man page? NOTE: I looked already at the source code for the gethostbyaddr_r function supplied as part of the bind 8.3.4 distribution, and it looks to me like that one is just _pretending_ to be reentrant... I appears that it just calls the normal (non-reentrant) gethostbyaddr function. THAT'S obviously not useful to me if I want to write a real multi-threaded program, right? And anyway, I can't find any man page in the bind distribution that even describes the ISC version of gethostbyaddr_r. (Humph!) Now there _does_ seem to be a gethostbyaddr_r function in the FreeBSD 4.7 libc.a library, however... % man gethostbyaddr_r No manual entry for gethostbyaddr_r Bummer! I hit the same (documentation) wall again. Can anybody tell me where the FreeBSD/libc version of this function is documented? Any help would be appreciated. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message