Skip site navigation (1)Skip section navigation (2)
Date:      26 Jun 99 01:34:58 BST
From:      Francis Jordan <frankrj@netscape.net>
To:        freebsd-hackers@freebsd.org
Cc:        freebsd-questions@freebsd.org
Subject:   building thread-safe Xlibs
Message-ID:  <19990626003458.26580.qmail@ww185.netaddress.usa.net>

next in thread | raw e-mail | index | archive | help
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-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990626003458.26580.qmail>