Multithreaded Programming Guide

Link Old With New

Table 7–2 shows that multithreaded object modules should be linked with old object modules only with great caution.

Table 7–2 Compiling With and Without the _REENTRANT Flag

The File Type 

Compiled 

Reference 

And Return 

Old object files (nonthreaded) and new object files 

Without the _REENTRANT or _POSIX_C_SOURCE flag

Static storage

The traditional errno

New object files 

With the _REENTRANT or _POSIX_C_SOURCE flag

__errno, the new binary entry point

The address of the thread's definition of errno

Programs using TLI in libnsl [Include tiuser.h to get the TLI global error variable. ]

With the _REENTRANT or _POSIX_C_SOURCE flag (required)

__t_errno, a new entry point

The address of the thread's definition of t_errno.