To ensure that your application is reentrant, make sure that:
It uses the reentrant versions of C library functions, where provided
It uses non-reentrant C (or other) library functions safely
It protects global variables and shared structures with mutex (or other) locks
None of its functions return a pointer to a static buffer
It compiles with the correct processor flags and linker directives
A C library function that is reentrant on one UNIX system is not necessarily reentrant
on other UNIX systems. Consult
a porting guide for your platform to determine if the C function
is reentrant.