> There should be compiler options (probably -D_REENTRANT) that allow to
> build the library in a way so that it _can_ be linked with a
> thread-safe library, but will still work with the usual library.
> We're not interested in how to link it, just how to pursuade the
> system header files to use definitions that are suited for use with
> multi-threading (such as thread-safe errno).
A threaded program must be compiled with _THREAD_SAFE defined so that the
preprocessor will output the appropriate errno definition to the compil-
er. Failure to do so will mean that error variables will not be thread
specific.
bash$ gcc test.c
bash$ gcc -D_THREAD_SAFE test.c
/var/tmp/cciT18111.o: Undefined symbol `___error' referenced from text segment
bash$ cat test.c
#include <errno.h>
main() {
fopen("bla","r");
printf("%d\n",errno);
}
bash$
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]