folded in Mark's port to Cygwin