handle 4 different cases in Cygwin