Subj : Re: Where to download a pthread library To : comp.programming.threads From : David Schwartz Date : Tue Mar 29 2005 03:07 pm "Marcin 'Qrczak' Kowalczyk" wrote in message news:87y8c6rtgc.fsf@qrnik.zagroda... > What should a portable program do? Let's say it want to use pthreads > if they are supported, but it will work without them too (with less > functionality). Assume pthreads is supported if you have a 'pthread.h' header. Use '-pthread' to invoke pthreads. If '-pthread' doesn't work, you have no portable way to know what flags to use. > How this can be improved? Should I define _REENTRANT? Should I look in > another library too? You shouldn't be looking in libraries. > If pthread functions are stubs which do nothing or throw errors > (I've heard some systems provide such versions if no additional thread > library is linked), I want to treat this case as if pthreads were not > available. Err, no, you want to link the thread library. DS .