If you're writing a threaded program on a POSIX system, you should put this in your C compiler's command line. It makes libc functions reentrant, as well as gives each thread its own errno. This reduces the likelyness of thread issues like writing to errno at the same time, which can really, really screw things up.