diff -Naur rcs-5.10.0-orig/build-aux/config.guess rcs-5.10.0/build-aux/config.guess
--- rcs-5.10.0-orig/build-aux/config.guess	2020-10-20 07:03:32.000000000 +0300
+++ rcs-5.10.0/build-aux/config.guess	2020-10-24 16:56:40.051450000 +0300
@@ -902,6 +902,9 @@
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 	echo x86_64-pc-cygwin
 	exit ;;
+    amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+	echo x86_64-pc-msys
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
diff -Naur rcs-5.10.0-orig/m4/double-slash-root.m4 rcs-5.10.0/m4/double-slash-root.m4
--- rcs-5.10.0-orig/m4/double-slash-root.m4	2020-10-04 16:14:48.000000000 +0300
+++ rcs-5.10.0/m4/double-slash-root.m4	2020-10-24 16:57:47.623540700 +0300
@@ -16,7 +16,7 @@
         # special semantics and is distinct from /, please report it to
         # <bug-gnulib@gnu.org>.
         case $host in
-          *-cygwin | i370-ibm-openedition)
+          *-cygwin | *-msys | i370-ibm-openedition)
             gl_cv_double_slash_root=yes ;;
           *)
             # Be optimistic and assume that / and // are the same when we
diff -Naur rcs-5.10.0-orig/m4/dup2.m4 rcs-5.10.0/m4/dup2.m4
--- rcs-5.10.0-orig/m4/dup2.m4	2020-10-04 16:14:48.000000000 +0300
+++ rcs-5.10.0/m4/dup2.m4	2020-10-24 16:58:31.405236800 +0300
@@ -71,6 +71,8 @@
            gl_cv_func_dup2_works="guessing no" ;;
          cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
            gl_cv_func_dup2_works="guessing no" ;;
+         msys*) # on msys 1.5.x, dup2(1,1) returns 0
+           gl_cv_func_dup2_works="guessing no" ;;
          aix* | freebsd*)
                  # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
                  # not EBADF.
diff -Naur rcs-5.10.0-orig/m4/fcntl.m4 rcs-5.10.0/m4/fcntl.m4
--- rcs-5.10.0-orig/m4/fcntl.m4	2020-10-04 16:14:48.000000000 +0300
+++ rcs-5.10.0/m4/fcntl.m4	2020-10-24 16:58:48.134836500 +0300
@@ -70,7 +70,7 @@
          [gl_cv_func_fcntl_f_dupfd_works=yes],
          [gl_cv_func_fcntl_f_dupfd_works=no],
          [case $host_os in
-            aix* | cygwin* | haiku*)
+            aix* | cygwin* | msys* | haiku*)
                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
           esac])])
diff -Naur rcs-5.10.0-orig/m4/getcwd.m4 rcs-5.10.0/m4/getcwd.m4
--- rcs-5.10.0-orig/m4/getcwd.m4	2020-10-04 16:14:48.000000000 +0300
+++ rcs-5.10.0/m4/getcwd.m4	2020-10-24 16:59:43.023554600 +0300
@@ -54,7 +54,7 @@
                            # Guess yes on musl systems.
             *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
                            # Guess yes on Cygwin.
-            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
+            cygwin* | msys*)       gl_cv_func_getcwd_null="guessing yes";;
                            # If we don't know, obey --enable-cross-guesses.
             *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
           esac
diff -Naur rcs-5.10.0-orig/m4/getdtablesize.m4 rcs-5.10.0/m4/getdtablesize.m4
--- rcs-5.10.0-orig/m4/getdtablesize.m4	2020-10-04 16:14:48.000000000 +0300
+++ rcs-5.10.0/m4/getdtablesize.m4	2020-10-24 16:59:28.898287300 +0300
@@ -42,7 +42,7 @@
              [gl_cv_func_getdtablesize_works=yes],
              [gl_cv_func_getdtablesize_works=no],
              [case "$host_os" in
-                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
+                cygwin* | msys*) # on cygwin 1.5.25, getdtablesize() automatically grows
                   gl_cv_func_getdtablesize_works="guessing no" ;;
                 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
               esac
