From 5d40b668743e5055a7b049f0d48bb87bbb4ecc0b Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl@nuwen.net>
Date: Sun, 26 Nov 2017 16:12:17 -0800
Subject: [PATCH] grep: Fix directory recursion on MS-Windows.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

gnulib recently gained a module, windows-stat-inodes, that fixes
directory recursion on MS-Windows. No changes to grep's C sources are
required; grep simply needs to request the module during configuration.

When grep requests this module, its configure script will gain the
behavior that was implemented in windows-stat-inodes.m4. This detects
mingw and sets WINDOWS_STAT_INODES=1. All other platforms are
unaffected, setting WINDOWS_STAT_INODES=0 (which is what's happening
in the absence of this patch).

Thanks to Pär Björklund who diagnosed the problem as involving inodes,
and thanks to Václav Haisman who provided the bootstrap.conf patch.
---
 NEWS           | 6 ++++++
 bootstrap.conf | 1 +
 2 files changed, 7 insertions(+)

diff --git a/NEWS b/NEWS
index 9ed78fb..51a1529 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,12 @@ GNU grep NEWS                                    -*- outline -*-
   when a file is listed, instead of when a line is selected.  This
   resembles what git-grep does.
 
+** Bug fixes
+
+  The --recursive (-r) option no longer fails on MS-Windows.
+  [bug introduced in grep 2.11]
+
+
 * Noteworthy changes in release 3.1 (2017-07-02) [stable]
 
 ** Improvements
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
-- 
2.15.0.windows.1

