Re: How to detect NPTL at compile time

Dan Kegel <[email protected]>
Newsgroups gmane.comp.lib.phil
Message-ID <[email protected]>
Jakub Jelinek wrote:
> On Fri, Apr 04, 2003 at 02:51:51PM -0800, Wan-Teh Chang wrote:
> 
>>Red Hat Linux 9 ships with the NPTL.  Our code
>>contains workarounds for LinuxThreads, and I
>>want to disable the workarounds if we are compiling
>>against NPTL.  How do I detect whether the pthread
>>library is LinuxThreads or NPTL at compile time? ...
> 
> 
> No.
> 
> int isnptl (void)
...

I think Jakub's saying you need to do a runtime check,
not a compile-time check, and he helpfully provided the code.
- Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.