From owner-freebsd-hackers Fri Jun 25 17:35: 4 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from ww185.netaddress.usa.net (ww185.netaddress.usa.net [204.68.24.85]) by hub.freebsd.org (Postfix) with SMTP id AD9E215123 for ; Fri, 25 Jun 1999 17:34:59 -0700 (PDT) (envelope-from frankrj@netscape.net) Received: (qmail 26581 invoked by uid 60001); 26 Jun 1999 00:34:58 -0000 Message-ID: <19990626003458.26580.qmail@ww185.netaddress.usa.net> Received: from 204.68.24.85 by ww185 via web-mailer(M3.2.0.17) on Sat Jun 26 00:34:58 GMT 1999 Date: 26 Jun 99 01:34:58 BST From: Francis Jordan To: freebsd-hackers@freebsd.org Subject: building thread-safe Xlibs Cc: freebsd-questions@freebsd.org X-Mailer: USANET web-mailer (M3.2.0.17) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Can anyone please give me some clues as to how to build X with thread sup= port enabled. I think the right way to do it is to add the relevant options t= o config/cf/FreeBSD.cf, something like #define HasPosixThreads YES #define ThreadedX YES #define ThreadsLibraries -pthread /* (or should it be -lc_r ? */ #define SystemMTDefines -D_REENTRANT /* required ??? */ #define HasThreadSafeAPI NO ^^ --------------------------------- Here's the thing - FreeBSD doesn't seem to have thread-safe interfaces fo= r functions like getpwnam, getpwuid, getpwent (Solaris has getpwnam_r, getpwuid_r, getpwent_r), hence lots of unresolved references. Then there= 's the file xc/include/Xos_r.h which contains definitions of same (basically, pwd.h wrappers) for variou= s = platforms, but not FreeBSD (I guess at the time FreeBSD didn't have threa= ds). = Unfortunately, the wrappers for other platforms are no good, as FreeBSD's= pwd structures are different from everything else. If anyone has gotten the darn thing to compile, could you please send me = the relevant patches? Alternatively, is anyone looking into implementing the= _r API for getpwent? Any help will be much appreciated. Francis ____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webm= ail.netscape.com. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message