Quote Originally Posted by rcgldr View Post
As to usage of static variables, as mentioned earlier in this thread, using static variables in a function is a problem if you're considering calling that function from multiple threads in a multi-threaded program. I'm not sure if there are any other situations where a static variable can cause a problem.
It also would not be guaranteed safe in any program that installs a non-default interrupt handler. That is another class of program where reentrancy is important.

Multithreading is more common use case that gives problems in modern developments though. And since C11 has specifically included multithreading support, that is likely to be more important practically for C developers in the future. (Same for C++11).

Quote Originally Posted by rcgldr View Post
For a windows dynamic link library, each process that uses the dynamic link library get's it's own virtual address space, sharing only the code, so static variables wouldn't be a problem in that case.
That is the common way of creating DLLs, yes. It is not the only way. Shared memory (which is accessible across multiple address spaces) is fairly important in some applications, and is often supported using particular types of DLLs.

Threads in a program do share the process address space - in fact, that is often the point of using threads rather than concurrent processes - unless they are specifically designed to make use of thread local storage. Auto variables are usually thread-local (by default). Static variables are typically shared across threads.

Quote Originally Posted by rcgldr View Post
I don't know how posix / linux / unix implement dynamic link libraries.
The specifics are a little different than for windows DLLs, but the same possibilities exist.