Don't use Win32 API on Cygwin Cygwin is a Posix platform to the extent possible. It should use the Posix API except in special circumstances.