Hi, 

Related to this issue, I've run into lots of problems in the past using pTH
because lots of the standard include files include the pthread.h...this
results in tons of warnings and errors due to redefinitions of macros and
conflicting definitions.

Is there a standard way to handle this? In the past I've just hacked the
heck out of the include files to get stuff to work. But it's not a great
solution...because the "quick" is soon forgotten but the "dirty" remains
forever. :)

Sincerely

Brent Phillips

At 05:14 PM 5/15/2001 +0200, you wrote:
>On Tue, May 15, 2001, Lars Gusmar wrote:
>
>> As described below I'm thinking about the simplest possibility to 
>> merge two programms, one uses Gnu Pth and the other one uses the
>> Linux pthreads.
>> 
>> What about to make a shared object lib with the Linux Pthreads stuff
>> and load them with dlopen etc. ?
>> 
>> What happend if the lib with the pthread stuff is loaded? 
>> I mean, the lib will load from ld and therefore also libpthread, 
>> because of the dependency, while the main program with pth is 
>> already loaded. Does this work ?
>
>No, under Runtime you can only use _ONE_ threading facility. As long
>as you have both pth_xxx and pthread_xxx API calls in your application
>it will never work. So, first step is to replace either all Pthread
>calls with Pth calls (simple, because Pth API is a superset of Pthread
>API) or vice versa (usually possible for standard applications, but
>might be tricky). Then, if you now have only Pth calls, use libpth from
>Pth. Alternatively, if you then only have Pthread calls, use _EITHER_
>libpthread from Pth or LinuxThreads.
>
>                                       Ralf S. Engelschall
>                                       [EMAIL PROTECTED]
>                                       www.engelschall.com
>______________________________________________________________________
>GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
>User Support Mailing List                            [EMAIL PROTECTED]
>Automated List Manager (Majordomo)           [EMAIL PROTECTED]
> 

______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to