ICU-20677 Fixing cygwin/MSVC build

See #1398
diff --git a/icu4c/source/data/Makefile.in b/icu4c/source/data/Makefile.in
index fbc22a6..f020bc8 100644
--- a/icu4c/source/data/Makefile.in
+++ b/icu4c/source/data/Makefile.in
@@ -240,8 +240,7 @@
 ifeq ($(ENABLE_SO_VERSION_DATA),1)
 ifeq ($(PKGDATA_MODE),dll)
 SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res
-$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc
-	mkdir -p $(@D)
+$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc | $(TMP_DIR)/dirs.timestamp
 ifeq ($(MSYS_RC_MODE),1)
 	rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $<
 else
diff --git a/icu4c/source/extra/scrptrun/Makefile.in b/icu4c/source/extra/scrptrun/Makefile.in
index d951f66..f3f8943 100644
--- a/icu4c/source/extra/scrptrun/Makefile.in
+++ b/icu4c/source/extra/scrptrun/Makefile.in
@@ -12,9 +12,6 @@
 
 include $(top_builddir)/icudefs.mk
 
-## Platform-specific setup
-include @platform_make_fragment@
-
 ## Build directory information
 subdir = extra/scrptrun
 
@@ -22,7 +19,7 @@
 CLEANFILES = *~ $(DEPS)
 
 ## Target information
-TARGET = srtest
+TARGET = srtest$(EXEEXT)
 
 DEFS = @DEFS@
 CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir) 
diff --git a/icu4c/source/tools/toolutil/toolutil.cpp b/icu4c/source/tools/toolutil/toolutil.cpp
index 9a93528..7a574f4 100644
--- a/icu4c/source/tools/toolutil/toolutil.cpp
+++ b/icu4c/source/tools/toolutil/toolutil.cpp
@@ -166,14 +166,11 @@
     const char *basename=uprv_strrchr(filename, U_FILE_SEP_CHAR);
 
 #if U_FILE_ALT_SEP_CHAR!=U_FILE_SEP_CHAR
-#if !(U_PLATFORM == U_PF_CYGWIN && U_PLATFORM_USES_ONLY_WIN32_API)
-    if(basename==NULL)
-#endif
-    {
-        /* Use lenient matching on Windows, which can accept either \ or /
-           This is useful for environments like Win32+CygWin which have both.
-        */
-        basename=uprv_strrchr(filename, U_FILE_ALT_SEP_CHAR);
+    //be lenient about pathname separators on Windows, like official implementation of C++17 std::filesystem in MSVC
+    //would be convenient to merge this loop with the one above, but alas, there is no such solution in the standard library
+    const char *alt_basename=uprv_strrchr(filename, U_FILE_ALT_SEP_CHAR);
+    if(alt_basename>basename) {
+        basename=alt_basename;
     }
 #endif