To speed the build process, avoid possible name clashes etc., one #includes only necessary header files. However, once you need , it opens the floodgates. To exclude rarely-used Windows header files, I added #define WIN32_LEAN_AND_MEAN 1 to implement.h, pthread.h and various test files - see for details. Now, we have to be explicit if we need additional Windows header files, e.g. in cancel9.c. Similar for . Steffen Goeldner