Subj : creating library to be used in threaded and nonthreaded apps To : comp.programming.threads From : Chris Friesen Date : Wed Apr 27 2005 11:44 pm I'm writing a shared library that is designed to be reentrant. (No static data, etc.) It is safe to call from multiple threads simultaneously. I'd like to make one version of the shared library that I can use in both threaded an nonthreaded applications, without forcing the nonthreaded apps to link against the pthreads library. I *think* I need to do at least something to tell the compiler how to deal with stuff like errno, but maybe that's implementation-dependent? Is this possible to do in a portable way? If not, is it possible to do on Linux with glibc/NPTL? Thanks, Chris .