diff -Naur rcs-5.10.0-orig/m4/malloc.m4 rcs-5.10.0/m4/malloc.m4
--- rcs-5.10.0-orig/m4/malloc.m4	2020-10-04 16:14:48.000000000 +0300
+++ rcs-5.10.0/m4/malloc.m4	2020-10-26 08:26:18.258241200 +0300
@@ -25,7 +25,7 @@
        [case "$host_os" in
           # Guess yes on platforms where we know the result.
           *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
-          | hpux* | solaris* | cygwin* | mingw*)
+          | hpux* | solaris* | cygwin* | msys* | mingw*)
             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
           *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
diff -Naur rcs-5.10.0-orig/m4/printf.m4 rcs-5.10.0/m4/printf.m4
--- rcs-5.10.0-orig/m4/printf.m4	2020-10-20 06:31:46.000000000 +0300
+++ rcs-5.10.0/m4/printf.m4	2020-10-26 08:26:06.667810300 +0300
@@ -818,7 +818,7 @@
            openbsd*)        gl_cv_func_printf_directive_ls="guessing yes";;
            irix*)           gl_cv_func_printf_directive_ls="guessing no";;
            solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
-           cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
+           cygwin* | msys*)         gl_cv_func_printf_directive_ls="guessing no";;
            beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
                             # Guess no on Android.
            linux*-android*) gl_cv_func_printf_directive_ls="guessing no";;
@@ -1611,7 +1611,7 @@
            darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
            darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on Cygwin.
-           cygwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+           cygwin* | msys*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on Solaris >= 2.6.
            solaris2.[0-5] | solaris2.[0-5].*)
                                  gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
diff -Naur rcs-5.10.0-orig/m4/realloc.m4 rcs-5.10.0/m4/realloc.m4
--- rcs-5.10.0-orig/m4/realloc.m4	2020-10-04 16:14:49.000000000 +0300
+++ rcs-5.10.0/m4/realloc.m4	2020-10-26 08:26:28.857325700 +0300
@@ -25,7 +25,7 @@
        [case "$host_os" in
           # Guess yes on platforms where we know the result.
           *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
-          | hpux* | solaris* | cygwin* | mingw*)
+          | hpux* | solaris* | cygwin* | msys* | mingw*)
             ac_cv_func_realloc_0_nonnull="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
           *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
diff -Naur rcs-5.10.0-orig/m4/threadlib.m4 rcs-5.10.0/m4/threadlib.m4
--- rcs-5.10.0-orig/m4/threadlib.m4	2020-10-04 16:14:49.000000000 +0300
+++ rcs-5.10.0/m4/threadlib.m4	2020-10-26 08:27:04.183543900 +0300
@@ -413,7 +413,7 @@
          dnl Disable multithreading by default on Cygwin 1.5.x, because it has
          dnl bugs that lead to endless loops or crashes. See
          dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
-         cygwin*)
+         cygwin* | msys*)
                case `uname -r` in
                  1.[0-5].*) gl_use_threads=no ;;
                  *)         gl_use_threads=yes ;;
diff -Naur rcs-5.10.0-orig/tests/known-failures.in rcs-5.10.0/tests/known-failures.in
--- rcs-5.10.0-orig/tests/known-failures.in	2020-10-20 06:35:19.000000000 +0300
+++ rcs-5.10.0/tests/known-failures.in	2020-10-26 08:27:30.317762000 +0300
@@ -62,7 +62,7 @@
 # preconditions or filters.  Ugly and possibly buggy in itself!
 more=
 case '@host_os@' in
-    cygwin | darwin)
+    cygwin | msys | darwin)
         case $1 in
             5.8 | 5.8.* | 5.9.[012])
                 more=t805
