diff -Naur findutils-4.5.12-orig/build-aux/config.guess findutils-4.5.12/build-aux/config.guess --- findutils-4.5.12-orig/build-aux/config.guess 2013-09-22 19:30:13.000000000 +0400 +++ findutils-4.5.12/build-aux/config.guess 2013-10-20 09:37:13.615600000 +0400 @@ -808,6 +808,9 @@ *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -851,6 +854,9 @@ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; + amd64:MSYS*:*:* | x86_64:MSYS*:*:*) + echo x86_64-unknown-msys + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; diff -Naur findutils-4.5.12-orig/build-aux/config.rpath findutils-4.5.12/build-aux/config.rpath --- findutils-4.5.12-orig/build-aux/config.rpath 2013-09-22 19:30:14.000000000 +0400 +++ findutils-4.5.12/build-aux/config.rpath 2013-10-20 09:37:13.615600000 +0400 @@ -64,7 +64,7 @@ ;; esac ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) + mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' @@ -138,7 +138,7 @@ hardcode_minus_L=no case "$host_os" in - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | msys* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -188,7 +188,7 @@ ld_shlibs=no fi ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | msys* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -332,7 +332,7 @@ ;; bsdi[45]*) ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | msys* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -523,7 +523,7 @@ bsdi[45]*) library_names_spec='$libname$shrext' ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | msys* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; diff -Naur findutils-4.5.12-orig/gl/lib/Makefile.am findutils-4.5.12/gl/lib/Makefile.am --- findutils-4.5.12-orig/gl/lib/Makefile.am 2013-09-22 19:28:55.000000000 +0400 +++ findutils-4.5.12/gl/lib/Makefile.am 2013-10-20 09:37:13.662400000 +0400 @@ -1209,7 +1209,7 @@ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ + darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ diff -Naur findutils-4.5.12-orig/gl/lib/mountlist.c findutils-4.5.12/gl/lib/mountlist.c --- findutils-4.5.12-orig/gl/lib/mountlist.c 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/lib/mountlist.c 2013-10-20 09:37:13.600000000 +0400 @@ -163,11 +163,16 @@ we grant an exception to any with "bind" in its list of mount options. I.e., those are *not* dummy entries. */ #ifdef MOUNTED_GETMNTENT1 +#ifdef HAVE_HASMNTOPT # define ME_DUMMY(Fs_name, Fs_type, Fs_ent) \ (ME_DUMMY_0 (Fs_name, Fs_type) \ || (strcmp (Fs_type, "none") == 0 \ && !hasmntopt (Fs_ent, "bind"))) #else +# define ME_DUMMY(Fs_name, Fs_type, Fs_ent) \ + (ME_DUMMY_0 (Fs_name, Fs_type) || strcmp (Fs_type, "none") == 0) +#endif +#else # define ME_DUMMY(Fs_name, Fs_type) \ (ME_DUMMY_0 (Fs_name, Fs_type) || strcmp (Fs_type, "none") == 0) #endif diff -Naur findutils-4.5.12-orig/gl/m4/btowc.m4 findutils-4.5.12/gl/m4/btowc.m4 --- findutils-4.5.12-orig/gl/m4/btowc.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/btowc.m4 2013-10-20 09:37:13.662400000 +0400 @@ -49,7 +49,7 @@ changequote(,)dnl case "$host_os" in # Guess no on Cygwin. - cygwin*) gl_cv_func_btowc_nul="guessing no" ;; + cygwin* | msys*) gl_cv_func_btowc_nul="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_nul="guessing yes" ;; esac diff -Naur findutils-4.5.12-orig/gl/m4/double-slash-root.m4 findutils-4.5.12/gl/m4/double-slash-root.m4 --- findutils-4.5.12-orig/gl/m4/double-slash-root.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/double-slash-root.m4 2013-10-20 09:37:13.662400000 +0400 @@ -16,7 +16,7 @@ # special semantics and is distinct from /, please report it to # . 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 findutils-4.5.12-orig/gl/m4/dup2.m4 findutils-4.5.12/gl/m4/dup2.m4 --- findutils-4.5.12-orig/gl/m4/dup2.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/dup2.m4 2013-10-20 09:37:13.678000000 +0400 @@ -46,7 +46,7 @@ [case "$host_os" in mingw*) # on this platform, dup2 always returns 0 for success gl_cv_func_dup2_works="guessing no" ;; - cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 + cygwin* | msys*) # on cygwin 1.5.x, dup2(1,1) returns 0 gl_cv_func_dup2_works="guessing no" ;; linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a # closed fd may yield -EBADF instead of -1 / errno=EBADF. diff -Naur findutils-4.5.12-orig/gl/m4/getcwd.m4 findutils-4.5.12/gl/m4/getcwd.m4 --- findutils-4.5.12-orig/gl/m4/getcwd.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/getcwd.m4 2013-10-20 09:37:13.678000000 +0400 @@ -49,7 +49,7 @@ # Guess yes on glibc systems. *-gnu*) 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, assume the worst. *) gl_cv_func_getcwd_null="guessing no";; esac diff -Naur findutils-4.5.12-orig/gl/m4/malloc.m4 findutils-4.5.12/gl/m4/malloc.m4 --- findutils-4.5.12-orig/gl/m4/malloc.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/malloc.m4 2013-10-20 09:40:04.966000000 +0400 @@ -30,7 +30,7 @@ [case "$host_os" in # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) + | hpux* | solaris* | cygwin* | msys* | mingw*) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_malloc_0_nonnull=no ;; diff -Naur findutils-4.5.12-orig/gl/m4/printf.m4 findutils-4.5.12/gl/m4/printf.m4 --- findutils-4.5.12-orig/gl/m4/printf.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/printf.m4 2013-10-20 09:37:13.678000000 +0400 @@ -735,7 +735,7 @@ openbsd*) gl_cv_func_printf_directive_ls="guessing no";; 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";; *) gl_cv_func_printf_directive_ls="guessing yes";; esac @@ -812,7 +812,7 @@ [ changequote(,)dnl case "$host_os" in - cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; + cygwin* | msys*) gl_cv_func_printf_flag_grouping="guessing no";; netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; *) gl_cv_func_printf_flag_grouping="guessing yes";; @@ -1464,7 +1464,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 findutils-4.5.12-orig/gl/m4/realloc.m4 findutils-4.5.12/gl/m4/realloc.m4 --- findutils-4.5.12-orig/gl/m4/realloc.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/realloc.m4 2013-10-20 09:37:13.678000000 +0400 @@ -30,7 +30,7 @@ [case "$host_os" in # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) + | hpux* | solaris* | cygwin* | msys* | mingw*) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_realloc_0_nonnull=no ;; diff -Naur findutils-4.5.12-orig/gl/m4/setlocale.m4 findutils-4.5.12/gl/m4/setlocale.m4 --- findutils-4.5.12-orig/gl/m4/setlocale.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/setlocale.m4 2013-10-20 09:37:13.678000000 +0400 @@ -14,7 +14,7 @@ mingw*) REPLACE_SETLOCALE=1 ;; dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL) dnl is then still "C". - cygwin*) + cygwin* | msys*) case `uname -r` in 1.5.*) REPLACE_SETLOCALE=1 ;; esac diff -Naur findutils-4.5.12-orig/gl/m4/threadlib.m4 findutils-4.5.12/gl/m4/threadlib.m4 --- findutils-4.5.12-orig/gl/m4/threadlib.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/threadlib.m4 2013-10-20 09:37:13.678000000 +0400 @@ -68,7 +68,7 @@ dnl bugs that lead to endless loops or crashes. See dnl . osf*) gl_use_threads=no ;; - cygwin*) + cygwin* | msys*) case `uname -r` in 1.[0-5].*) gl_use_threads=no ;; *) gl_use_threads=yes ;; diff -Naur findutils-4.5.12-orig/gl/m4/unlinkdir.m4 findutils-4.5.12/gl/m4/unlinkdir.m4 --- findutils-4.5.12-orig/gl/m4/unlinkdir.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/unlinkdir.m4 2013-10-20 09:37:13.693600000 +0400 @@ -24,7 +24,7 @@ gnu[[0-9]]* | \ linux-* | linux | \ freebsd2.2* | freebsd[[3-9]]* | freebsd[[1-9]][[0-9]]* | \ - cygwin | \ + cygwin | msys | \ mingw*) AC_DEFINE([UNLINK_CANNOT_UNLINK_DIR], [1], [Define to 1 if unlink (dir) cannot possibly succeed.]);; diff -Naur findutils-4.5.12-orig/gl/m4/wctob.m4 findutils-4.5.12/gl/m4/wctob.m4 --- findutils-4.5.12-orig/gl/m4/wctob.m4 2013-09-22 19:25:57.000000000 +0400 +++ findutils-4.5.12/gl/m4/wctob.m4 2013-10-20 09:37:13.693600000 +0400 @@ -29,14 +29,14 @@ changequote(,)dnl case "$host_os" in # Guess no on Solaris <= 9 and Cygwin. - solaris2.[1-9] | solaris2.[1-9].* | cygwin*) + solaris2.[1-9] | solaris2.[1-9].* | cygwin* | msys*) gl_cv_func_wctob_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wctob_works="guessing yes" ;; esac changequote([,])dnl case "$host_os" in - cygwin*) + cygwin* | msys*) AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include