Applied patches from cygwin port.
5 files changed