StephanTLavavej / mingw-distro

MinGW distro build scripts.
494 stars 55 forks source link

grep's configure doesn't properly enable WINDOWS_STAT_INODES #41

Closed StephanTLavavej closed 5 years ago

StephanTLavavej commented 7 years ago

gnulib recently gained a windows-stat-inodes module, which fixes recursive grep on Windows (issue #6).

The gnulib commit appears to contain machinery in m4/windows-stat-inodes.m4 that detects mingw and automatically enables WINDOWS_STAT_INODES. However, grep's configure doesn't contain this machinery. Instead, it unconditionally sets WINDOWS_STAT_INODES=0.

My grep-configure.patch is hacking around this problem, but it should be fixed properly upstream (so recursive grep on Windows doesn't bit-rot).

I don't know how to fix this properly; help wanted.

wilx commented 7 years ago

It might be enough to apply this to grep and run ./bootstrap and then ./configure as usual:

diff --git a/bootstrap.conf b/bootstrap.conf
index 1c50974..73f1573 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -93,6 +93,7 @@ wchar
 wcrtomb
 wctob
 wctype-h
+windows-stat-inodes
 xalloc
 xbinary-io
 xstrtoimax
StephanTLavavej commented 7 years ago

Thanks! That seems to be the necessary magic (configure and the Makefile are properly updated).

StephanTLavavej commented 7 years ago

Reported upstream: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28083

StephanTLavavej commented 6 years ago

Fixed upstream: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=6ada8b0a1b3f408ebf76e0cf7f7bb61019a70fdc