From MAILER-DAEMON Sun Jan 01 03:31:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhGpe-0003cR-Nz
	for mharc-grep-commit@gnu.org; Sun, 01 Jan 2012 03:31:54 -0500
Received: from eggs.gnu.org ([140.186.70.92]:43355)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RhGpa-0003c2-Jf
	for grep-commit@gnu.org; Sun, 01 Jan 2012 03:31:53 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RhGpX-00023o-9p
	for grep-commit@gnu.org; Sun, 01 Jan 2012 03:31:50 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:49795)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RhGpX-00023k-6C
	for grep-commit@gnu.org; Sun, 01 Jan 2012 03:31:47 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1RhGpW-0003Gs-R2
	for grep-commit@gnu.org; Sun, 01 Jan 2012 08:31:47 +0000
Date: Sun, 01 Jan 2012 08:31:46 +0000
Message-Id: <E1RhGpW-0003Gs-R2@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-34-g5b22019
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 491925040894701c72c9f7d34bea68f3f1865a3a
X-Git-Newrev: 5b2201913f28f43da01cfebfce90b798db64f117
From: Jim Meyering <jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jan 2012 08:31:53 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  5b2201913f28f43da01cfebfce90b798db64f117 (commit)
      from  491925040894701c72c9f7d34bea68f3f1865a3a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=5b2201913f28f43da01cfebfce90b798db64f117


commit 5b2201913f28f43da01cfebfce90b798db64f117
Author: Jim Meyering <meyering@redhat.com>
Date:   Sun Jan 1 09:28:52 2012 +0100

    maint: update all copyright year number ranges
    
    Run "make update-copyright".

diff --git a/AUTHORS b/AUTHORS
index 15da770..55bc714 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/ChangeLog-2009 b/ChangeLog-2009
index c2e3e01..894891b 100644
--- a/ChangeLog-2009
+++ b/ChangeLog-2009
@@ -3648,6 +3648,6 @@ axes.)
 
         * Version 2.0 released.
 
-Copyright (C) 1998-2011 Free Software Foundation, Inc.
+Copyright (C) 1998-2012 Free Software Foundation, Inc.
 Copying and distribution of this file, with or without modification,
   are permitted provided the copyright notice and this notice are preserved.
diff --git a/HACKING b/HACKING
index 18a8120..6a9d588 100644
--- a/HACKING
+++ b/HACKING
@@ -581,7 +581,7 @@ Then just open the index.html file (in the generated lcov-html directory)
 in your favorite web browser.
 
 ========================================================================
-Copyright (C) 2009-2011 Free Software Foundation, Inc.
+Copyright (C) 2009-2012 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/Makefile.am b/Makefile.am
index a5029e7..93fb852 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 # Process this file with automake to create Makefile.in
 #
-# Copyright 1997-1998, 2005-2011 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/Makefile.boot b/Makefile.boot
index 45b111b..5c2993c 100644
--- a/Makefile.boot
+++ b/Makefile.boot
@@ -1,4 +1,4 @@
-# Copyright 1997-1998, 2005-2011 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/NEWS b/NEWS
index ef2f9b9..636e5dc 100644
--- a/NEWS
+++ b/NEWS
@@ -475,7 +475,7 @@ necessary to track the evolution of the regex package, and since
 I was changing it anyway I decided to do a general cleanup.
 
 ========================================================================
-Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README b/README
index 9c550ee..36b377b 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README-alpha b/README-alpha
index fec1af5..5334627 100644
--- a/README-alpha
+++ b/README-alpha
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README-boot b/README-boot
index 16f1393..2b4bb57 100644
--- a/README-boot
+++ b/README-boot
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README-hacking b/README-hacking
index 9e4768c..0fc66bf 100644
--- a/README-hacking
+++ b/README-hacking
@@ -61,7 +61,7 @@ reporting address of this package, and not to that of gnulib, even
 if the problem seems to originate in a gnulib-provided file.
 -----
 
-Copyright (C) 2002-2011 Free Software Foundation, Inc.
+Copyright (C) 2002-2012 Free Software Foundation, Inc.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/THANKS b/THANKS
index 7f4a591..80df5ec 100644
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/TODO b/TODO
index 6809595..9d4bb73 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/bootstrap b/bootstrap
index f76db9a..8c8a9cc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -4,7 +4,7 @@ scriptversion=2011-08-11.17; # UTC
 
 # Bootstrap this package from checked-out sources.
 
-# Copyright (C) 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/bootstrap.conf b/bootstrap.conf
index 64e4ea6..b02c26b 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
 # Bootstrap configuration.
 
-# Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/cfg.mk b/cfg.mk
index 309ee23..204727d 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 # Customize maint.mk                           -*- makefile -*-
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/configure.ac b/configure.ac
index 46e9edb..0cfeb62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl
 dnl autoconf input file for ``GNU grep''
 dnl
-dnl Copyright (C) 1997-2006, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2006, 2009-2012 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GNU grep.
 dnl
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 3a97073..a45627d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,7 +1,7 @@
 # Process this file with automake to create Makefile.in
 # Makefile.am for grep/doc.
 #
-# Copyright 2008-2011 Free Software Foundation, Inc.
+# Copyright 2008-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/doc/fdl.texi b/doc/fdl.texi
index 2caf58d..2d26c9e 100644
--- a/doc/fdl.texi
+++ b/doc/fdl.texi
@@ -5,7 +5,7 @@
 @c hence no sectioning command or @node.
 
 @display
-Copyright @copyright{} 2000-2002, 2007-2008, 2010-2011 Free Software
+Copyright @copyright{} 2000-2002, 2007-2008, 2010-2012 Free Software
 Foundation, Inc.
 @uref{http://fsf.org/}
 
diff --git a/doc/grep.in.1 b/doc/grep.in.1
index f1f68d0..65d3e3a 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -1173,7 +1173,7 @@ to use logic that tests for this general condition
 instead of strict equality with\ 2.
 .
 .SH COPYRIGHT
-Copyright 1998-2000, 2002, 2005-2011 Free Software Foundation, Inc.
+Copyright 1998-2000, 2002, 2005-2012 Free Software Foundation, Inc.
 .PP
 This is free software;
 see the source for copying conditions.
diff --git a/doc/grep.texi b/doc/grep.texi
index 8b55d9a..9889095 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -16,7 +16,8 @@
 @copying
 This manual is for @command{grep}, a pattern matching engine.
 
-Copyright @copyright{} 1999-2002, 2005, 2008-2011 Free Software Foundation, Inc.
+Copyright @copyright{} 1999-2002, 2005, 2008-2012 Free Software Foundation,
+Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 239a53f..485f5ef 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 1997-1998, 2005-2011 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/lib/colorize-impl.c b/lib/colorize-impl.c
index 48af4d4..b7c0a3f 100644
--- a/lib/colorize-impl.c
+++ b/lib/colorize-impl.c
@@ -1,5 +1,5 @@
 /* Output colorization.
-   Copyright 2011 Free Software Foundation, Inc.
+   Copyright 2011-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/colorize.h b/lib/colorize.h
index 9fdfaa3..7890fbc 100644
--- a/lib/colorize.h
+++ b/lib/colorize.h
@@ -1,6 +1,6 @@
 /* Output colorization.
 
-   Copyright 2011 Free Software Foundation, Inc.
+   Copyright 2011-2012 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3, or (at your option)
diff --git a/lib/ms/colorize-impl.c b/lib/ms/colorize-impl.c
index d563410..3c8c73a 100644
--- a/lib/ms/colorize-impl.c
+++ b/lib/ms/colorize-impl.c
@@ -1,5 +1,5 @@
 /* Output colorization on MS-Windows.
-   Copyright 2011 Free Software Foundation, Inc.
+   Copyright 2011-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/savedir.c b/lib/savedir.c
index 0299a91..3f93c16 100644
--- a/lib/savedir.c
+++ b/lib/savedir.c
@@ -1,5 +1,5 @@
 /* savedir.c -- save the list of files in a directory in a string
-   Copyright (C) 1990, 1997-2001, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1997-2001, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index dd637e3..42d96f6 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -1,7 +1,7 @@
 # pcre.m4 - check for libpcre support
 # serial 1
 
-# Copyright (C) 2010-2011 Free Software Foundation, Inc.
+# Copyright (C) 2010-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8c2f8d2..b33c126 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,6 @@
 # List of files which containing translatable strings.
 #
-# Copyright 1997-1998, 2005-2011 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/src/Makefile.am b/src/Makefile.am
index 6987f66..53f8ae6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
 ## Process this file with automake to create Makefile.in
-# Copyright 1997-1998, 2005-2011 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/src/dfa.c b/src/dfa.c
index 26ea4b5..c7ba8db 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1,5 +1,5 @@
 /* dfa.c - deterministic extended regexp routines for GNU
-   Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2011 Free Software
+   Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/src/dfa.h b/src/dfa.h
index 30d1739..17a4778 100644
--- a/src/dfa.h
+++ b/src/dfa.h
@@ -1,5 +1,5 @@
 /* dfa.h - declarations for GNU deterministic regexp compiler
-   Copyright (C) 1988, 1998, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1998, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/dfasearch.c b/src/dfasearch.c
index c6fe1a5..512f58c 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -1,5 +1,5 @@
 /* dfasearch.c - searching subroutines using dfa and regex for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/dosbuf.c b/src/dosbuf.c
index 2e9fbd1..07f1280 100644
--- a/src/dosbuf.c
+++ b/src/dosbuf.c
@@ -1,5 +1,5 @@
 /* dosbuf.c
-   Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/grep.h b/src/grep.h
index 1fef4b6..744a889 100644
--- a/src/grep.h
+++ b/src/grep.h
@@ -1,5 +1,5 @@
 /* grep.h - interface to grep driver for searching subroutines.
-   Copyright (C) 1992, 1998, 2001, 2007, 2009-2011 Free Software Foundation,
+   Copyright (C) 1992, 1998, 2001, 2007, 2009-2012 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/src/kwsearch.c b/src/kwsearch.c
index a481cfa..f1a802e 100644
--- a/src/kwsearch.c
+++ b/src/kwsearch.c
@@ -1,5 +1,5 @@
 /* kwsearch.c - searching subroutines using kwset for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/kwset.c b/src/kwset.c
index 124096c..7c37ab0 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -1,5 +1,5 @@
 /* kwset.c - search for any of a set of keywords.
-   Copyright (C) 1989, 1998, 2000, 2005, 2007, 2009-2011 Free Software
+   Copyright (C) 1989, 1998, 2000, 2005, 2007, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/src/kwset.h b/src/kwset.h
index 07cf4a4..5fa44ae 100644
--- a/src/kwset.h
+++ b/src/kwset.h
@@ -1,5 +1,5 @@
 /* kwset.h - header declaring the keyword set library.
-   Copyright (C) 1989, 1998, 2005, 2007, 2009-2011 Free Software Foundation,
+   Copyright (C) 1989, 1998, 2005, 2007, 2009-2012 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/src/main.c b/src/main.c
index f0a8085..6fdc982 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,5 @@
 /* grep.c - main driver file for grep.
-   Copyright (C) 1992, 1997-2002, 2004-2011 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/mbsupport.h b/src/mbsupport.h
index 4529134..c4b7b4e 100644
--- a/src/mbsupport.h
+++ b/src/mbsupport.h
@@ -1,6 +1,6 @@
 /* mbsupport.h --- Localize determination of whether we have multibyte stuff.
 
-   Copyright (C) 2004-2005, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2004-2005, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/pcresearch.c b/src/pcresearch.c
index 7b865f5..2eda5f1 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -1,5 +1,5 @@
 /* pcresearch.c - searching subroutines using PCRE for grep.
-   Copyright 2000, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright 2000, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/search.h b/src/search.h
index 3d211a5..3074407 100644
--- a/src/search.h
+++ b/src/search.h
@@ -1,5 +1,5 @@
 /* search.c - searching subroutines using dfa, kwset and regex for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/searchutils.c b/src/searchutils.c
index 3b3ae67..b787fe6 100644
--- a/src/searchutils.c
+++ b/src/searchutils.c
@@ -1,5 +1,5 @@
 /* searchutils.c - helper subroutines for grep's matchers.
-   Copyright 1992, 1998, 2000, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/system.h b/src/system.h
index f356c08..426d893 100644
--- a/src/system.h
+++ b/src/system.h
@@ -1,5 +1,5 @@
 /* Portability cruft.  Include after config.h and sys/types.h.
-   Copyright 1996, 1998-2000, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright 1996, 1998-2000, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f23a592..df98e0b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,5 @@
 ## Process this file with automake to create Makefile.in
-# Copyright 1997-1998, 2005-2011 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/backref b/tests/backref
index 5f39b27..d8c75be 100755
--- a/tests/backref
+++ b/tests/backref
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for backreferences and other things.
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/bre b/tests/bre
index 2115595..bad96a4 100755
--- a/tests/bre
+++ b/tests/bre
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/bre.awk b/tests/bre.awk
index 544cfe5..e8c75a3 100644
--- a/tests/bre.awk
+++ b/tests/bre.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/dfa-heap-overrun b/tests/dfa-heap-overrun
index dda1c12..e31236c 100755
--- a/tests/dfa-heap-overrun
+++ b/tests/dfa-heap-overrun
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Trigger a heap overrun in grep-2.6..grep-2.8.
 
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/empty b/tests/empty
index c653fb5..c13b094 100755
--- a/tests/empty
+++ b/tests/empty
@@ -2,7 +2,7 @@
 # test that the empty file means no pattern
 # and an empty pattern means match all.
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/ere b/tests/ere
index 1516c94..8df100d 100755
--- a/tests/ere
+++ b/tests/ere
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/ere.awk b/tests/ere.awk
index ecf82a4..62c6e0e 100644
--- a/tests/ere.awk
+++ b/tests/ere.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/file b/tests/file
index cbfe21b..1f8ebda 100755
--- a/tests/file
+++ b/tests/file
@@ -4,7 +4,7 @@
 # grep -F -f pattern_file file
 # grep -G -f pattern_file file
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/fmbtest b/tests/fmbtest
index 38ab73b..5146cca 100755
--- a/tests/fmbtest
+++ b/tests/fmbtest
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/foad1 b/tests/foad1
index 12e740d..fea27d0 100755
--- a/tests/foad1
+++ b/tests/foad1
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test various combinations of command-line options.
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/get-mb-cur-max.c b/tests/get-mb-cur-max.c
index 256d092..5c157d9 100644
--- a/tests/get-mb-cur-max.c
+++ b/tests/get-mb-cur-max.c
@@ -1,5 +1,5 @@
 /* Auxiliary program to detect support for a locale.
-   Copyright 2010-2011 Free Software Foundation, Inc.
+   Copyright 2010-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/tests/help-version b/tests/help-version
index 8d09877..b12e3dc 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -2,7 +2,7 @@
 # Make sure all these programs work properly
 # when invoked with --help or --version.
 
-# Copyright (C) 2000-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/high-bit-range b/tests/high-bit-range
index 4a1d333..6bcef34 100755
--- a/tests/high-bit-range
+++ b/tests/high-bit-range
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise high-bit-set unibyte-in-[...]-range bug.
 
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/init.sh b/tests/init.sh
index 373d9d4..759842c 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -1,6 +1,6 @@
 # source this file; set up for tests
 
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/khadafy b/tests/khadafy
index 907ce16..3086baf 100755
--- a/tests/khadafy
+++ b/tests/khadafy
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/options b/tests/options
index 04f8550..f9c7878 100755
--- a/tests/options
+++ b/tests/options
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for POSIX.2 options for grep
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre b/tests/pcre
index a712d19..89872a9 100755
--- a/tests/pcre
+++ b/tests/pcre
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that with -P, \s*$ matches a newline.
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-abort b/tests/pcre-abort
index 0b605aa..42fa0e9 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -2,7 +2,7 @@
 # Show that grep handles PCRE's PCRE_ERROR_MATCHLIMIT.
 # In grep-2.8, it would abort.
 #
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1 b/tests/spencer1
index 671ae26..7890537 100755
--- a/tests/spencer1
+++ b/tests/spencer1
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1-locale b/tests/spencer1-locale
index 7ff6554..9adac13 100755
--- a/tests/spencer1-locale
+++ b/tests/spencer1-locale
@@ -2,7 +2,7 @@
 # Regression test for GNU grep.
 #
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1-locale.awk b/tests/spencer1-locale.awk
index 7c9cb98..2a0a1dd 100644
--- a/tests/spencer1-locale.awk
+++ b/tests/spencer1-locale.awk
@@ -1,5 +1,5 @@
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1.awk b/tests/spencer1.awk
index d9ab249..6caaf3c 100644
--- a/tests/spencer1.awk
+++ b/tests/spencer1.awk
@@ -1,5 +1,5 @@
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer2 b/tests/spencer2
index f95d972..8b29f15 100644
--- a/tests/spencer2
+++ b/tests/spencer2
@@ -2,7 +2,7 @@
 # Regression test for GNU grep.
 #
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/status b/tests/status
index 62d4b67..76b3107 100755
--- a/tests/status
+++ b/tests/status
@@ -5,7 +5,7 @@
 #  1 no match
 #  2 file not found
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/tests b/tests/tests
index 1de39a8..6f2545f 100644
--- a/tests/tests
+++ b/tests/tests
@@ -1,6 +1,6 @@
 # regular expression test set
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/turkish-I b/tests/turkish-I
index d941ed1..35a3753 100755
--- a/tests/turkish-I
+++ b/tests/turkish-I
@@ -1,7 +1,7 @@
 #!/bin/sh
 # grep -i in UTF-8: missing NL in output on line containing I WITH DOT (U+0130)
 
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/unibyte-bracket-expr b/tests/unibyte-bracket-expr
index 45ad5d9..08b1b5b 100755
--- a/tests/unibyte-bracket-expr
+++ b/tests/unibyte-bracket-expr
@@ -5,7 +5,7 @@
 # ru_RU.KOI8-R for any C whose wide-char representation differed from
 # its single-byte equivalent.
 
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/yesno b/tests/yesno
index 4b1046d..aa34630 100755
--- a/tests/yesno
+++ b/tests/yesno
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test feature interaction of -C, -v, -o, and -m.
 #
-# Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright

-----------------------------------------------------------------------

Summary of changes:
 AUTHORS                    |    2 +-
 ChangeLog-2009             |    2 +-
 HACKING                    |    2 +-
 Makefile.am                |    2 +-
 Makefile.boot              |    2 +-
 NEWS                       |    2 +-
 README                     |    2 +-
 README-alpha               |    2 +-
 README-boot                |    2 +-
 README-hacking             |    2 +-
 THANKS                     |    2 +-
 TODO                       |    2 +-
 bootstrap                  |    2 +-
 bootstrap.conf             |    2 +-
 cfg.mk                     |    2 +-
 configure.ac               |    2 +-
 doc/Makefile.am            |    2 +-
 doc/fdl.texi               |    2 +-
 doc/grep.in.1              |    2 +-
 doc/grep.texi              |    3 ++-
 lib/Makefile.am            |    2 +-
 lib/colorize-impl.c        |    2 +-
 lib/colorize.h             |    2 +-
 lib/ms/colorize-impl.c     |    2 +-
 lib/savedir.c              |    2 +-
 m4/pcre.m4                 |    2 +-
 po/POTFILES.in             |    2 +-
 src/Makefile.am            |    2 +-
 src/dfa.c                  |    2 +-
 src/dfa.h                  |    2 +-
 src/dfasearch.c            |    2 +-
 src/dosbuf.c               |    2 +-
 src/grep.h                 |    2 +-
 src/kwsearch.c             |    2 +-
 src/kwset.c                |    2 +-
 src/kwset.h                |    2 +-
 src/main.c                 |    2 +-
 src/mbsupport.h            |    2 +-
 src/pcresearch.c           |    2 +-
 src/search.h               |    2 +-
 src/searchutils.c          |    2 +-
 src/system.h               |    2 +-
 tests/Makefile.am          |    2 +-
 tests/backref              |    2 +-
 tests/bre                  |    2 +-
 tests/bre.awk              |    2 +-
 tests/dfa-heap-overrun     |    2 +-
 tests/empty                |    2 +-
 tests/ere                  |    2 +-
 tests/ere.awk              |    2 +-
 tests/file                 |    2 +-
 tests/fmbtest              |    2 +-
 tests/foad1                |    2 +-
 tests/get-mb-cur-max.c     |    2 +-
 tests/help-version         |    2 +-
 tests/high-bit-range       |    2 +-
 tests/init.sh              |    2 +-
 tests/khadafy              |    2 +-
 tests/options              |    2 +-
 tests/pcre                 |    2 +-
 tests/pcre-abort           |    2 +-
 tests/spencer1             |    2 +-
 tests/spencer1-locale      |    2 +-
 tests/spencer1-locale.awk  |    2 +-
 tests/spencer1.awk         |    2 +-
 tests/spencer2             |    2 +-
 tests/status               |    2 +-
 tests/tests                |    2 +-
 tests/turkish-I            |    2 +-
 tests/unibyte-bracket-expr |    2 +-
 tests/yesno                |    2 +-
 71 files changed, 72 insertions(+), 71 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sun Jan 01 06:07:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhJGH-0007Sq-C1
	for mharc-grep-commit@gnu.org; Sun, 01 Jan 2012 06:07:33 -0500
Received: from eggs.gnu.org ([140.186.70.92]:37481)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhAhA-0004at-CD
	for grep-commit@gnu.org; Sat, 31 Dec 2011 20:58:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhAh8-0006sq-Tt
	for grep-commit@gnu.org; Sat, 31 Dec 2011 20:58:44 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:41690)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhAh8-0006sd-S0
	for grep-commit@gnu.org; Sat, 31 Dec 2011 20:58:42 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhAh8-0006xN-An
	for grep-commit@gnu.org; Sun, 01 Jan 2012 01:58:42 +0000
Date: Sun, 01 Jan 2012 01:58:42 +0000
Message-Id: <E1RhAh8-0006xN-An@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-31-gca0d4f3
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 209bae502a2255aece67625641617335a911f211
X-Git-Newrev: ca0d4f3bae56c486ec1d49d72c9ed6924236babc
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-Mailman-Approved-At: Sun, 01 Jan 2012 06:07:31 -0500
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jan 2012 01:58:45 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  ca0d4f3bae56c486ec1d49d72c9ed6924236babc (commit)
       via  71e02fa1fde638f8ae6d4bd5f985e6d3c2bd65e8 (commit)
      from  209bae502a2255aece67625641617335a911f211 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=ca0d4f3bae56c486ec1d49d72c9ed6924236babc


commit ca0d4f3bae56c486ec1d49d72c9ed6924236babc
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sat Dec 31 17:54:59 2011 -0800

    grep: do input==output check more like dir loop check
    
    * src/main.c (grepfile): Just use SAME_INODE; don't bother
    with SAME_REGULAR_FILE.  This works better on properly-working
    POSIX hosts, since it handles the case where the file is changing
    as we grep it.  It works worse on hosts that don't support st_ino
    properly, but in practice this isn't that much of a problem here.
    * src/system.h (same_file_attributes, SAME_REGULAR_FILE):
    Remove; no longer needed.

diff --git a/src/main.c b/src/main.c
index ca6f85f..3fff5b7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1423,8 +1423,8 @@ grepfile (char const *file, struct stats *stats)
          input==output, while there is no risk of infloop, there is a race
          condition that could result in "alternate" output.  */
       if (!out_quiet && list_files == 0 && 1 < max_count
-          && S_ISREG (stats->stat.st_mode) && out_stat.st_ino
-          && SAME_REGULAR_FILE (stats->stat, out_stat))
+          && S_ISREG (out_stat.st_mode) && out_stat.st_ino
+          && SAME_INODE (stats->stat, out_stat))
         {
           error (0, 0, _("input file %s is also the output"), quote (file));
           errseen = 1;
diff --git a/src/system.h b/src/system.h
index db2fea3..f356c08 100644
--- a/src/system.h
+++ b/src/system.h
@@ -51,44 +51,5 @@ enum { EXIT_TROUBLE = 2 };
 # define initialize_main(argcp, argvp)
 #endif
 
-/* Do struct stat *S, *T have the same file attributes?
-
-   POSIX says that two files are identical if st_ino and st_dev are
-   the same, but many file systems incorrectly assign the same (device,
-   inode) pair to two distinct files, including:
-
-   - GNU/Linux NFS servers that export all local file systems as a
-     single NFS file system, if a local device number (st_dev) exceeds
-     255, or if a local inode number (st_ino) exceeds 16777215.
-
-   - Network Appliance NFS servers in snapshot directories; see
-     Network Appliance bug #195.
-
-   - ClearCase MVFS; see bug id ATRia04618.
-
-   Check whether two files that purport to be the same have the same
-   attributes, to work around instances of this common bug.  Do not
-   inspect all attributes, only attributes useful in checking for this
-   bug.
-
-   It's possible for two distinct files on a buggy file system to have
-   the same attributes, but it's not worth slowing down all
-   implementations (or complicating the configuration) to cater to
-   these rare cases in buggy implementations.  */
-
-#ifndef same_file_attributes
-# define same_file_attributes(s, t) \
-   ((s)->st_mode == (t)->st_mode \
-    && (s)->st_nlink == (t)->st_nlink \
-    && (s)->st_uid == (t)->st_uid \
-    && (s)->st_gid == (t)->st_gid \
-    && (s)->st_size == (t)->st_size \
-    && (s)->st_mtime == (t)->st_mtime \
-    && (s)->st_ctime == (t)->st_ctime)
-#endif
-
-#define SAME_REGULAR_FILE(s, t) \
-  (SAME_INODE (s, t) && same_file_attributes (&s, &t))
-
 #include "unlocked-io.h"
 #endif

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=71e02fa1fde638f8ae6d4bd5f985e6d3c2bd65e8


commit ca0d4f3bae56c486ec1d49d72c9ed6924236babc
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sat Dec 31 17:54:59 2011 -0800

    grep: do input==output check more like dir loop check
    
    * src/main.c (grepfile): Just use SAME_INODE; don't bother
    with SAME_REGULAR_FILE.  This works better on properly-working
    POSIX hosts, since it handles the case where the file is changing
    as we grep it.  It works worse on hosts that don't support st_ino
    properly, but in practice this isn't that much of a problem here.
    * src/system.h (same_file_attributes, SAME_REGULAR_FILE):
    Remove; no longer needed.

diff --git a/src/main.c b/src/main.c
index ca6f85f..3fff5b7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1423,8 +1423,8 @@ grepfile (char const *file, struct stats *stats)
          input==output, while there is no risk of infloop, there is a race
          condition that could result in "alternate" output.  */
       if (!out_quiet && list_files == 0 && 1 < max_count
-          && S_ISREG (stats->stat.st_mode) && out_stat.st_ino
-          && SAME_REGULAR_FILE (stats->stat, out_stat))
+          && S_ISREG (out_stat.st_mode) && out_stat.st_ino
+          && SAME_INODE (stats->stat, out_stat))
         {
           error (0, 0, _("input file %s is also the output"), quote (file));
           errseen = 1;
diff --git a/src/system.h b/src/system.h
index db2fea3..f356c08 100644
--- a/src/system.h
+++ b/src/system.h
@@ -51,44 +51,5 @@ enum { EXIT_TROUBLE = 2 };
 # define initialize_main(argcp, argvp)
 #endif
 
-/* Do struct stat *S, *T have the same file attributes?
-
-   POSIX says that two files are identical if st_ino and st_dev are
-   the same, but many file systems incorrectly assign the same (device,
-   inode) pair to two distinct files, including:
-
-   - GNU/Linux NFS servers that export all local file systems as a
-     single NFS file system, if a local device number (st_dev) exceeds
-     255, or if a local inode number (st_ino) exceeds 16777215.
-
-   - Network Appliance NFS servers in snapshot directories; see
-     Network Appliance bug #195.
-
-   - ClearCase MVFS; see bug id ATRia04618.
-
-   Check whether two files that purport to be the same have the same
-   attributes, to work around instances of this common bug.  Do not
-   inspect all attributes, only attributes useful in checking for this
-   bug.
-
-   It's possible for two distinct files on a buggy file system to have
-   the same attributes, but it's not worth slowing down all
-   implementations (or complicating the configuration) to cater to
-   these rare cases in buggy implementations.  */
-
-#ifndef same_file_attributes
-# define same_file_attributes(s, t) \
-   ((s)->st_mode == (t)->st_mode \
-    && (s)->st_nlink == (t)->st_nlink \
-    && (s)->st_uid == (t)->st_uid \
-    && (s)->st_gid == (t)->st_gid \
-    && (s)->st_size == (t)->st_size \
-    && (s)->st_mtime == (t)->st_mtime \
-    && (s)->st_ctime == (t)->st_ctime)
-#endif
-
-#define SAME_REGULAR_FILE(s, t) \
-  (SAME_INODE (s, t) && same_file_attributes (&s, &t))
-
 #include "unlocked-io.h"
 #endif

-----------------------------------------------------------------------

Summary of changes:
 gnulib       |    2 +-
 src/main.c   |    4 ++--
 src/system.h |   39 ---------------------------------------
 3 files changed, 3 insertions(+), 42 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sun Jan 01 06:07:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhJGH-0007T1-Dm
	for mharc-grep-commit@gnu.org; Sun, 01 Jan 2012 06:07:33 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45718)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhCHc-0002g3-RG
	for grep-commit@gnu.org; Sat, 31 Dec 2011 22:40:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhCHa-0002Eg-NZ
	for grep-commit@gnu.org; Sat, 31 Dec 2011 22:40:28 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36911)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhCHa-0002Eb-K5
	for grep-commit@gnu.org; Sat, 31 Dec 2011 22:40:26 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhCHZ-0001Bm-G2
	for grep-commit@gnu.org; Sun, 01 Jan 2012 03:40:26 +0000
Date: Sun, 01 Jan 2012 03:40:25 +0000
Message-Id: <E1RhCHZ-0001Bm-G2@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-33-g4919250
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ca0d4f3bae56c486ec1d49d72c9ed6924236babc
X-Git-Newrev: 491925040894701c72c9f7d34bea68f3f1865a3a
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-Mailman-Approved-At: Sun, 01 Jan 2012 06:07:31 -0500
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jan 2012 03:40:30 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  491925040894701c72c9f7d34bea68f3f1865a3a (commit)
       via  4f61a0530c565bed2e8d0cf74ac9fd4322313093 (commit)
      from  ca0d4f3bae56c486ec1d49d72c9ed6924236babc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=491925040894701c72c9f7d34bea68f3f1865a3a


commit 491925040894701c72c9f7d34bea68f3f1865a3a
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sat Dec 31 19:38:45 2011 -0800

    grep: lower-case function names
    
    These names used to be macros, but they're functions now.
    All callers changed.
    * src/main.c (pr_sgr_start): Rename from PR_SGR_START.
    (pr_sgr_end): Rename from PR_SGR_END.
    (pr_sgr_start_if): Rename from PR_SGR_START_IF.
    (pr_sgr_end_if): Rename from PR_SGR_END_IF.

diff --git a/src/main.c b/src/main.c
index 8e4142a..f0a8085 100644
--- a/src/main.c
+++ b/src/main.c
@@ -214,28 +214,28 @@ static const char *sgr_end   = "\33[m\33[K";
 
 /* SGR utility functions.  */
 static void
-PR_SGR_START (char const *s)
+pr_sgr_start (char const *s)
 {
   if (*s)
     print_start_colorize (sgr_start, s);
 }
 static void
-PR_SGR_END (char const *s)
+pr_sgr_end (char const *s)
 {
   if (*s)
     print_end_colorize (sgr_end);
 }
 static void
-PR_SGR_START_IF (char const *s)
+pr_sgr_start_if (char const *s)
 {
   if (color_option)
-    PR_SGR_START (s);
+    pr_sgr_start (s);
 }
 static void
-PR_SGR_END_IF (char const *s)
+pr_sgr_end_if (char const *s)
 {
   if (color_option)
-    PR_SGR_END (s);
+    pr_sgr_end (s);
 }
 
 struct color_cap
@@ -663,18 +663,18 @@ nlscan (char const *lim)
 static void
 print_filename (void)
 {
-  PR_SGR_START_IF (filename_color);
+  pr_sgr_start_if (filename_color);
   fputs (filename, stdout);
-  PR_SGR_END_IF (filename_color);
+  pr_sgr_end_if (filename_color);
 }
 
 /* Print a character separator.  */
 static void
 print_sep (char sep)
 {
-  PR_SGR_START_IF (sep_color);
+  pr_sgr_start_if (sep_color);
   fputc (sep, stdout);
-  PR_SGR_END_IF (sep_color);
+  pr_sgr_end_if (sep_color);
 }
 
 /* Print a line number or a byte offset.  */
@@ -699,9 +699,9 @@ print_offset (uintmax_t pos, int min_width, const char *color)
     while (--min_width >= 0)
       *--p = ' ';
 
-  PR_SGR_START_IF (color);
+  pr_sgr_start_if (color);
   fwrite (p, 1, buf + sizeof buf - p, stdout);
-  PR_SGR_END_IF (color);
+  pr_sgr_end_if (color);
 }
 
 /* Print a whole line head (filename, line, byte).  */
@@ -795,7 +795,7 @@ print_line_middle (const char *beg, const char *lim,
                                       : SEP_CHAR_SELECTED));
           else
             {
-              PR_SGR_START (line_color);
+              pr_sgr_start (line_color);
               if (mid)
                 {
                   cur = mid;
@@ -804,9 +804,9 @@ print_line_middle (const char *beg, const char *lim,
               fwrite (cur, sizeof (char), b - cur, stdout);
             }
 
-          PR_SGR_START_IF (match_color);
+          pr_sgr_start_if (match_color);
           fwrite (b, sizeof (char), match_size, stdout);
-          PR_SGR_END_IF (match_color);
+          pr_sgr_end_if (match_color);
           if (only_matching)
             fputs ("\n", stdout);
         }
@@ -833,10 +833,10 @@ print_line_tail (const char *beg, const char *lim, const char *line_color)
 
   if (tail_size > 0)
     {
-      PR_SGR_START (line_color);
+      pr_sgr_start (line_color);
       fwrite (beg, 1, tail_size, stdout);
       beg += tail_size;
-      PR_SGR_END (line_color);
+      pr_sgr_end (line_color);
     }
 
   return beg;
@@ -941,9 +941,9 @@ prtext (char const *beg, char const *lim, int *nlinesp)
          discontiguous from the last output in the file. */
       if ((out_before || out_after) && used && p != lastout && group_separator)
         {
-          PR_SGR_START_IF (sep_color);
+          pr_sgr_start_if (sep_color);
           fputs (group_separator, stdout);
-          PR_SGR_END_IF (sep_color);
+          pr_sgr_end_if (sep_color);
           fputc ('\n', stdout);
         }
 

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=4f61a0530c565bed2e8d0cf74ac9fd4322313093


commit 491925040894701c72c9f7d34bea68f3f1865a3a
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sat Dec 31 19:38:45 2011 -0800

    grep: lower-case function names
    
    These names used to be macros, but they're functions now.
    All callers changed.
    * src/main.c (pr_sgr_start): Rename from PR_SGR_START.
    (pr_sgr_end): Rename from PR_SGR_END.
    (pr_sgr_start_if): Rename from PR_SGR_START_IF.
    (pr_sgr_end_if): Rename from PR_SGR_END_IF.

diff --git a/src/main.c b/src/main.c
index 8e4142a..f0a8085 100644
--- a/src/main.c
+++ b/src/main.c
@@ -214,28 +214,28 @@ static const char *sgr_end   = "\33[m\33[K";
 
 /* SGR utility functions.  */
 static void
-PR_SGR_START (char const *s)
+pr_sgr_start (char const *s)
 {
   if (*s)
     print_start_colorize (sgr_start, s);
 }
 static void
-PR_SGR_END (char const *s)
+pr_sgr_end (char const *s)
 {
   if (*s)
     print_end_colorize (sgr_end);
 }
 static void
-PR_SGR_START_IF (char const *s)
+pr_sgr_start_if (char const *s)
 {
   if (color_option)
-    PR_SGR_START (s);
+    pr_sgr_start (s);
 }
 static void
-PR_SGR_END_IF (char const *s)
+pr_sgr_end_if (char const *s)
 {
   if (color_option)
-    PR_SGR_END (s);
+    pr_sgr_end (s);
 }
 
 struct color_cap
@@ -663,18 +663,18 @@ nlscan (char const *lim)
 static void
 print_filename (void)
 {
-  PR_SGR_START_IF (filename_color);
+  pr_sgr_start_if (filename_color);
   fputs (filename, stdout);
-  PR_SGR_END_IF (filename_color);
+  pr_sgr_end_if (filename_color);
 }
 
 /* Print a character separator.  */
 static void
 print_sep (char sep)
 {
-  PR_SGR_START_IF (sep_color);
+  pr_sgr_start_if (sep_color);
   fputc (sep, stdout);
-  PR_SGR_END_IF (sep_color);
+  pr_sgr_end_if (sep_color);
 }
 
 /* Print a line number or a byte offset.  */
@@ -699,9 +699,9 @@ print_offset (uintmax_t pos, int min_width, const char *color)
     while (--min_width >= 0)
       *--p = ' ';
 
-  PR_SGR_START_IF (color);
+  pr_sgr_start_if (color);
   fwrite (p, 1, buf + sizeof buf - p, stdout);
-  PR_SGR_END_IF (color);
+  pr_sgr_end_if (color);
 }
 
 /* Print a whole line head (filename, line, byte).  */
@@ -795,7 +795,7 @@ print_line_middle (const char *beg, const char *lim,
                                       : SEP_CHAR_SELECTED));
           else
             {
-              PR_SGR_START (line_color);
+              pr_sgr_start (line_color);
               if (mid)
                 {
                   cur = mid;
@@ -804,9 +804,9 @@ print_line_middle (const char *beg, const char *lim,
               fwrite (cur, sizeof (char), b - cur, stdout);
             }
 
-          PR_SGR_START_IF (match_color);
+          pr_sgr_start_if (match_color);
           fwrite (b, sizeof (char), match_size, stdout);
-          PR_SGR_END_IF (match_color);
+          pr_sgr_end_if (match_color);
           if (only_matching)
             fputs ("\n", stdout);
         }
@@ -833,10 +833,10 @@ print_line_tail (const char *beg, const char *lim, const char *line_color)
 
   if (tail_size > 0)
     {
-      PR_SGR_START (line_color);
+      pr_sgr_start (line_color);
       fwrite (beg, 1, tail_size, stdout);
       beg += tail_size;
-      PR_SGR_END (line_color);
+      pr_sgr_end (line_color);
     }
 
   return beg;
@@ -941,9 +941,9 @@ prtext (char const *beg, char const *lim, int *nlinesp)
          discontiguous from the last output in the file. */
       if ((out_before || out_after) && used && p != lastout && group_separator)
         {
-          PR_SGR_START_IF (sep_color);
+          pr_sgr_start_if (sep_color);
           fputs (group_separator, stdout);
-          PR_SGR_END_IF (sep_color);
+          pr_sgr_end_if (sep_color);
           fputc ('\n', stdout);
         }
 

-----------------------------------------------------------------------

Summary of changes:
 cfg.mk                                        |    3 +
 configure.ac                                  |    6 +
 lib/Makefile.am                               |    4 +-
 tests/get-mb-cur-max.c => lib/colorize-impl.c |   28 ++--
 lib/colorize.c                                |    1 +
 tests/get-mb-cur-max.c => lib/colorize.h      |   30 ++--
 lib/ms/colorize-impl.c                        |  216 +++++++++++++++++++
 lib/ms/colorize.h                             |    4 +
 src/Makefile.am                               |    1 +
 src/main.c                                    |  278 ++++---------------------
 10 files changed, 304 insertions(+), 267 deletions(-)
 copy tests/get-mb-cur-max.c => lib/colorize-impl.c (67%)
 create mode 100644 lib/colorize.c
 copy tests/get-mb-cur-max.c => lib/colorize.h (57%)
 create mode 100644 lib/ms/colorize-impl.c
 create mode 100644 lib/ms/colorize.h


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sun Jan 01 14:15:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhQs4-0005Gl-KS
	for mharc-grep-commit@gnu.org; Sun, 01 Jan 2012 14:15:04 -0500
Received: from eggs.gnu.org ([140.186.70.92]:42941)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhQs2-0005Fa-CO
	for grep-commit@gnu.org; Sun, 01 Jan 2012 14:15:03 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhQs0-0008IJ-Fs
	for grep-commit@gnu.org; Sun, 01 Jan 2012 14:15:02 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:41863)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhQs0-0008IF-ED
	for grep-commit@gnu.org; Sun, 01 Jan 2012 14:15:00 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1RhQs0-0000ov-3u
	for grep-commit@gnu.org; Sun, 01 Jan 2012 19:15:00 +0000
Date: Sun, 01 Jan 2012 19:15:00 +0000
Message-Id: <E1RhQs0-0000ov-3u@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-35-g75bc6fb
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5b2201913f28f43da01cfebfce90b798db64f117
X-Git-Newrev: 75bc6fb14dea81ade7d761448610c2280d17d1d6
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jan 2012 19:15:04 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  75bc6fb14dea81ade7d761448610c2280d17d1d6 (commit)
      from  5b2201913f28f43da01cfebfce90b798db64f117 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=75bc6fb14dea81ade7d761448610c2280d17d1d6


commit 75bc6fb14dea81ade7d761448610c2280d17d1d6
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sun Jan 1 11:12:10 2012 -0800

    grep: check stdin like other files
    
    * NEWS: Document this.
    * src/main.c (grepfile): Revamp tests for input files so that
    standard input is tested like other files.  For example, report
    an error if standard input equals standard output.
    Prefer open+fstat to stat+open if possible, as open+fstat is
    usually a bit faster and avoids a race condition.
    * tests/in-eq-out-infloop: Add tests for cases like
    'grep pat <file >>file'.

diff --git a/NEWS b/NEWS
index 636e5dc..d4475bc 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,10 @@ GNU grep NEWS                                    -*- outline -*-
   read error on most systems; formerly, it ignored the error.
   [bug introduced in grep-2.5]
 
+  On POSIX systems, commands like "grep PAT < FILE >> FILE"
+  now report an error instead of looping.
+  [bug present since "the beginning"]
+
   The --include, --exclude, and --exclude-dir options now handle
   command-line arguments more consistently.  --include and --exclude
   apply only to non-directories and --exclude-dir applies only to
diff --git a/src/main.c b/src/main.c
index 6fdc982..3376fa4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -376,7 +376,7 @@ int match_lines;
 unsigned char eolbyte;
 
 /* For error messages. */
-/* The name the program was run with, stripped of any leading path. */
+/* The input file name, or (if standard input) "-" or a --label argument.  */
 static char const *filename;
 static int errseen;
 
@@ -1212,67 +1212,85 @@ grepfile (char const *file, struct stats *stats)
   int count;
   int status;
 
+  filename = (file ? file : label ? label : _("(standard input)"));
+
   if (! file)
+    desc = STDIN_FILENO;
+  else if (devices == SKIP_DEVICES)
     {
-      desc = 0;
-      filename = label ? label : _("(standard input)");
+      /* Don't open yet, since that might have side effects on a device.  */
+      desc = -1;
     }
   else
     {
-      if (stat (file, &stats->stat) != 0)
+      /* When skipping directories, don't worry about directories
+         that can't be opened.  */
+      desc = open (file, O_RDONLY);
+      if (desc < 0 && directories != SKIP_DIRECTORIES)
         {
           suppressible_error (file, errno);
           return 1;
         }
-      if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
-        return 1;
-      if (devices == SKIP_DEVICES && (S_ISCHR (stats->stat.st_mode)
+    }
+
+  if (desc < 0
+      ? stat (file, &stats->stat) != 0
+      : fstat (desc, &stats->stat) != 0)
+    {
+      suppressible_error (filename, errno);
+      if (file)
+        close (desc);
+      return 1;
+    }
+
+  if ((directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
+      || (devices == SKIP_DEVICES && (S_ISCHR (stats->stat.st_mode)
                                       || S_ISBLK (stats->stat.st_mode)
                                       || S_ISSOCK (stats->stat.st_mode)
-                                      || S_ISFIFO (stats->stat.st_mode)))
-        return 1;
-
-      /* If there is a regular file on stdout and the current file refers
-         to the same i-node, we have to report the problem and skip it.
-         Otherwise when matching lines from some other input reach the
-         disk before we open this file, we can end up reading and matching
-         those lines and appending them to the file from which we're reading.
-         Then we'd have what appears to be an infinite loop that'd terminate
-         only upon filling the output file system or reaching a quota.
-         However, there is no risk of an infinite loop if grep is generating
-         no output, i.e., with --silent, --quiet, -q.
-         Similarly, with any of these:
-           --max-count=N (-m) (for N >= 2)
-           --files-with-matches (-l)
-           --files-without-match (-L)
-         there is no risk of trouble.
-         For --max-count=1, grep stops after printing the first match,
-         so there is no risk of malfunction.  But even --max-count=2, with
-         input==output, while there is no risk of infloop, there is a race
-         condition that could result in "alternate" output.  */
-      if (!out_quiet && list_files == 0 && 1 < max_count
-          && S_ISREG (out_stat.st_mode) && out_stat.st_ino
-          && SAME_INODE (stats->stat, out_stat))
-        {
-          error (0, 0, _("input file %s is also the output"), quote (file));
-          errseen = 1;
-          return 1;
-        }
+                                      || S_ISFIFO (stats->stat.st_mode))))
+    {
+      if (file)
+        close (desc);
+      return 1;
+    }
 
-      while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR)
-        continue;
+  /* If there is a regular file on stdout and the current file refers
+     to the same i-node, we have to report the problem and skip it.
+     Otherwise when matching lines from some other input reach the
+     disk before we open this file, we can end up reading and matching
+     those lines and appending them to the file from which we're reading.
+     Then we'd have what appears to be an infinite loop that'd terminate
+     only upon filling the output file system or reaching a quota.
+     However, there is no risk of an infinite loop if grep is generating
+     no output, i.e., with --silent, --quiet, -q.
+     Similarly, with any of these:
+       --max-count=N (-m) (for N >= 2)
+       --files-with-matches (-l)
+       --files-without-match (-L)
+     there is no risk of trouble.
+     For --max-count=1, grep stops after printing the first match,
+     so there is no risk of malfunction.  But even --max-count=2, with
+     input==output, while there is no risk of infloop, there is a race
+     condition that could result in "alternate" output.  */
+  if (!out_quiet && list_files == 0 && 1 < max_count
+      && S_ISREG (out_stat.st_mode) && out_stat.st_ino
+      && SAME_INODE (stats->stat, out_stat))
+    {
+      error (0, 0, _("input file %s is also the output"), quote (filename));
+      errseen = 1;
+      if (file)
+        close (desc);
+      return 1;
+    }
 
+  if (desc < 0)
+    {
+      desc = open (file, O_RDONLY);
       if (desc < 0)
         {
-          int e = errno;
-          /* When skipping directories, don't worry about directories
-             that can't be opened.  */
-          if (! (directories == SKIP_DIRECTORIES && isdir (file)))
-            suppressible_error (file, e);
+          suppressible_error (file, errno);
           return 1;
         }
-
-      filename = file;
     }
 
 #if defined SET_BINARY
diff --git a/tests/in-eq-out-infloop b/tests/in-eq-out-infloop
index dcb7ac0..fc7acc6 100755
--- a/tests/in-eq-out-infloop
+++ b/tests/in-eq-out-infloop
@@ -13,23 +13,28 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
 done
 
 echo "$v" > out || framework_failure_
-echo 'grep: input file `out'\'' is also the output' \
-    > err.exp || framework_failure_
 
-# Require an exit status of 2.
-# grep-2.8 and earlier would infloop.
-timeout 10 grep 0 out >> out 2> err; st=$?
-test $st = 2 || fail=1
+for arg in out - ''; do
+  case $arg in
+    out) echo 'grep: input file `out'\'' is also the output';;
+    *)   echo 'grep: input file `(standard input)'\'' is also the output';;
+  esac > err.exp || framework_failure_
 
-compare err.exp err || fail=1
+  # Require an exit status of 2.
+  # grep-2.8 and earlier would infloop with $arg = out.
+  # grep-2.10 and earlier would infloop with $arg = - or $arg = ''.
+  timeout 10 grep 0 $arg < out >> out 2> err; st=$?
+  test $st = 2 || fail=1
+  compare err.exp err || fail=1
 
-# But with each of the following options it must not exit-2.
-for i in -q -m1 -l -L; do
-  timeout 10 grep $i 0 out >> out 2> err; st=$?
-  test $st = 2 && fail=1
-done
+  # But with each of the following options it must not exit-2.
+  for i in -q -m1 -l -L; do
+    timeout 10 grep $i 0 $arg < out >> out 2> err; st=$?
+    test $st = 2 && fail=1
+  done
 
-timeout 10 grep -2 0 out >> out 2> err; st=$?
-test $st = 2 || fail=1
+  timeout 10 grep -2 0 $arg < out >> out 2> err; st=$?
+  test $st = 2 || fail=1
+done
 
 Exit $fail

-----------------------------------------------------------------------

Summary of changes:
 NEWS                    |    4 ++
 src/main.c              |  108 +++++++++++++++++++++++++++-------------------
 tests/in-eq-out-infloop |   33 ++++++++------
 3 files changed, 86 insertions(+), 59 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Mon Jan 02 05:16:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rhewk-00088n-Th
	for mharc-grep-commit@gnu.org; Mon, 02 Jan 2012 05:16:50 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45986)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rhewi-000889-Bk
	for grep-commit@gnu.org; Mon, 02 Jan 2012 05:16:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rhewh-0005h8-5q
	for grep-commit@gnu.org; Mon, 02 Jan 2012 05:16:48 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53487)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rhewh-0005h3-33
	for grep-commit@gnu.org; Mon, 02 Jan 2012 05:16:47 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rhewg-0003UI-NJ
	for grep-commit@gnu.org; Mon, 02 Jan 2012 10:16:46 +0000
Date: Mon, 02 Jan 2012 10:16:46 +0000
Message-Id: <E1Rhewg-0003UI-NJ@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-36-g4c6a1dc
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 75bc6fb14dea81ade7d761448610c2280d17d1d6
X-Git-Newrev: 4c6a1dcd647b208a59e3b23ad0aaf0a25397f6ad
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Jan 2012 10:16:49 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  4c6a1dcd647b208a59e3b23ad0aaf0a25397f6ad (commit)
      from  75bc6fb14dea81ade7d761448610c2280d17d1d6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=4c6a1dcd647b208a59e3b23ad0aaf0a25397f6ad


commit 4c6a1dcd647b208a59e3b23ad0aaf0a25397f6ad
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Mon Jan 2 02:16:14 2012 -0800

    grep: prefer fgets to printf, _ to gettext
    
    * lib/colorize.h (print_end_colorize):
    * lib/ms/colorize-impl.c (print_end_colorize):
    Use fputs instead of printf.
    * src/main.c (usage): Likewise.  Use _ instead of gettext.

diff --git a/lib/colorize.h b/lib/colorize.h
index 7890fbc..104f7a0 100644
--- a/lib/colorize.h
+++ b/lib/colorize.h
@@ -33,5 +33,5 @@ print_start_colorize (char const *sgr_start, char const *sgr_seq)
 static inline void
 print_end_colorize (char const *sgr_end)
 {
-  printf ("%s", sgr_end);
+  fputs (sgr_end, stdout);
 }
diff --git a/lib/ms/colorize-impl.c b/lib/ms/colorize-impl.c
index 3c8c73a..d9d9b95 100644
--- a/lib/ms/colorize-impl.c
+++ b/lib/ms/colorize-impl.c
@@ -212,5 +212,5 @@ print_end_colorize (char const *sgr_end)
       w32_clreol ();
     }
   else
-    printf ("%s", sgr_end);
+    fputs (sgr_end, stdout);
 }
diff --git a/src/main.c b/src/main.c
index 3376fa4..a1d590a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1426,7 +1426,7 @@ usage (int status)
       printf (_("Usage: %s [OPTION]... PATTERN [FILE]...\n"), program_name);
       printf (_("\
 Search for PATTERN in each FILE or standard input.\n"));
-      printf ("%s", gettext (before_options));
+      fputs (_(before_options), stdout);
       printf (_("\
 Example: %s -i 'hello world' menu.h main.c\n\
 \n\
@@ -1507,7 +1507,7 @@ Context control:\n\
   -u, --unix-byte-offsets   report offsets as if CRs were not there\n\
                             (MSDOS/Windows)\n\
 \n"));
-      printf ("%s", _(after_options));
+      fputs (_(after_options), stdout);
       printf (_("\
 With no FILE, or when FILE is -, read standard input.  If less than two FILEs\n\
 are given, assume -h.  Exit status is 0 if any line was selected, 1 otherwise;\n\

-----------------------------------------------------------------------

Summary of changes:
 lib/colorize.h         |    2 +-
 lib/ms/colorize-impl.c |    2 +-
 src/main.c             |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Mon Jan 02 14:38:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rhni0-0004BE-Vo
	for mharc-grep-commit@gnu.org; Mon, 02 Jan 2012 14:38:12 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57677)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rhnhx-0004B8-5o
	for grep-commit@gnu.org; Mon, 02 Jan 2012 14:38:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rhnhv-00042n-AR
	for grep-commit@gnu.org; Mon, 02 Jan 2012 14:38:09 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47181)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rhnhv-00042j-7P
	for grep-commit@gnu.org; Mon, 02 Jan 2012 14:38:07 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rhnhs-0001d8-RW
	for grep-commit@gnu.org; Mon, 02 Jan 2012 19:38:07 +0000
Date: Mon, 02 Jan 2012 19:38:05 +0000
Message-Id: <E1Rhnhs-0001d8-RW@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-37-gfaf6ea1
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4c6a1dcd647b208a59e3b23ad0aaf0a25397f6ad
X-Git-Newrev: faf6ea13b3281a2004f5bfd1487708d1ba50a6c5
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Jan 2012 19:38:11 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  faf6ea13b3281a2004f5bfd1487708d1ba50a6c5 (commit)
      from  4c6a1dcd647b208a59e3b23ad0aaf0a25397f6ad (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=faf6ea13b3281a2004f5bfd1487708d1ba50a6c5


commit faf6ea13b3281a2004f5bfd1487708d1ba50a6c5
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Mon Jan 2 11:35:02 2012 -0800

    grep: -r with no args now searches "."
    
    This is a patch I've been meaning to put in for years.
    When I added support for "grep -r", I forgot to have "grep -r PAT"
    search the working directory by default, instead of searching
    standard input (which makes no sense, even if stdin is a directory).
    This is not an upward compatible change, since "grep -r PAT <file"
    will no longer search standard input, but that's OK; nobody should
    be using "grep -r" that way anyway.
    * NEWS: Document this.
    * doc/grep.texi (File and Directory Selection, grep Programs, Usage):
    Likewise.
    * src/main.c (usage): Likewise.
    (grepdir): If DIR is null, search the working directory, but do
    not prepend "./" to the file names.
    (main): If recursing and no operands are given, search ".".
    * tests/Makefile.am (TESTS): Add r-dot.
    * tests/r-dot: New file.

diff --git a/NEWS b/NEWS
index d4475bc..9efb82a 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,9 @@ GNU grep NEWS                                    -*- outline -*-
 
 ** New features
 
+  If no file operand is given, grep -r now searches the working directory.
+  Formerly it ignored the -r and searched standard input nonrecursively.
+
   grep now supports color highlighting of matches on MS-Windows.
 
 * Noteworthy changes in release 2.10 (2011-11-16) [stable]
diff --git a/doc/grep.texi b/doc/grep.texi
index 9889095..537237f 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -669,7 +669,7 @@ Search only files whose base name matches @var{glob}
 @opindex --recursive
 @cindex recursive search
 @cindex searching directory trees
-For each directory mentioned on the command line,
+For each directory operand,
 read and process all files in that directory, recursively.
 This is the same as the @samp{--directories=recurse} option.
 
@@ -1010,10 +1010,12 @@ instead of strict equality with@ 2.
 @cindex variants of @command{gerp}
 
 @command{grep} searches the named input files
-(or standard input if no files are named,
-or the file name @file{-} is given)
 for lines containing a match to the given pattern.
 By default, @command{grep} prints the matching lines.
+A file named @file{-} stands for standard input.
+If no input is specified, a recursive @command{grep}
+searches the working directory @file{.}, and a
+nonrecursive @command{grep} searches standard input.
 There are four major variants of @command{grep},
 controlled by the following options.
 
@@ -1492,14 +1494,11 @@ find /home/gigi -name '*.c' -print0 | xargs -0r grep -H 'hello'
 This differs from the command:
 
 @example
-grep -rH 'hello' *.c
+grep -H 'hello' *.c
 @end example
 
 which merely looks for @samp{hello} in all files in the current
 directory whose names end in @samp{.c}.
-Here the @option{-r} is
-probably unnecessary, as recursion occurs only in the unlikely event
-that one of @samp{.c} files is a directory.
 The @samp{find ...} command line above is more similar to the command:
 
 @example
diff --git a/src/main.c b/src/main.c
index a1d590a..8ad84f4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1348,6 +1348,7 @@ grepfile (char const *file, struct stats *stats)
 static int
 grepdir (char const *dir, struct stats const *stats)
 {
+  char const *dir_or_dot = (dir ? dir : ".");
   struct stats const *ancestor;
   char *name_space;
   int status = 1;
@@ -1372,38 +1373,50 @@ grepdir (char const *dir, struct stats const *stats)
         }
     }
 
-  name_space = savedir (dir, stats->stat.st_size, included_patterns,
+  name_space = savedir (dir_or_dot, stats->stat.st_size, included_patterns,
                         excluded_patterns, excluded_directory_patterns);
 
   if (! name_space)
     {
       if (errno)
-        suppressible_error (dir, errno);
+        suppressible_error (dir_or_dot, errno);
       else
         xalloc_die ();
     }
   else
     {
-      size_t dirlen = strlen (dir);
-      int needs_slash = ! (dirlen == FILE_SYSTEM_PREFIX_LEN (dir)
-                           || ISSLASH (dir[dirlen - 1]));
-      char *file = NULL;
+      size_t dirlen = 0;
+      int needs_slash = 0;
+      char *file_space = NULL;
       char const *namep = name_space;
       struct stats child;
+      if (dir)
+        {
+          dirlen = strlen (dir);
+          needs_slash = ! (dirlen == FILE_SYSTEM_PREFIX_LEN (dir)
+                           || ISSLASH (dir[dirlen - 1]));
+        }
       child.parent = stats;
       out_file += !no_filenames;
       while (*namep)
         {
           size_t namelen = strlen (namep);
-          file = xrealloc (file, dirlen + 1 + namelen + 1);
-          strcpy (file, dir);
-          file[dirlen] = '/';
-          strcpy (file + dirlen + needs_slash, namep);
+          char const *file;
+          if (! dir)
+            file = namep;
+          else
+            {
+              file_space = xrealloc (file_space, dirlen + 1 + namelen + 1);
+              strcpy (file_space, dir);
+              file_space[dirlen] = '/';
+              strcpy (file_space + dirlen + needs_slash, namep);
+              file = file_space;
+            }
           namep += namelen + 1;
           status &= grepfile (file, &child);
         }
       out_file -= !no_filenames;
-      free (file);
+      free (file_space);
       free (name_space);
     }
 
@@ -1509,9 +1522,10 @@ Context control:\n\
 \n"));
       fputs (_(after_options), stdout);
       printf (_("\
-With no FILE, or when FILE is -, read standard input.  If less than two FILEs\n\
-are given, assume -h.  Exit status is 0 if any line was selected, 1 otherwise;\n\
-if any error occurs and -q was not given, the exit status is 2.\n"));
+When FILE is -, read standard input.  With no FILE, read '.' if recursive,\n\
+standard input if not.  If fewer than two FILEs are given, assume -h.\n\
+Exit status is 0 if any line is selected, 1 otherwise;\n\
+if any error occurs and -q is not given, the exit status is 2.\n"));
       printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT);
       printf (_("GNU Grep home page: <%s>\n"),
               "http://www.gnu.org/software/grep/");
@@ -2233,6 +2247,14 @@ main (int argc, char **argv)
         }
       while (++optind < argc);
     }
+  else if (directories == RECURSE_DIRECTORIES)
+    {
+      status = 1;
+      if (stat (".", &stats_base.stat) == 0)
+        status = grepdir (NULL, &stats_base);
+      else
+        suppressible_error (".", errno);
+    }
   else
     status = grepfile ((char *) NULL, &stats_base);
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index df98e0b..77b670b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -73,6 +73,7 @@ TESTS =						\
   pcre-abort					\
   pcre-z					\
   prefix-of-multibyte				\
+  r-dot						\
   reversed-range-endpoints			\
   sjis-mb					\
   spencer1					\
diff --git a/tests/r-dot b/tests/r-dot
new file mode 100644
index 0000000..73e593c
--- /dev/null
+++ b/tests/r-dot
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Check that "grep -r PAT" reads ".".
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+mkdir dir || framework_failure_
+echo aaa > dir/a || framework_failure_
+echo bbb > dir/b || framework_failure_
+
+echo a:aaa > exp || framework_failure_
+
+(cd dir && grep -r aaa) > out || fail=1
+compare exp out || fail=1
+
+Exit $fail

-----------------------------------------------------------------------

Summary of changes:
 NEWS              |    3 +++
 doc/grep.texi     |   13 ++++++-------
 src/main.c        |   50 ++++++++++++++++++++++++++++++++++++--------------
 tests/Makefile.am |    1 +
 tests/r-dot       |   14 ++++++++++++++
 5 files changed, 60 insertions(+), 21 deletions(-)
 create mode 100644 tests/r-dot


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 02:08:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhyTn-00068a-UT
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 02:08:15 -0500
Received: from eggs.gnu.org ([140.186.70.92]:56080)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RhyTk-000683-V9
	for grep-commit@gnu.org; Tue, 03 Jan 2012 02:08:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RhyTj-0007OC-V8
	for grep-commit@gnu.org; Tue, 03 Jan 2012 02:08:12 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:52532)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RhyTj-0007O8-SR
	for grep-commit@gnu.org; Tue, 03 Jan 2012 02:08:11 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1RhyTj-0003MP-SR
	for grep-commit@gnu.org; Tue, 03 Jan 2012 07:08:11 +0000
Date: Tue, 03 Jan 2012 07:08:11 +0000
Message-Id: <E1RhyTj-0003MP-SR@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-38-gbda9087
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: faf6ea13b3281a2004f5bfd1487708d1ba50a6c5
X-Git-Newrev: bda9087261b3c9b2fcea68d7bf195b8a3d85d736
From: Jim Meyering <jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 07:08:14 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  bda9087261b3c9b2fcea68d7bf195b8a3d85d736 (commit)
      from  faf6ea13b3281a2004f5bfd1487708d1ba50a6c5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=bda9087261b3c9b2fcea68d7bf195b8a3d85d736


commit bda9087261b3c9b2fcea68d7bf195b8a3d85d736
Author: Jim Meyering <meyering@redhat.com>
Date:   Tue Jan 3 08:08:05 2012 +0100

    tests: avoid minor "make check" failure
    
    * tests/r-dot: Make executable, to avoid triggering a failed
    consistency test in "make check".

diff --git a/tests/r-dot b/tests/r-dot
old mode 100644
new mode 100755

-----------------------------------------------------------------------

Summary of changes:
 0 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 tests/r-dot


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 03:28:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhzjN-00079S-2U
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 03:28:25 -0500
Received: from eggs.gnu.org ([140.186.70.92]:46893)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1RhzjK-00079J-7H
	for grep-commit@gnu.org; Tue, 03 Jan 2012 03:28:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1RhzjI-00012u-62
	for grep-commit@gnu.org; Tue, 03 Jan 2012 03:28:22 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:48224)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1RhzjI-00012q-30
	for grep-commit@gnu.org; Tue, 03 Jan 2012 03:28:20 -0500
Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bonzini@gnu.org>) id 1RhzjH-0003kv-MH
	for grep-commit@gnu.org; Tue, 03 Jan 2012 08:28:19 +0000
Date: Tue, 03 Jan 2012 08:28:19 +0000
Message-Id: <E1RhzjH-0003kv-MH@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-41-ga00ff64
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: bda9087261b3c9b2fcea68d7bf195b8a3d85d736
X-Git-Newrev: a00ff6423cab863c05f18cbac38abc51afe9d657
From: Paolo Bonzini <bonzini@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 08:28:23 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  a00ff6423cab863c05f18cbac38abc51afe9d657 (commit)
       via  9871ae65430b46710f6bccf732672d4b439aa60c (commit)
       via  3f99160691ffee1356ff3757d91a389564270578 (commit)
      from  bda9087261b3c9b2fcea68d7bf195b8a3d85d736 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=a00ff6423cab863c05f18cbac38abc51afe9d657


commit a00ff6423cab863c05f18cbac38abc51afe9d657
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jan 3 09:10:05 2012 +0100

    remove lib/ms/
    
    * configure.ac: Create lib/colorize.c as a symbolic link.
    * lib/colorize-posix.c: New name of lib/colorize-impl.c.
    * lib/colorize-w32.c: New name of lib/ms/colorize-impl.c.
    * lib/colorize.c: Delete.
    * lib/Makefile.am (EXTRA_DIST): Adjust.
    * .gitignore: Adjust.
    * cfg.mk: Adjust syntax-check exclusions.

diff --git a/.gitignore b/.gitignore
index e4c7b47..35f5d10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,5 +61,8 @@ Makefile.in
 TAGS
 !/gnulib-tests/Makefile.am
 !/lib/Makefile.am
+!/lib/colorize-posix.c
+!/lib/colorize-w32.c
+!/lib/colorize.h
 !/lib/savedir.c
 !/lib/savedir.h
diff --git a/cfg.mk b/cfg.mk
index 204727d..5040199 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -63,10 +63,8 @@ update-copyright-env = \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
 
 exclude_file_name_regexp--sc_bindtextdomain = ^tests/get-mb-cur-max\.c$$
-exclude_file_name_regexp--sc_prohibit_strcmp = /colorize-impl\.c$$
+exclude_file_name_regexp--sc_prohibit_strcmp = /colorize-.*\.c$$
 exclude_file_name_regexp--sc_prohibit_xalloc_without_use = ^src/kwset\.c$$
 exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
   (Makefile|\.(am|mk)$$|^gl/lib/.*\.c\.diff$$)
-exclude_file_name_regexp--sc_require_config_h = ^lib/colorize\.c$$
-exclude_file_name_regexp--sc_require_config_h_first = ^lib/colorize\.c$$
 exclude_file_name_regexp--sc_space_tab = ^gl/lib/.*\.c\.diff$$
diff --git a/configure.ac b/configure.ac
index 0cfeb62..d681dc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,10 +201,10 @@ fi
 gl_FUNC_PCRE
 
 case $host_os in
-  mingw*) GREP_SRC_INCLUDES='-I$(top_srcdir)/lib/ms' ;;
-  *) GREP_SRC_INCLUDES= ;;
+  mingw*) suffix=w32 ;;
+  *) suffix=posix ;;
 esac
-AC_SUBST([GREP_SRC_INCLUDES])
+AC_CONFIG_LINKS([lib/colorize.c:lib/colorize-$suffix.c])
 
 AC_CONFIG_FILES([
   Makefile
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9127784..afbf3cd 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -23,7 +23,7 @@ AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
 libgreputils_a_SOURCES += \
   colorize.c colorize.h savedir.c savedir.h
 
-EXTRA_DIST += colorize-impl.c ms/colorize-impl.c
+EXTRA_DIST += colorize-posix.c colorize-w32.c
 
 libgreputils_a_LIBADD += $(LIBOBJS) $(ALLOCA)
 libgreputils_a_DEPENDENCIES += $(LIBOBJS) $(ALLOCA)
diff --git a/lib/colorize-impl.c b/lib/colorize-posix.c
similarity index 100%
rename from lib/colorize-impl.c
rename to lib/colorize-posix.c
diff --git a/lib/ms/colorize-impl.c b/lib/colorize-w32.c
similarity index 100%
rename from lib/ms/colorize-impl.c
rename to lib/colorize-w32.c
diff --git a/lib/colorize.c b/lib/colorize.c
deleted file mode 100644
index 51b1847..0000000
--- a/lib/colorize.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <colorize-impl.c>

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=9871ae65430b46710f6bccf732672d4b439aa60c


commit a00ff6423cab863c05f18cbac38abc51afe9d657
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jan 3 09:10:05 2012 +0100

    remove lib/ms/
    
    * configure.ac: Create lib/colorize.c as a symbolic link.
    * lib/colorize-posix.c: New name of lib/colorize-impl.c.
    * lib/colorize-w32.c: New name of lib/ms/colorize-impl.c.
    * lib/colorize.c: Delete.
    * lib/Makefile.am (EXTRA_DIST): Adjust.
    * .gitignore: Adjust.
    * cfg.mk: Adjust syntax-check exclusions.

diff --git a/.gitignore b/.gitignore
index e4c7b47..35f5d10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,5 +61,8 @@ Makefile.in
 TAGS
 !/gnulib-tests/Makefile.am
 !/lib/Makefile.am
+!/lib/colorize-posix.c
+!/lib/colorize-w32.c
+!/lib/colorize.h
 !/lib/savedir.c
 !/lib/savedir.h
diff --git a/cfg.mk b/cfg.mk
index 204727d..5040199 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -63,10 +63,8 @@ update-copyright-env = \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
 
 exclude_file_name_regexp--sc_bindtextdomain = ^tests/get-mb-cur-max\.c$$
-exclude_file_name_regexp--sc_prohibit_strcmp = /colorize-impl\.c$$
+exclude_file_name_regexp--sc_prohibit_strcmp = /colorize-.*\.c$$
 exclude_file_name_regexp--sc_prohibit_xalloc_without_use = ^src/kwset\.c$$
 exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
   (Makefile|\.(am|mk)$$|^gl/lib/.*\.c\.diff$$)
-exclude_file_name_regexp--sc_require_config_h = ^lib/colorize\.c$$
-exclude_file_name_regexp--sc_require_config_h_first = ^lib/colorize\.c$$
 exclude_file_name_regexp--sc_space_tab = ^gl/lib/.*\.c\.diff$$
diff --git a/configure.ac b/configure.ac
index 0cfeb62..d681dc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,10 +201,10 @@ fi
 gl_FUNC_PCRE
 
 case $host_os in
-  mingw*) GREP_SRC_INCLUDES='-I$(top_srcdir)/lib/ms' ;;
-  *) GREP_SRC_INCLUDES= ;;
+  mingw*) suffix=w32 ;;
+  *) suffix=posix ;;
 esac
-AC_SUBST([GREP_SRC_INCLUDES])
+AC_CONFIG_LINKS([lib/colorize.c:lib/colorize-$suffix.c])
 
 AC_CONFIG_FILES([
   Makefile
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9127784..afbf3cd 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -23,7 +23,7 @@ AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
 libgreputils_a_SOURCES += \
   colorize.c colorize.h savedir.c savedir.h
 
-EXTRA_DIST += colorize-impl.c ms/colorize-impl.c
+EXTRA_DIST += colorize-posix.c colorize-w32.c
 
 libgreputils_a_LIBADD += $(LIBOBJS) $(ALLOCA)
 libgreputils_a_DEPENDENCIES += $(LIBOBJS) $(ALLOCA)
diff --git a/lib/colorize-impl.c b/lib/colorize-posix.c
similarity index 100%
rename from lib/colorize-impl.c
rename to lib/colorize-posix.c
diff --git a/lib/ms/colorize-impl.c b/lib/colorize-w32.c
similarity index 100%
rename from lib/ms/colorize-impl.c
rename to lib/colorize-w32.c
diff --git a/lib/colorize.c b/lib/colorize.c
deleted file mode 100644
index 51b1847..0000000
--- a/lib/colorize.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <colorize-impl.c>

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=3f99160691ffee1356ff3757d91a389564270578


commit a00ff6423cab863c05f18cbac38abc51afe9d657
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jan 3 09:10:05 2012 +0100

    remove lib/ms/
    
    * configure.ac: Create lib/colorize.c as a symbolic link.
    * lib/colorize-posix.c: New name of lib/colorize-impl.c.
    * lib/colorize-w32.c: New name of lib/ms/colorize-impl.c.
    * lib/colorize.c: Delete.
    * lib/Makefile.am (EXTRA_DIST): Adjust.
    * .gitignore: Adjust.
    * cfg.mk: Adjust syntax-check exclusions.

diff --git a/.gitignore b/.gitignore
index e4c7b47..35f5d10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,5 +61,8 @@ Makefile.in
 TAGS
 !/gnulib-tests/Makefile.am
 !/lib/Makefile.am
+!/lib/colorize-posix.c
+!/lib/colorize-w32.c
+!/lib/colorize.h
 !/lib/savedir.c
 !/lib/savedir.h
diff --git a/cfg.mk b/cfg.mk
index 204727d..5040199 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -63,10 +63,8 @@ update-copyright-env = \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
 
 exclude_file_name_regexp--sc_bindtextdomain = ^tests/get-mb-cur-max\.c$$
-exclude_file_name_regexp--sc_prohibit_strcmp = /colorize-impl\.c$$
+exclude_file_name_regexp--sc_prohibit_strcmp = /colorize-.*\.c$$
 exclude_file_name_regexp--sc_prohibit_xalloc_without_use = ^src/kwset\.c$$
 exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
   (Makefile|\.(am|mk)$$|^gl/lib/.*\.c\.diff$$)
-exclude_file_name_regexp--sc_require_config_h = ^lib/colorize\.c$$
-exclude_file_name_regexp--sc_require_config_h_first = ^lib/colorize\.c$$
 exclude_file_name_regexp--sc_space_tab = ^gl/lib/.*\.c\.diff$$
diff --git a/configure.ac b/configure.ac
index 0cfeb62..d681dc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,10 +201,10 @@ fi
 gl_FUNC_PCRE
 
 case $host_os in
-  mingw*) GREP_SRC_INCLUDES='-I$(top_srcdir)/lib/ms' ;;
-  *) GREP_SRC_INCLUDES= ;;
+  mingw*) suffix=w32 ;;
+  *) suffix=posix ;;
 esac
-AC_SUBST([GREP_SRC_INCLUDES])
+AC_CONFIG_LINKS([lib/colorize.c:lib/colorize-$suffix.c])
 
 AC_CONFIG_FILES([
   Makefile
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9127784..afbf3cd 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -23,7 +23,7 @@ AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
 libgreputils_a_SOURCES += \
   colorize.c colorize.h savedir.c savedir.h
 
-EXTRA_DIST += colorize-impl.c ms/colorize-impl.c
+EXTRA_DIST += colorize-posix.c colorize-w32.c
 
 libgreputils_a_LIBADD += $(LIBOBJS) $(ALLOCA)
 libgreputils_a_DEPENDENCIES += $(LIBOBJS) $(ALLOCA)
diff --git a/lib/colorize-impl.c b/lib/colorize-posix.c
similarity index 100%
rename from lib/colorize-impl.c
rename to lib/colorize-posix.c
diff --git a/lib/ms/colorize-impl.c b/lib/colorize-w32.c
similarity index 100%
rename from lib/ms/colorize-impl.c
rename to lib/colorize-w32.c
diff --git a/lib/colorize.c b/lib/colorize.c
deleted file mode 100644
index 51b1847..0000000
--- a/lib/colorize.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <colorize-impl.c>

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                 |    3 ++
 bootstrap.conf                             |    1 +
 cfg.mk                                     |    4 +--
 configure.ac                               |    6 ++--
 gnulib                                     |    2 +-
 lib/Makefile.am                            |    2 +-
 lib/{colorize-impl.c => colorize-posix.c}  |   29 ++++++++++++++++++++-------
 lib/{ms/colorize-impl.c => colorize-w32.c} |   22 ++++++--------------
 lib/colorize.c                             |    1 -
 lib/colorize.h                             |   23 +++------------------
 lib/ms/colorize.h                          |    4 ---
 src/Makefile.am                            |    1 -
 src/main.c                                 |    2 +-
 13 files changed, 43 insertions(+), 57 deletions(-)
 rename lib/{colorize-impl.c => colorize-posix.c} (65%)
 rename lib/{ms/colorize-impl.c => colorize-w32.c} (92%)
 delete mode 100644 lib/colorize.c
 delete mode 100644 lib/ms/colorize.h


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 04:27:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri0ep-0004iy-04
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 04:27:47 -0500
Received: from eggs.gnu.org ([140.186.70.92]:33505)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ri0em-0004ip-Kr
	for grep-commit@gnu.org; Tue, 03 Jan 2012 04:27:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ri0ei-00015q-EQ
	for grep-commit@gnu.org; Tue, 03 Jan 2012 04:27:44 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:57308)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ri0ei-00015m-Cx
	for grep-commit@gnu.org; Tue, 03 Jan 2012 04:27:40 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1Ri0eh-0007iR-W5
	for grep-commit@gnu.org; Tue, 03 Jan 2012 09:27:40 +0000
Date: Tue, 03 Jan 2012 09:27:40 +0000
Message-Id: <E1Ri0eh-0007iR-W5@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-42-g082f0d1
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a00ff6423cab863c05f18cbac38abc51afe9d657
X-Git-Newrev: 082f0d1a771a2febcc14ffce13f44ed7c4553ad4
From: Jim Meyering <jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 09:27:45 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  082f0d1a771a2febcc14ffce13f44ed7c4553ad4 (commit)
      from  a00ff6423cab863c05f18cbac38abc51afe9d657 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=082f0d1a771a2febcc14ffce13f44ed7c4553ad4


commit 082f0d1a771a2febcc14ffce13f44ed7c4553ad4
Author: Jim Meyering <meyering@redhat.com>
Date:   Tue Jan 3 10:25:37 2012 +0100

    build: avoid build failure with --enable-gcc-warnings and recent gcc
    
    * lib/colorize-posix.c: Disable -Wsuggest-attribute=const, to avoid
    warning about this empty init_colorize function.

diff --git a/lib/colorize-posix.c b/lib/colorize-posix.c
index 37bc640..116bbb2 100644
--- a/lib/colorize-posix.c
+++ b/lib/colorize-posix.c
@@ -16,6 +16,12 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+/* Without this pragma, gcc 4.7.0 20120102 suggests that the
+   init_colorize function might be candidate for attribute 'const'  */
+#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
 #include <config.h>
 
 #include "colorize.h"

-----------------------------------------------------------------------

Summary of changes:
 lib/colorize-posix.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 04:40:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri0qq-0006Tm-1m
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 04:40:12 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38877)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri0qk-0006Q9-54
	for grep-commit@gnu.org; Tue, 03 Jan 2012 04:40:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri0qe-0002wc-OR
	for grep-commit@gnu.org; Tue, 03 Jan 2012 04:40:06 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:57664)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri0qe-0002wS-Mm
	for grep-commit@gnu.org; Tue, 03 Jan 2012 04:40:00 -0500
Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bonzini@gnu.org>) id 1Ri0qd-0001XS-TU
	for grep-commit@gnu.org; Tue, 03 Jan 2012 09:40:00 +0000
Date: Tue, 03 Jan 2012 09:39:59 +0000
Message-Id: <E1Ri0qd-0001XS-TU@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-48-g9f9829f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 082f0d1a771a2febcc14ffce13f44ed7c4553ad4
X-Git-Newrev: 9f9829ffae8e4b9bd3370154209ae9c04b4c5208
From: Paolo Bonzini <bonzini@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 09:40:10 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  9f9829ffae8e4b9bd3370154209ae9c04b4c5208 (commit)
       via  d4cc62b45e115aa72db69a06451afed9bd69a64d (commit)
       via  afa0155946715cddc921cc5556bff1ca2100507a (commit)
       via  f5e2cedf32554e6b4fd13a2d3ae410afd1065d88 (commit)
       via  74232e7b30467c32476efd2336207e6c5ee5aece (commit)
       via  a9fa4dcd5dc1bb7b7aff5454ce9b9bb7e4166fc4 (commit)
      from  082f0d1a771a2febcc14ffce13f44ed7c4553ad4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=9f9829ffae8e4b9bd3370154209ae9c04b4c5208


commit 9f9829ffae8e4b9bd3370154209ae9c04b4c5208
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:58:37 2011 +0200

    dfa: remove dead assignment
    
    * src/dfa.c (transit_state): transit_state_consume_1char will clear follows,
    do not do this ourselves.

diff --git a/src/dfa.c b/src/dfa.c
index 178ee96..dc94414 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3140,7 +3140,6 @@ transit_state (struct dfa *d, int s, unsigned char const **pp)
 
   while (*pp - p1 < maxlen)
     {
-      follows.nelem = 0;
       transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows);
 
       for (i = 0; i < nelem ; i++)

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=d4cc62b45e115aa72db69a06451afed9bd69a64d


commit 9f9829ffae8e4b9bd3370154209ae9c04b4c5208
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:58:37 2011 +0200

    dfa: remove dead assignment
    
    * src/dfa.c (transit_state): transit_state_consume_1char will clear follows,
    do not do this ourselves.

diff --git a/src/dfa.c b/src/dfa.c
index 178ee96..dc94414 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3140,7 +3140,6 @@ transit_state (struct dfa *d, int s, unsigned char const **pp)
 
   while (*pp - p1 < maxlen)
     {
-      follows.nelem = 0;
       transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows);
 
       for (i = 0; i < nelem ; i++)

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=afa0155946715cddc921cc5556bff1ca2100507a


commit 9f9829ffae8e4b9bd3370154209ae9c04b4c5208
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:58:37 2011 +0200

    dfa: remove dead assignment
    
    * src/dfa.c (transit_state): transit_state_consume_1char will clear follows,
    do not do this ourselves.

diff --git a/src/dfa.c b/src/dfa.c
index 178ee96..dc94414 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3140,7 +3140,6 @@ transit_state (struct dfa *d, int s, unsigned char const **pp)
 
   while (*pp - p1 < maxlen)
     {
-      follows.nelem = 0;
       transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows);
 
       for (i = 0; i < nelem ; i++)

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=f5e2cedf32554e6b4fd13a2d3ae410afd1065d88


commit 9f9829ffae8e4b9bd3370154209ae9c04b4c5208
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:58:37 2011 +0200

    dfa: remove dead assignment
    
    * src/dfa.c (transit_state): transit_state_consume_1char will clear follows,
    do not do this ourselves.

diff --git a/src/dfa.c b/src/dfa.c
index 178ee96..dc94414 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3140,7 +3140,6 @@ transit_state (struct dfa *d, int s, unsigned char const **pp)
 
   while (*pp - p1 < maxlen)
     {
-      follows.nelem = 0;
       transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows);
 
       for (i = 0; i < nelem ; i++)

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=74232e7b30467c32476efd2336207e6c5ee5aece


commit 9f9829ffae8e4b9bd3370154209ae9c04b4c5208
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:58:37 2011 +0200

    dfa: remove dead assignment
    
    * src/dfa.c (transit_state): transit_state_consume_1char will clear follows,
    do not do this ourselves.

diff --git a/src/dfa.c b/src/dfa.c
index 178ee96..dc94414 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3140,7 +3140,6 @@ transit_state (struct dfa *d, int s, unsigned char const **pp)
 
   while (*pp - p1 < maxlen)
     {
-      follows.nelem = 0;
       transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows);
 
       for (i = 0; i < nelem ; i++)

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9fa4dcd5dc1bb7b7aff5454ce9b9bb7e4166fc4


commit 9f9829ffae8e4b9bd3370154209ae9c04b4c5208
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:58:37 2011 +0200

    dfa: remove dead assignment
    
    * src/dfa.c (transit_state): transit_state_consume_1char will clear follows,
    do not do this ourselves.

diff --git a/src/dfa.c b/src/dfa.c
index 178ee96..dc94414 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3140,7 +3140,6 @@ transit_state (struct dfa *d, int s, unsigned char const **pp)
 
   while (*pp - p1 < maxlen)
     {
-      follows.nelem = 0;
       transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows);
 
       for (i = 0; i < nelem ; i++)

-----------------------------------------------------------------------

Summary of changes:
 src/dfa.c |   71 +++++++++++++++++++++++++++++++------------------------------
 1 files changed, 36 insertions(+), 35 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 08:09:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri47Y-0000rP-Lf
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 08:09:40 -0500
Received: from eggs.gnu.org ([140.186.70.92]:53902)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri47V-0000rI-4L
	for grep-commit@gnu.org; Tue, 03 Jan 2012 08:09:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri47P-0000GY-Tq
	for grep-commit@gnu.org; Tue, 03 Jan 2012 08:09:37 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:37558)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri47P-0000GT-Qo
	for grep-commit@gnu.org; Tue, 03 Jan 2012 08:09:31 -0500
Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bonzini@gnu.org>) id 1Ri47P-0003TV-KP
	for grep-commit@gnu.org; Tue, 03 Jan 2012 13:09:31 +0000
Date: Tue, 03 Jan 2012 13:09:31 +0000
Message-Id: <E1Ri47P-0003TV-KP@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-51-g5036e6a
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 9f9829ffae8e4b9bd3370154209ae9c04b4c5208
X-Git-Newrev: 5036e6aedbe0dd4a3e9e0bcfcd2fd9ee88379244
From: Paolo Bonzini <bonzini@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 13:09:38 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  5036e6aedbe0dd4a3e9e0bcfcd2fd9ee88379244 (commit)
       via  988961a3e00bf51bd8a0bc3d1c9736cc88e07e5e (commit)
       via  3e13407d4cfcbac44a9a50a419a1d33ee2205788 (commit)
      from  9f9829ffae8e4b9bd3370154209ae9c04b4c5208 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=5036e6aedbe0dd4a3e9e0bcfcd2fd9ee88379244


commit 5036e6aedbe0dd4a3e9e0bcfcd2fd9ee88379244
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:07:44 2011 +0200

    dfa: automatically resize position_sets
    
    * src/dfa.c (insert, copy, merge): Resize arrays here.
    (dfaanalyze): Do not track number of allocated elements here.
    (dfastate): Allocate mbps with only one element.

diff --git a/src/dfa.c b/src/dfa.c
index dfc108a..1261994 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1827,6 +1827,7 @@ dfaparse (char const *s, size_t len, struct dfa *d)
 static void
 copy (position_set const *src, position_set *dst)
 {
+  REALLOC_IF_NECESSARY(dst->elems, dst->alloc, src->nelem);
   memcpy(dst->elems, src->elems, sizeof(dst->elems[0]) * src->nelem);
   dst->nelem = src->nelem;
 }
@@ -1848,6 +1849,7 @@ insert (position p, position_set *s)
 {
   int count = s->nelem;
   int lo = 0, hi = count;
+  int i;
   while (lo < hi)
     {
       int mid = ((unsigned) lo + (unsigned) hi) >> 1;
@@ -1858,15 +1860,16 @@ insert (position p, position_set *s)
     }
 
   if (lo < count && p.index == s->elems[lo].index)
-    s->elems[lo].constraint |= p.constraint;
-  else
     {
-      int i;
-      for (i = count; i > lo; i--)
-        s->elems[i] = s->elems[i - 1];
-      s->elems[lo] = p;
-      ++s->nelem;
+      s->elems[lo].constraint |= p.constraint;
+      return;
     }
+
+  REALLOC_IF_NECESSARY(s->elems, s->alloc, count + 1);
+  for (i = count; i > lo; i--)
+    s->elems[i] = s->elems[i - 1];
+  s->elems[lo] = p;
+  ++s->nelem;
 }
 
 /* Merge two sets of positions into a third.  The result is exactly as if
@@ -1876,6 +1879,7 @@ merge (position_set const *s1, position_set const *s2, position_set *m)
 {
   int i = 0, j = 0;
 
+  REALLOC_IF_NECESSARY(m->elems, m->alloc, s1->nelem + s2->nelem);
   m->nelem = 0;
   while (i < s1->nelem && j < s2->nelem)
     if (s1->elems[i].index > s2->elems[j].index)
@@ -2161,8 +2165,6 @@ dfaanalyze (struct dfa *d, int searchflag)
         for (j = 0; j < nlastpos[-1]; ++j)
           {
             merge(&tmp, &d->follows[pos[j].index], &merged);
-            REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems,
-                                 d->follows[pos[j].index].alloc, merged.nelem);
             copy(&merged, &d->follows[pos[j].index]);
           }
 
@@ -2181,8 +2183,6 @@ dfaanalyze (struct dfa *d, int searchflag)
         for (j = 0; j < nlastpos[-2]; ++j)
           {
             merge(&tmp, &d->follows[pos[j].index], &merged);
-            REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems,
-                                 d->follows[pos[j].index].alloc, merged.nelem);
             copy(&merged, &d->follows[pos[j].index]);
           }
 
@@ -2290,8 +2290,6 @@ dfaanalyze (struct dfa *d, int searchflag)
 #endif
         copy(&d->follows[i], &merged);
         epsclosure(&merged, d);
-        REALLOC_IF_NECESSARY(d->follows[i].elems, d->follows[i].alloc,
-			     merged.nelem);
         copy(&merged, &d->follows[i]);
       }
 
@@ -2409,7 +2407,7 @@ dfastate (int s, struct dfa *d, int trans[])
              must put it to d->states[s].mbps, which contains the positions
              which can match with a single character not a byte.  */
           if (d->states[s].mbps.nelem == 0)
-            alloc_position_set(&d->states[s].mbps, d->states[s].elems.nelem);
+            alloc_position_set(&d->states[s].mbps, 1);
           insert(pos, &(d->states[s].mbps));
           continue;
         }

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=988961a3e00bf51bd8a0bc3d1c9736cc88e07e5e


commit 5036e6aedbe0dd4a3e9e0bcfcd2fd9ee88379244
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:07:44 2011 +0200

    dfa: automatically resize position_sets
    
    * src/dfa.c (insert, copy, merge): Resize arrays here.
    (dfaanalyze): Do not track number of allocated elements here.
    (dfastate): Allocate mbps with only one element.

diff --git a/src/dfa.c b/src/dfa.c
index dfc108a..1261994 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1827,6 +1827,7 @@ dfaparse (char const *s, size_t len, struct dfa *d)
 static void
 copy (position_set const *src, position_set *dst)
 {
+  REALLOC_IF_NECESSARY(dst->elems, dst->alloc, src->nelem);
   memcpy(dst->elems, src->elems, sizeof(dst->elems[0]) * src->nelem);
   dst->nelem = src->nelem;
 }
@@ -1848,6 +1849,7 @@ insert (position p, position_set *s)
 {
   int count = s->nelem;
   int lo = 0, hi = count;
+  int i;
   while (lo < hi)
     {
       int mid = ((unsigned) lo + (unsigned) hi) >> 1;
@@ -1858,15 +1860,16 @@ insert (position p, position_set *s)
     }
 
   if (lo < count && p.index == s->elems[lo].index)
-    s->elems[lo].constraint |= p.constraint;
-  else
     {
-      int i;
-      for (i = count; i > lo; i--)
-        s->elems[i] = s->elems[i - 1];
-      s->elems[lo] = p;
-      ++s->nelem;
+      s->elems[lo].constraint |= p.constraint;
+      return;
     }
+
+  REALLOC_IF_NECESSARY(s->elems, s->alloc, count + 1);
+  for (i = count; i > lo; i--)
+    s->elems[i] = s->elems[i - 1];
+  s->elems[lo] = p;
+  ++s->nelem;
 }
 
 /* Merge two sets of positions into a third.  The result is exactly as if
@@ -1876,6 +1879,7 @@ merge (position_set const *s1, position_set const *s2, position_set *m)
 {
   int i = 0, j = 0;
 
+  REALLOC_IF_NECESSARY(m->elems, m->alloc, s1->nelem + s2->nelem);
   m->nelem = 0;
   while (i < s1->nelem && j < s2->nelem)
     if (s1->elems[i].index > s2->elems[j].index)
@@ -2161,8 +2165,6 @@ dfaanalyze (struct dfa *d, int searchflag)
         for (j = 0; j < nlastpos[-1]; ++j)
           {
             merge(&tmp, &d->follows[pos[j].index], &merged);
-            REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems,
-                                 d->follows[pos[j].index].alloc, merged.nelem);
             copy(&merged, &d->follows[pos[j].index]);
           }
 
@@ -2181,8 +2183,6 @@ dfaanalyze (struct dfa *d, int searchflag)
         for (j = 0; j < nlastpos[-2]; ++j)
           {
             merge(&tmp, &d->follows[pos[j].index], &merged);
-            REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems,
-                                 d->follows[pos[j].index].alloc, merged.nelem);
             copy(&merged, &d->follows[pos[j].index]);
           }
 
@@ -2290,8 +2290,6 @@ dfaanalyze (struct dfa *d, int searchflag)
 #endif
         copy(&d->follows[i], &merged);
         epsclosure(&merged, d);
-        REALLOC_IF_NECESSARY(d->follows[i].elems, d->follows[i].alloc,
-			     merged.nelem);
         copy(&merged, &d->follows[i]);
       }
 
@@ -2409,7 +2407,7 @@ dfastate (int s, struct dfa *d, int trans[])
              must put it to d->states[s].mbps, which contains the positions
              which can match with a single character not a byte.  */
           if (d->states[s].mbps.nelem == 0)
-            alloc_position_set(&d->states[s].mbps, d->states[s].elems.nelem);
+            alloc_position_set(&d->states[s].mbps, 1);
           insert(pos, &(d->states[s].mbps));
           continue;
         }

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=3e13407d4cfcbac44a9a50a419a1d33ee2205788


commit 5036e6aedbe0dd4a3e9e0bcfcd2fd9ee88379244
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jun 28 09:07:44 2011 +0200

    dfa: automatically resize position_sets
    
    * src/dfa.c (insert, copy, merge): Resize arrays here.
    (dfaanalyze): Do not track number of allocated elements here.
    (dfastate): Allocate mbps with only one element.

diff --git a/src/dfa.c b/src/dfa.c
index dfc108a..1261994 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1827,6 +1827,7 @@ dfaparse (char const *s, size_t len, struct dfa *d)
 static void
 copy (position_set const *src, position_set *dst)
 {
+  REALLOC_IF_NECESSARY(dst->elems, dst->alloc, src->nelem);
   memcpy(dst->elems, src->elems, sizeof(dst->elems[0]) * src->nelem);
   dst->nelem = src->nelem;
 }
@@ -1848,6 +1849,7 @@ insert (position p, position_set *s)
 {
   int count = s->nelem;
   int lo = 0, hi = count;
+  int i;
   while (lo < hi)
     {
       int mid = ((unsigned) lo + (unsigned) hi) >> 1;
@@ -1858,15 +1860,16 @@ insert (position p, position_set *s)
     }
 
   if (lo < count && p.index == s->elems[lo].index)
-    s->elems[lo].constraint |= p.constraint;
-  else
     {
-      int i;
-      for (i = count; i > lo; i--)
-        s->elems[i] = s->elems[i - 1];
-      s->elems[lo] = p;
-      ++s->nelem;
+      s->elems[lo].constraint |= p.constraint;
+      return;
     }
+
+  REALLOC_IF_NECESSARY(s->elems, s->alloc, count + 1);
+  for (i = count; i > lo; i--)
+    s->elems[i] = s->elems[i - 1];
+  s->elems[lo] = p;
+  ++s->nelem;
 }
 
 /* Merge two sets of positions into a third.  The result is exactly as if
@@ -1876,6 +1879,7 @@ merge (position_set const *s1, position_set const *s2, position_set *m)
 {
   int i = 0, j = 0;
 
+  REALLOC_IF_NECESSARY(m->elems, m->alloc, s1->nelem + s2->nelem);
   m->nelem = 0;
   while (i < s1->nelem && j < s2->nelem)
     if (s1->elems[i].index > s2->elems[j].index)
@@ -2161,8 +2165,6 @@ dfaanalyze (struct dfa *d, int searchflag)
         for (j = 0; j < nlastpos[-1]; ++j)
           {
             merge(&tmp, &d->follows[pos[j].index], &merged);
-            REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems,
-                                 d->follows[pos[j].index].alloc, merged.nelem);
             copy(&merged, &d->follows[pos[j].index]);
           }
 
@@ -2181,8 +2183,6 @@ dfaanalyze (struct dfa *d, int searchflag)
         for (j = 0; j < nlastpos[-2]; ++j)
           {
             merge(&tmp, &d->follows[pos[j].index], &merged);
-            REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems,
-                                 d->follows[pos[j].index].alloc, merged.nelem);
             copy(&merged, &d->follows[pos[j].index]);
           }
 
@@ -2290,8 +2290,6 @@ dfaanalyze (struct dfa *d, int searchflag)
 #endif
         copy(&d->follows[i], &merged);
         epsclosure(&merged, d);
-        REALLOC_IF_NECESSARY(d->follows[i].elems, d->follows[i].alloc,
-			     merged.nelem);
         copy(&merged, &d->follows[i]);
       }
 
@@ -2409,7 +2407,7 @@ dfastate (int s, struct dfa *d, int trans[])
              must put it to d->states[s].mbps, which contains the positions
              which can match with a single character not a byte.  */
           if (d->states[s].mbps.nelem == 0)
-            alloc_position_set(&d->states[s].mbps, d->states[s].elems.nelem);
+            alloc_position_set(&d->states[s].mbps, 1);
           insert(pos, &(d->states[s].mbps));
           continue;
         }

-----------------------------------------------------------------------

Summary of changes:
 src/dfa.c |   35 +++++++++++++++--------------------
 1 files changed, 15 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 08:13:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri4BZ-0002HW-Iu
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 08:13:49 -0500
Received: from eggs.gnu.org ([140.186.70.92]:54715)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri4BT-0002HQ-4b
	for grep-commit@gnu.org; Tue, 03 Jan 2012 08:13:48 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri4BP-0000nM-6w
	for grep-commit@gnu.org; Tue, 03 Jan 2012 08:13:43 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:46527)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri4BP-0000nI-3r
	for grep-commit@gnu.org; Tue, 03 Jan 2012 08:13:39 -0500
Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bonzini@gnu.org>) id 1Ri4BO-0005G9-VR
	for grep-commit@gnu.org; Tue, 03 Jan 2012 13:13:39 +0000
Date: Tue, 03 Jan 2012 13:13:38 +0000
Message-Id: <E1Ri4BO-0005G9-VR@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-52-g97eca79
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5036e6aedbe0dd4a3e9e0bcfcd2fd9ee88379244
X-Git-Newrev: 97eca7990cfd661e51bb3337aef3105065b227c5
From: Paolo Bonzini <bonzini@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 13:13:48 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  97eca7990cfd661e51bb3337aef3105065b227c5 (commit)
      from  5036e6aedbe0dd4a3e9e0bcfcd2fd9ee88379244 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=97eca7990cfd661e51bb3337aef3105065b227c5


commit 97eca7990cfd661e51bb3337aef3105065b227c5
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jan 3 14:12:39 2012 +0100

    dfa: fix rebase conflict
    
    * src/dfa.c (dfaanalyze): Fix reference to nalloc.

diff --git a/src/dfa.c b/src/dfa.c
index 1261994..2f751c6 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -2242,7 +2242,7 @@ dfaanalyze (struct dfa *d, int searchflag)
         firstpos->constraint = lastpos->constraint = NO_CONSTRAINT;
 
         /* Allocate the follow set for this position. */
-        alloc_position_set(&d->follows[i], nalloc[i]);
+        alloc_position_set(&d->follows[i], 1);
         break;
       }
 #ifdef DEBUG

-----------------------------------------------------------------------

Summary of changes:
 src/dfa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 11:04:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri6qz-0006bh-Iu
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 11:04:45 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57204)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri6qs-0006a2-71
	for grep-commit@gnu.org; Tue, 03 Jan 2012 11:04:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri6qm-0003xI-9R
	for grep-commit@gnu.org; Tue, 03 Jan 2012 11:04:38 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53754)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bonzini@gnu.org>) id 1Ri6qm-0003xE-7t
	for grep-commit@gnu.org; Tue, 03 Jan 2012 11:04:32 -0500
Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bonzini@gnu.org>) id 1Ri6qm-0000KI-KT
	for grep-commit@gnu.org; Tue, 03 Jan 2012 16:04:32 +0000
Date: Tue, 03 Jan 2012 16:04:32 +0000
Message-Id: <E1Ri6qm-0000KI-KT@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-53-g8ca7608
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 97eca7990cfd661e51bb3337aef3105065b227c5
X-Git-Newrev: 8ca76081a985a0dda3bddf8f172b794495efea33
From: Paolo Bonzini <bonzini@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 16:04:44 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  8ca76081a985a0dda3bddf8f172b794495efea33 (commit)
      from  97eca7990cfd661e51bb3337aef3105065b227c5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=8ca76081a985a0dda3bddf8f172b794495efea33


commit 8ca76081a985a0dda3bddf8f172b794495efea33
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Jan 3 10:56:31 2012 +0100

    dfa: fix incorrect comment
    
    * src/dfa.c (dfastate): Fix comment for newline.

diff --git a/src/dfa.c b/src/dfa.c
index 2f751c6..8dbadd5 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -2364,7 +2364,7 @@ dfastate (int s, struct dfa *d, int trans[])
   charclass leftovers;		/* Stuff in the label that didn't match. */
   int leftoversf;		/* True if leftovers is nonempty. */
   static charclass letters;	/* Set of characters considered letters. */
-  static charclass newline;	/* Set of characters that aren't newline. */
+  static charclass newline;	/* Set of characters that are newline. */
   position_set follows;		/* Union of the follows of some group. */
   position_set tmp;		/* Temporary space for merging sets. */
   int state;			/* New state. */

-----------------------------------------------------------------------

Summary of changes:
 src/dfa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 11:13:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri6zY-000332-2H
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 11:13:36 -0500
Received: from eggs.gnu.org ([140.186.70.92]:49143)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ri6zV-00031u-Tu
	for grep-commit@gnu.org; Tue, 03 Jan 2012 11:13:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ri6zU-00057D-HH
	for grep-commit@gnu.org; Tue, 03 Jan 2012 11:13:33 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47279)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ri6zU-000579-EX
	for grep-commit@gnu.org; Tue, 03 Jan 2012 11:13:32 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1Ri6zU-0002BK-ST
	for grep-commit@gnu.org; Tue, 03 Jan 2012 16:13:32 +0000
Date: Tue, 03 Jan 2012 16:13:32 +0000
Message-Id: <E1Ri6zU-0002BK-ST@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-54-g39f04f2
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8ca76081a985a0dda3bddf8f172b794495efea33
X-Git-Newrev: 39f04f2768cd6c2a21631349a17597a9fc4de418
From: Jim Meyering <jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 16:13:34 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  39f04f2768cd6c2a21631349a17597a9fc4de418 (commit)
      from  8ca76081a985a0dda3bddf8f172b794495efea33 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=39f04f2768cd6c2a21631349a17597a9fc4de418


commit 39f04f2768cd6c2a21631349a17597a9fc4de418
Author: Jim Meyering <meyering@redhat.com>
Date:   Tue Jan 3 12:01:51 2012 +0100

    deprecate the --mmap option
    
    * src/main.c (main): Deprecate the --mmap option: issue a warning
    when it is used.
    (usage): Change description.
    * doc/grep.texi (Other Options): Document the new behavior.
    * NEWS (Changes in behavior): Mention it.

diff --git a/NEWS b/NEWS
index 9efb82a..0fd6039 100644
--- a/NEWS
+++ b/NEWS
@@ -40,6 +40,12 @@ GNU grep NEWS                                    -*- outline -*-
 
   grep now supports color highlighting of matches on MS-Windows.
 
+** Changes in behavior
+
+  Use of the --mmap option now elicits a warning.  It has been a no-op
+  since March of 2010.
+
+
 * Noteworthy changes in release 2.10 (2011-11-16) [stable]
 
 ** Bug fixes
diff --git a/doc/grep.texi b/doc/grep.texi
index 537237f..5d779c1 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -689,7 +689,8 @@ This can cause a performance penalty.
 @item --mmap
 @opindex --mmap
 @cindex memory mapped input
-This option is ignored for backwards compatibility.  It used to read
+This option is deprecated and now elicits a warning, but is otherwise a no-op.
+It used to make @command{grep} read
 input with the @code{mmap} system call, instead of the default @code{read}
 system call.  On modern systems, @code{mmap} would rarely if ever yield
 better performance.
diff --git a/src/main.c b/src/main.c
index a768d36..a738050 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1465,7 +1465,7 @@ Miscellaneous:\n\
   -v, --invert-match        select non-matching lines\n\
   -V, --version             print version information and exit\n\
       --help                display this help and exit\n\
-      --mmap                ignored for backwards compatibility\n"));
+      --mmap                deprecated no-op; evokes a warning\n"));
       printf (_("\
 \n\
 Output control:\n\
@@ -2121,6 +2121,9 @@ main (int argc, char **argv)
         break;
 
       case MMAP_OPTION:
+        error (0, 0, _("the --mmap option has been a no-op since 2010"));
+        break;
+
       case 0:
         /* long options */
         break;

-----------------------------------------------------------------------

Summary of changes:
 NEWS          |    6 ++++++
 doc/grep.texi |    3 ++-
 src/main.c    |    5 ++++-
 3 files changed, 12 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jan 03 16:10:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiBdK-0005Zf-HV
	for mharc-grep-commit@gnu.org; Tue, 03 Jan 2012 16:10:58 -0500
Received: from eggs.gnu.org ([140.186.70.92]:51937)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RiBdH-0005ZX-TZ
	for grep-commit@gnu.org; Tue, 03 Jan 2012 16:10:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RiBdG-00053N-Ky
	for grep-commit@gnu.org; Tue, 03 Jan 2012 16:10:55 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47971)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RiBdG-00053J-JO
	for grep-commit@gnu.org; Tue, 03 Jan 2012 16:10:54 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1RiBdG-0006eD-9E
	for grep-commit@gnu.org; Tue, 03 Jan 2012 21:10:54 +0000
Date: Tue, 03 Jan 2012 21:10:54 +0000
Message-Id: <E1RiBdG-0006eD-9E@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-55-gaab59eb
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 39f04f2768cd6c2a21631349a17597a9fc4de418
X-Git-Newrev: aab59eb87d7fade0ca8a0f444f222284eb28694f
From: Jim Meyering <jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 21:10:57 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  aab59eb87d7fade0ca8a0f444f222284eb28694f (commit)
      from  39f04f2768cd6c2a21631349a17597a9fc4de418 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=aab59eb87d7fade0ca8a0f444f222284eb28694f


commit aab59eb87d7fade0ca8a0f444f222284eb28694f
Author: Jim Meyering <meyering@redhat.com>
Date:   Tue Jan 3 22:10:32 2012 +0100

    tests: adjust test to match code, now that --mmap writes to stderr
    
    * tests/ignore-mmap: Separate stdout and stderr; test both.

diff --git a/tests/ignore-mmap b/tests/ignore-mmap
index a6d30ca..8c40868 100755
--- a/tests/ignore-mmap
+++ b/tests/ignore-mmap
@@ -5,12 +5,16 @@
 echo a > in || framework_failure_
 fail=0
 
-grep --mmap a in > out 2>&1 || fail=1
+echo grep: the --mmap option has been a no-op since 2010 > exp
+
+grep --mmap a in > out 2> err || fail=1
 compare out in || fail=1
+compare exp err || fail=1
 
-grep --mmap b in > out 2>&1
+grep --mmap b in > out 2>err
 # Expect no match and no output.
 test $? = 1 || fail=1
 compare /dev/null out || fail=1
+compare exp err || fail=1
 
 Exit $fail

-----------------------------------------------------------------------

Summary of changes:
 tests/ignore-mmap |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Wed Jan 04 12:20:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiUVh-0001hB-1g
	for mharc-grep-commit@gnu.org; Wed, 04 Jan 2012 12:20:21 -0500
Received: from eggs.gnu.org ([140.186.70.92]:56148)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RiUVZ-0001MD-0I
	for grep-commit@gnu.org; Wed, 04 Jan 2012 12:20:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RiUVW-0007Po-EE
	for grep-commit@gnu.org; Wed, 04 Jan 2012 12:20:12 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:57900)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RiUVW-0007Pk-9S
	for grep-commit@gnu.org; Wed, 04 Jan 2012 12:20:10 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1RiUVV-0000fO-0Q
	for grep-commit@gnu.org; Wed, 04 Jan 2012 17:20:09 +0000
Date: Wed, 04 Jan 2012 17:20:09 +0000
Message-Id: <E1RiUVV-0000fO-0Q@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-56-gd1d7245
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: aab59eb87d7fade0ca8a0f444f222284eb28694f
X-Git-Newrev: d1d7245219bc56e6a4f25c18d6f8f4b4b9bb42d6
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Jan 2012 17:20:19 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  d1d7245219bc56e6a4f25c18d6f8f4b4b9bb42d6 (commit)
      from  aab59eb87d7fade0ca8a0f444f222284eb28694f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=d1d7245219bc56e6a4f25c18d6f8f4b4b9bb42d6


commit d1d7245219bc56e6a4f25c18d6f8f4b4b9bb42d6
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Tue Jan 3 14:42:28 2012 -0800

    grep: with no args, search "." only if command-line -r
    
    * NEWS: Document this.
    * doc/grep.texi (Environment Variables, grep Programs): Likewise.
    * src/main.c (usage): Likewise.
    (main): Implement this.
    (prepend_default_options): Return a count of prepended options.
    * tests/r-dot: Test the above.

diff --git a/NEWS b/NEWS
index 0fd6039..b36cab7 100644
--- a/NEWS
+++ b/NEWS
@@ -35,8 +35,10 @@ GNU grep NEWS                                    -*- outline -*-
 
 ** New features
 
-  If no file operand is given, grep -r now searches the working directory.
-  Formerly it ignored the -r and searched standard input nonrecursively.
+  If no file operand is given, and a command-line -r or equivalent
+  option is given, grep now searches the working directory.  Formerly
+  grep ignored the -r and searched standard input nonrecursively.
+  An -r found in GREP_OPTIONS does not have this new effect.
 
   grep now supports color highlighting of matches on MS-Windows.
 
diff --git a/doc/grep.texi b/doc/grep.texi
index 5d779c1..78efb18 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -801,6 +801,13 @@ whitespace.
 A backslash escapes the next character, so it can be used to
 specify an option containing whitespace or a backslash.
 
+The @code{GREP_OPTIONS} value does not affect whether @command{grep}
+without file operands searches standard input or the working
+directory; that is affected only by command-line options.  For
+example, the command @samp{grep PAT} searches standard input and the
+command @samp{grep -r PAT} searches the working directory, regardless
+of whether @code{GREP_OPTIONS} contains @option{-r}.
+
 @item GREP_COLOR
 @vindex GREP_COLOR @r{environment variable}
 @cindex highlight markers
@@ -1014,9 +1021,9 @@ instead of strict equality with@ 2.
 for lines containing a match to the given pattern.
 By default, @command{grep} prints the matching lines.
 A file named @file{-} stands for standard input.
-If no input is specified, a recursive @command{grep}
-searches the working directory @file{.}, and a
-nonrecursive @command{grep} searches standard input.
+If no input is specified, @command{grep} searches the working
+directory @file{.} if given a command-line option specifying
+recursion; otherwise, @command{grep} searches standard input.
 There are four major variants of @command{grep},
 controlled by the following options.
 
diff --git a/src/main.c b/src/main.c
index a738050..51135ad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1522,8 +1522,8 @@ Context control:\n\
 \n"));
       fputs (_(after_options), stdout);
       printf (_("\
-When FILE is -, read standard input.  With no FILE, read '.' if recursive,\n\
-standard input if not.  If fewer than two FILEs are given, assume -h.\n\
+When FILE is -, read standard input.  With no FILE, read . if a command-line\n\
+-r is given, - otherwise.  If fewer than two FILEs are given, assume -h.\n\
 Exit status is 0 if any line is selected, 1 otherwise;\n\
 if any error occurs and -q is not given, the exit status is 2.\n"));
       printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT);
@@ -1646,8 +1646,8 @@ prepend_args (char const *options, char *buf, char **argv)
 
 /* Prepend the whitespace-separated options in OPTIONS to the argument
    vector of a main program with argument count *PARGC and argument
-   vector *PARGV.  */
-static void
+   vector *PARGV.  Return the number of options prepended.  */
+static int
 prepend_default_options (char const *options, int *pargc, char ***pargv)
 {
   if (options && *options)
@@ -1663,7 +1663,10 @@ prepend_default_options (char const *options, int *pargc, char ***pargv)
       pp += prepend_args (options, buf, pp);
       while ((*pp++ = *argv++))
         continue;
+      return prepended;
     }
+
+  return 0;
 }
 
 /* Get the next non-digit option from ARGC and ARGV.
@@ -1807,7 +1810,8 @@ main (int argc, char **argv)
   char *keys;
   size_t keycc, oldcc, keyalloc;
   int with_filenames;
-  int opt, cc, status;
+  int opt, cc, status, prepended;
+  int prev_optind, last_recursive;
   int default_context;
   FILE *fp;
 
@@ -1843,10 +1847,12 @@ main (int argc, char **argv)
   exit_failure = EXIT_TROUBLE;
   atexit (close_stdout);
 
-  prepend_default_options (getenv ("GREP_OPTIONS"), &argc, &argv);
+  last_recursive = 0;
+  prepended = prepend_default_options (getenv ("GREP_OPTIONS"), &argc, &argv);
   setmatcher (NULL);
 
-  while ((opt = get_nondigit_option (argc, argv, &default_context)) != -1)
+  while (prev_optind = optind,
+         (opt = get_nondigit_option (argc, argv, &default_context)) != -1)
     switch (opt)
       {
       case 'A':
@@ -1936,6 +1942,8 @@ main (int argc, char **argv)
       case 'd':
         directories = XARGMATCH ("--directories", optarg,
                                  directories_args, directories_types);
+        if (directories == RECURSE_DIRECTORIES)
+          last_recursive = prev_optind;
         break;
 
       case 'e':
@@ -2024,6 +2032,7 @@ main (int argc, char **argv)
       case 'R':
       case 'r':
         directories = RECURSE_DIRECTORIES;
+        last_recursive = prev_optind;
         break;
 
       case 's':
@@ -2250,7 +2259,7 @@ main (int argc, char **argv)
         }
       while (++optind < argc);
     }
-  else if (directories == RECURSE_DIRECTORIES)
+  else if (directories == RECURSE_DIRECTORIES && prepended < last_recursive)
     {
       status = 1;
       if (stat (".", &stats_base.stat) == 0)
diff --git a/tests/r-dot b/tests/r-dot
index 73e593c..a1d5c0a 100755
--- a/tests/r-dot
+++ b/tests/r-dot
@@ -11,4 +11,11 @@ echo a:aaa > exp || framework_failure_
 (cd dir && grep -r aaa) > out || fail=1
 compare exp out || fail=1
 
+(cd dir && grep -r aaa < a) > out || fail=1
+compare exp out || fail=1
+
+echo aaa > exp || framework_failure_
+(cd dir && GREP_OPTIONS=-r grep aaa < a) > out || fail=1
+compare exp out || fail=1
+
 Exit $fail

-----------------------------------------------------------------------

Summary of changes:
 NEWS          |    6 ++++--
 doc/grep.texi |   13 ++++++++++---
 src/main.c    |   25 +++++++++++++++++--------
 tests/r-dot   |    7 +++++++
 4 files changed, 38 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Wed Jan 04 12:50:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiUys-0004yq-3j
	for mharc-grep-commit@gnu.org; Wed, 04 Jan 2012 12:50:30 -0500
Received: from eggs.gnu.org ([140.186.70.92]:49099)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RiUyq-0004yR-2d
	for grep-commit@gnu.org; Wed, 04 Jan 2012 12:50:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RiUyo-000403-N0
	for grep-commit@gnu.org; Wed, 04 Jan 2012 12:50:28 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:34214)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RiUyo-0003zy-Io
	for grep-commit@gnu.org; Wed, 04 Jan 2012 12:50:26 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1RiUyo-0003Tf-3H
	for grep-commit@gnu.org; Wed, 04 Jan 2012 17:50:26 +0000
Date: Wed, 04 Jan 2012 17:50:26 +0000
Message-Id: <E1RiUyo-0003Tf-3H@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-57-g0dc6ab4
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d1d7245219bc56e6a4f25c18d6f8f4b4b9bb42d6
X-Git-Newrev: 0dc6ab4153de00e530669e2b7d47b8c1968e1fa1
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Jan 2012 17:50:29 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  0dc6ab4153de00e530669e2b7d47b8c1968e1fa1 (commit)
      from  d1d7245219bc56e6a4f25c18d6f8f4b4b9bb42d6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=0dc6ab4153de00e530669e2b7d47b8c1968e1fa1


commit 0dc6ab4153de00e530669e2b7d47b8c1968e1fa1
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Jan 4 09:49:50 2012 -0800

    doc: document empty pattern better
    
    * doc/grep.texi (Top, Fundamental Structure, Usage):
    Explain how grep deals with the empty pattern.
    Problem spotted by Bernhard Voelker in
    <http://lists.gnu.org/archive/html/bug-grep/2012-01/msg00050.html>.

diff --git a/doc/grep.texi b/doc/grep.texi
index 78efb18..de73d7f 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -50,7 +50,7 @@ Texts.  A copy of the license is included in the section entitled
 @node Top
 @top grep
 
-@command{grep} prints lines that match a pattern.
+@command{grep} prints lines that contain a match for a pattern.
 
 This manual is for version @value{VERSION} of GNU Grep.
 
@@ -1170,6 +1170,7 @@ The preceding item is matched at least @var{n} times, but not more than
 
 @end table
 
+The empty regular expression matches the empty string.
 Two regular expressions may be concatenated;
 the resulting regular expression
 matches any string formed by concatenating two substrings
@@ -1629,6 +1630,19 @@ grep 'paul' /etc/motd | grep 'franc,ois'
 finds all lines that contain both @samp{paul} and @samp{franc,ois}.
 
 @item
+Why does the empty pattern match every input line?
+
+The @command{grep} command searches for lines that contain strings
+that match a pattern.  Every line contains the empty string, so an
+empty pattern causes @command{grep} to find a match on each line.  It
+is not the only such pattern: @samp{^}, @samp{$}, @samp{.*}, and many
+other patterns cause @command{grep} to match every line.
+
+To match empty lines, use the pattern @samp{^$}.  To match blank
+lines, use the pattern @samp{^[[:blank:]]*$}.  To match no lines at
+all, use the command @samp{grep -f /dev/null}.
+
+@item
 How can I search in both standard input and in files?
 
 Use the special file name @samp{-}:

-----------------------------------------------------------------------

Summary of changes:
 doc/grep.texi |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Thu Jan 12 15:50:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlRbd-0000qP-MQ
	for mharc-grep-commit@gnu.org; Thu, 12 Jan 2012 15:50:41 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58879)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RlRbb-0000po-Bo
	for grep-commit@gnu.org; Thu, 12 Jan 2012 15:50:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RlRbZ-0007XW-N6
	for grep-commit@gnu.org; Thu, 12 Jan 2012 15:50:39 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:46803)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RlRbZ-0007XS-Ld
	for grep-commit@gnu.org; Thu, 12 Jan 2012 15:50:37 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1RlRbY-0000Pg-8t
	for grep-commit@gnu.org; Thu, 12 Jan 2012 20:50:37 +0000
Date: Thu, 12 Jan 2012 20:50:36 +0000
Message-Id: <E1RlRbY-0000Pg-8t@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-58-g1df89e8
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0dc6ab4153de00e530669e2b7d47b8c1968e1fa1
X-Git-Newrev: 1df89e8d426ab5999f5f2936ed3eb1ce137c8a44
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Jan 2012 20:50:40 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  1df89e8d426ab5999f5f2936ed3eb1ce137c8a44 (commit)
      from  0dc6ab4153de00e530669e2b7d47b8c1968e1fa1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=1df89e8d426ab5999f5f2936ed3eb1ce137c8a44


commit 1df89e8d426ab5999f5f2936ed3eb1ce137c8a44
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Thu Jan 12 12:50:04 2012 -0800

    dfa: non-glibc word-constituent unibyte fix
    
    * src/dfa.c (is_valid_unibyte_character): Fix typo that caused
    this to incorrectly return 0 on unibyte non-glibc systems.
    Problem reported by Aharon Robbins in
    <http://lists.gnu.org/archive/html/bug-grep/2012-01/msg00084.html>.

diff --git a/src/dfa.c b/src/dfa.c
index 8dbadd5..6ab0ab4 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1079,7 +1079,7 @@ parse_bracket_exp (void)
 #ifdef __GLIBC__
 # define is_valid_unibyte_character(c) 1
 #else
-# define is_valid_unibyte_character(c) (MBS_SUPPORT && btowc (c) != WEOF)
+# define is_valid_unibyte_character(c) (! (MBS_SUPPORT && btowc (c) == WEOF))
 #endif
 
 /* Return non-zero if C is a `word-constituent' byte; zero otherwise.  */

-----------------------------------------------------------------------

Summary of changes:
 src/dfa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sun Jan 22 04:09:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RotQ7-0000au-4t
	for mharc-grep-commit@gnu.org; Sun, 22 Jan 2012 04:09:03 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35220)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RotQ4-0000ao-Md
	for grep-commit@gnu.org; Sun, 22 Jan 2012 04:09:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RotQ2-0006lM-RC
	for grep-commit@gnu.org; Sun, 22 Jan 2012 04:09:00 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:38756)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RotQ2-0006lI-OH
	for grep-commit@gnu.org; Sun, 22 Jan 2012 04:08:58 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1RotQ2-0005zk-3H
	for grep-commit@gnu.org; Sun, 22 Jan 2012 09:08:58 +0000
Date: Sun, 22 Jan 2012 09:08:58 +0000
Message-Id: <E1RotQ2-0005zk-3H@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-63-g0943cac
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1df89e8d426ab5999f5f2936ed3eb1ce137c8a44
X-Git-Newrev: 0943cac756268c9476db0bc95151207755f469f5
From: Paul Eggert <eggert@cs.ucla.edu>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 09:09:02 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  0943cac756268c9476db0bc95151207755f469f5 (commit)
       via  66978b84caa9156238c03da95ff2609f053e1e03 (commit)
       via  614d36845c3fe2312028b585c8b68a9ecfeccef8 (commit)
       via  7c24e1059e43ab81999b4a9f6cb6ceef16d7b783 (commit)
       via  6125817c9e0d4bdc4d692d58e40ae71b4bc9069f (commit)
      from  1df89e8d426ab5999f5f2936ed3eb1ce137c8a44 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=0943cac756268c9476db0bc95151207755f469f5


commit 0943cac756268c9476db0bc95151207755f469f5
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sun Jan 22 01:07:36 2012 -0800

    doc: document recent diagnostics-related changes
    
    * NEWS: Document changes re diagnostics related to GREP_COLORS,
    directory loops, -s, "write error".

diff --git a/NEWS b/NEWS
index b36cab7..1d687ec 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,15 @@ GNU grep NEWS                                    -*- outline -*-
   read error on most systems; formerly, it ignored the error.
   [bug introduced in grep-2.5]
 
+  grep now exits with status 2 if a directory loop is found,
+  instead of possibly exiting with status 0 or 1.
+  [bug introduced in grep-2.3]
+
+  The -s option now suppresses certain input error diagnostics that it
+  formerly failed to suppress.  These include errors when closing the
+  input, when lseeking the input, and when the input is also the output.
+  [bug introduced in grep-2.4]
+
   On POSIX systems, commands like "grep PAT < FILE >> FILE"
   now report an error instead of looping.
   [bug present since "the beginning"]
@@ -47,6 +56,13 @@ GNU grep NEWS                                    -*- outline -*-
   Use of the --mmap option now elicits a warning.  It has been a no-op
   since March of 2010.
 
+  grep no longer diagnoses write errors repeatedly; it exits after
+  diagnosing the first write error.  This is better behavior when
+  writing to a dangling pipe.
+
+  Syntax errors in GREP_COLORS are now ignored, instead of sometimes
+  eliciting warnings.  This is more consistent with programs that
+  (e.g.) ignore errors in termcap entries.
 
 * Noteworthy changes in release 2.10 (2011-11-16) [stable]
 

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=66978b84caa9156238c03da95ff2609f053e1e03


commit 0943cac756268c9476db0bc95151207755f469f5
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sun Jan 22 01:07:36 2012 -0800

    doc: document recent diagnostics-related changes
    
    * NEWS: Document changes re diagnostics related to GREP_COLORS,
    directory loops, -s, "write error".

diff --git a/NEWS b/NEWS
index b36cab7..1d687ec 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,15 @@ GNU grep NEWS                                    -*- outline -*-
   read error on most systems; formerly, it ignored the error.
   [bug introduced in grep-2.5]
 
+  grep now exits with status 2 if a directory loop is found,
+  instead of possibly exiting with status 0 or 1.
+  [bug introduced in grep-2.3]
+
+  The -s option now suppresses certain input error diagnostics that it
+  formerly failed to suppress.  These include errors when closing the
+  input, when lseeking the input, and when the input is also the output.
+  [bug introduced in grep-2.4]
+
   On POSIX systems, commands like "grep PAT < FILE >> FILE"
   now report an error instead of looping.
   [bug present since "the beginning"]
@@ -47,6 +56,13 @@ GNU grep NEWS                                    -*- outline -*-
   Use of the --mmap option now elicits a warning.  It has been a no-op
   since March of 2010.
 
+  grep no longer diagnoses write errors repeatedly; it exits after
+  diagnosing the first write error.  This is better behavior when
+  writing to a dangling pipe.
+
+  Syntax errors in GREP_COLORS are now ignored, instead of sometimes
+  eliciting warnings.  This is more consistent with programs that
+  (e.g.) ignore errors in termcap entries.
 
 * Noteworthy changes in release 2.10 (2011-11-16) [stable]
 

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=614d36845c3fe2312028b585c8b68a9ecfeccef8


commit 0943cac756268c9476db0bc95151207755f469f5
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sun Jan 22 01:07:36 2012 -0800

    doc: document recent diagnostics-related changes
    
    * NEWS: Document changes re diagnostics related to GREP_COLORS,
    directory loops, -s, "write error".

diff --git a/NEWS b/NEWS
index b36cab7..1d687ec 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,15 @@ GNU grep NEWS                                    -*- outline -*-
   read error on most systems; formerly, it ignored the error.
   [bug introduced in grep-2.5]
 
+  grep now exits with status 2 if a directory loop is found,
+  instead of possibly exiting with status 0 or 1.
+  [bug introduced in grep-2.3]
+
+  The -s option now suppresses certain input error diagnostics that it
+  formerly failed to suppress.  These include errors when closing the
+  input, when lseeking the input, and when the input is also the output.
+  [bug introduced in grep-2.4]
+
   On POSIX systems, commands like "grep PAT < FILE >> FILE"
   now report an error instead of looping.
   [bug present since "the beginning"]
@@ -47,6 +56,13 @@ GNU grep NEWS                                    -*- outline -*-
   Use of the --mmap option now elicits a warning.  It has been a no-op
   since March of 2010.
 
+  grep no longer diagnoses write errors repeatedly; it exits after
+  diagnosing the first write error.  This is better behavior when
+  writing to a dangling pipe.
+
+  Syntax errors in GREP_COLORS are now ignored, instead of sometimes
+  eliciting warnings.  This is more consistent with programs that
+  (e.g.) ignore errors in termcap entries.
 
 * Noteworthy changes in release 2.10 (2011-11-16) [stable]
 

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=7c24e1059e43ab81999b4a9f6cb6ceef16d7b783


commit 0943cac756268c9476db0bc95151207755f469f5
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sun Jan 22 01:07:36 2012 -0800

    doc: document recent diagnostics-related changes
    
    * NEWS: Document changes re diagnostics related to GREP_COLORS,
    directory loops, -s, "write error".

diff --git a/NEWS b/NEWS
index b36cab7..1d687ec 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,15 @@ GNU grep NEWS                                    -*- outline -*-
   read error on most systems; formerly, it ignored the error.
   [bug introduced in grep-2.5]
 
+  grep now exits with status 2 if a directory loop is found,
+  instead of possibly exiting with status 0 or 1.
+  [bug introduced in grep-2.3]
+
+  The -s option now suppresses certain input error diagnostics that it
+  formerly failed to suppress.  These include errors when closing the
+  input, when lseeking the input, and when the input is also the output.
+  [bug introduced in grep-2.4]
+
   On POSIX systems, commands like "grep PAT < FILE >> FILE"
   now report an error instead of looping.
   [bug present since "the beginning"]
@@ -47,6 +56,13 @@ GNU grep NEWS                                    -*- outline -*-
   Use of the --mmap option now elicits a warning.  It has been a no-op
   since March of 2010.
 
+  grep no longer diagnoses write errors repeatedly; it exits after
+  diagnosing the first write error.  This is better behavior when
+  writing to a dangling pipe.
+
+  Syntax errors in GREP_COLORS are now ignored, instead of sometimes
+  eliciting warnings.  This is more consistent with programs that
+  (e.g.) ignore errors in termcap entries.
 
 * Noteworthy changes in release 2.10 (2011-11-16) [stable]
 

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=6125817c9e0d4bdc4d692d58e40ae71b4bc9069f


commit 0943cac756268c9476db0bc95151207755f469f5
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sun Jan 22 01:07:36 2012 -0800

    doc: document recent diagnostics-related changes
    
    * NEWS: Document changes re diagnostics related to GREP_COLORS,
    directory loops, -s, "write error".

diff --git a/NEWS b/NEWS
index b36cab7..1d687ec 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,15 @@ GNU grep NEWS                                    -*- outline -*-
   read error on most systems; formerly, it ignored the error.
   [bug introduced in grep-2.5]
 
+  grep now exits with status 2 if a directory loop is found,
+  instead of possibly exiting with status 0 or 1.
+  [bug introduced in grep-2.3]
+
+  The -s option now suppresses certain input error diagnostics that it
+  formerly failed to suppress.  These include errors when closing the
+  input, when lseeking the input, and when the input is also the output.
+  [bug introduced in grep-2.4]
+
   On POSIX systems, commands like "grep PAT < FILE >> FILE"
   now report an error instead of looping.
   [bug present since "the beginning"]
@@ -47,6 +56,13 @@ GNU grep NEWS                                    -*- outline -*-
   Use of the --mmap option now elicits a warning.  It has been a no-op
   since March of 2010.
 
+  grep no longer diagnoses write errors repeatedly; it exits after
+  diagnosing the first write error.  This is better behavior when
+  writing to a dangling pipe.
+
+  Syntax errors in GREP_COLORS are now ignored, instead of sometimes
+  eliciting warnings.  This is more consistent with programs that
+  (e.g.) ignore errors in termcap entries.
 
 * Noteworthy changes in release 2.10 (2011-11-16) [stable]
 

-----------------------------------------------------------------------

Summary of changes:
 NEWS              |   16 +++++++++++
 src/main.c        |   75 ++++++++++++++++++++++-------------------------------
 tests/Makefile.am |    1 +
 tests/epipe       |   20 ++++++++++++++
 4 files changed, 68 insertions(+), 44 deletions(-)
 create mode 100755 tests/epipe


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sun Jan 22 05:03:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RouGb-0007lw-CD
	for mharc-grep-commit@gnu.org; Sun, 22 Jan 2012 05:03:17 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45575)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RouGY-0007lq-Pl
	for grep-commit@gnu.org; Sun, 22 Jan 2012 05:03:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RouGX-0004Xx-L5
	for grep-commit@gnu.org; Sun, 22 Jan 2012 05:03:14 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:49128)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RouGX-0004Xr-I7
	for grep-commit@gnu.org; Sun, 22 Jan 2012 05:03:13 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1RouGX-000355-9A
	for grep-commit@gnu.org; Sun, 22 Jan 2012 10:03:13 +0000
Date: Sun, 22 Jan 2012 10:03:13 +0000
Message-Id: <E1RouGX-000355-9A@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-64-gfcff123
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0943cac756268c9476db0bc95151207755f469f5
X-Git-Newrev: fcff123a3d67e2ce1bbd4592d39fa791087d9f8e
From: Jim Meyering <jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 10:03:16 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  fcff123a3d67e2ce1bbd4592d39fa791087d9f8e (commit)
      from  0943cac756268c9476db0bc95151207755f469f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=fcff123a3d67e2ce1bbd4592d39fa791087d9f8e


commit fcff123a3d67e2ce1bbd4592d39fa791087d9f8e
Author: Jim Meyering <meyering@redhat.com>
Date:   Sun Jan 22 10:45:20 2012 +0100

    build: update gnulib to latest; adjust quoting in tests
    
    * gnulib: Update.
    * tests/in-eq-out-infloop: Convert expected diagnostics to match
    new quoting.

diff --git a/gnulib b/gnulib
index 464f9e7..6f37b9d 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 464f9e7b25ea50440cd453931e18329844023fef
+Subproject commit 6f37b9dd8977f231e79d7a69277ed8a43af9625c
diff --git a/tests/in-eq-out-infloop b/tests/in-eq-out-infloop
index fc7acc6..0ef408a 100755
--- a/tests/in-eq-out-infloop
+++ b/tests/in-eq-out-infloop
@@ -16,8 +16,8 @@ echo "$v" > out || framework_failure_
 
 for arg in out - ''; do
   case $arg in
-    out) echo 'grep: input file `out'\'' is also the output';;
-    *)   echo 'grep: input file `(standard input)'\'' is also the output';;
+    out) echo "grep: input file 'out' is also the output";;
+    *)   echo "grep: input file '(standard input)' is also the output";;
   esac > err.exp || framework_failure_
 
   # Require an exit status of 2.

-----------------------------------------------------------------------

Summary of changes:
 gnulib                  |    2 +-
 tests/in-eq-out-infloop |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sun Jan 22 05:43:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RoutQ-0003Kf-BU
	for mharc-grep-commit@gnu.org; Sun, 22 Jan 2012 05:43:24 -0500
Received: from eggs.gnu.org ([140.186.70.92]:49533)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RoutK-0003K0-Ve
	for grep-commit@gnu.org; Sun, 22 Jan 2012 05:43:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RoutH-0000Jm-8E
	for grep-commit@gnu.org; Sun, 22 Jan 2012 05:43:18 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:57082)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RoutG-0000Ji-OJ
	for grep-commit@gnu.org; Sun, 22 Jan 2012 05:43:15 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1RoutG-0003i8-FS
	for grep-commit@gnu.org; Sun, 22 Jan 2012 10:43:14 +0000
Date: Sun, 22 Jan 2012 10:43:14 +0000
Message-Id: <E1RoutG-0003i8-FS@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.10-66-g75b74e4
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: fcff123a3d67e2ce1bbd4592d39fa791087d9f8e
X-Git-Newrev: 75b74e442f993c03e6af8b9e2e74cd657e6cce14
From: Jim Meyering <jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: bug-grep@gnu.org
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 10:43:22 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  75b74e442f993c03e6af8b9e2e74cd657e6cce14 (commit)
       via  ad4168bef21ef91e31637a83170deac3044b56de (commit)
      from  fcff123a3d67e2ce1bbd4592d39fa791087d9f8e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=75b74e442f993c03e6af8b9e2e74cd657e6cce14


commit 75b74e442f993c03e6af8b9e2e74cd657e6cce14
Author: Jim Meyering <meyering@redhat.com>
Date:   Sun Jan 22 11:40:52 2012 +0100

    build: update bootstrap from gnulib and adapt
    
    * bootstrap: Update from gnulib.
    * tests/init.sh: Update from gnulib.
    * bootstrap.conf (bootstrap_epilogue): Remove now-unnecessary,
    snippet that edited gnulib-tests/gnulib.mk.
    (gnulib_tool_option_extras): Add both --symlink and
    --makefile-name=gnulib.mk.  Remove use of $bt.
    * lib/Makefile.am: Initialize numerous automake variables so that
    generated code in gnulib.mk may use += to append to them.

diff --git a/bootstrap b/bootstrap
index 8c8a9cc..bb046b4 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2011-08-11.17; # UTC
+scriptversion=2012-01-22.10; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -38,10 +38,6 @@ export LC_ALL
 
 local_gl_dir=gl
 
-# Temporary directory names.
-bt='._bootmp'
-bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
-bt2=${bt}2
 me=$0
 
 usage() {
@@ -88,9 +84,12 @@ gnulib_modules=
 # Any gnulib files needed that are not in modules.
 gnulib_files=
 
-# A function to be called to edit gnulib.mk right after it's created.
+: ${AUTOPOINT=autopoint}
+: ${AUTORECONF=autoreconf}
+
+# A function to be called right after gnulib-tool is run.
 # Override it via your own definition in bootstrap.conf.
-gnulib_mk_hook() { :; }
+bootstrap_post_import_hook() { :; }
 
 # A function to be called after everything else in this script.
 # Override it via your own definition in bootstrap.conf.
@@ -105,6 +104,11 @@ po_download_command_format=\
 "rsync --delete --exclude '*.s1' -Lrtvz \
  'translationproject.org::tp/latest/%s/' '%s'"
 
+# Fallback for downloading .po files (if rsync fails).
+po_download_command_format2=\
+"wget --mirror -nd -q -np -A.po -P '%s' \
+ http://translationproject.org/latest/%s/"
+
 extract_package_name='
   /^AC_INIT(/{
      /.*,.*,.*, */{
@@ -312,8 +316,8 @@ insert_vc_ignore() {
   pattern="$2"
   case $vc_ignore_file in
   *.gitignore)
-    # A .gitignore entry that does not start with `/' applies
-    # recursively to subdirectories, so prepend `/' to every
+    # A .gitignore entry that does not start with '/' applies
+    # recursively to subdirectories, so prepend '/' to every
     # .gitignore entry.
     pattern=`echo "$pattern" | sed s,^,/,`;;
   esac
@@ -473,6 +477,32 @@ if test $use_libtool = 1; then
   find_tool LIBTOOLIZE glibtoolize libtoolize
 fi
 
+# gnulib-tool requires at least automake and autoconf.
+# If either is not listed, add it (with minimum version) as a prerequisite.
+case $buildreq in
+  *automake*) ;;
+  *) buildreq="automake 1.9
+$buildreq" ;;
+esac
+case $buildreq in
+  *autoconf*) ;;
+  *) buildreq="autoconf 2.59
+$buildreq" ;;
+esac
+
+# When we can deduce that gnulib-tool will require patch,
+# and when patch is not already listed as a prerequisite, add it, too.
+if test ! -d "$local_gl_dir" \
+    || find "$local_gl_dir" -name '*.diff' -exec false {} +; then
+  :
+else
+  case $buildreq in
+    *patch*) ;;
+    *) buildreq="patch -
+$buildreq" ;;
+  esac
+fi
+
 if ! printf "$buildreq" | check_versions; then
   echo >&2
   if test -f README-prereq; then
@@ -583,6 +613,9 @@ download_po_files() {
   domain=$2
   echo "$me: getting translations into $subdir for $domain..."
   cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+  eval "$cmd" && return
+  # Fallback to HTTP.
+  cmd=`printf "$po_download_command_format2" "$subdir" "$domain"`
   eval "$cmd"
 }
 
@@ -703,56 +736,32 @@ symlink_to_dir()
   }
 }
 
-cp_mark_as_generated()
-{
-  cp_src=$1
-  cp_dst=$2
+# NOTE: we have to be careful to run both autopoint and libtoolize
+# before gnulib-tool, since gnulib-tool is likely to provide newer
+# versions of files "installed" by these two programs.
+# Then, *after* gnulib-tool (see below), we have to be careful to
+# run autoreconf in such a way that it does not run either of these
+# two just-pre-run programs.
 
-  if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
-    symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
-  elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
-    symlink_to_dir $local_gl_dir "$cp_dst"
-  else
-    case $cp_dst in
-      *.[ch])             c1='/* '; c2=' */';;
-      *.texi)             c1='@c '; c2=     ;;
-      *.m4|*/Make*|Make*) c1='# ' ; c2=     ;;
-      *)                  c1=     ; c2=     ;;
-    esac
+# Import from gettext.
+with_gettext=yes
+grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
+    with_gettext=no
 
-    # If the destination directory doesn't exist, create it.
-    # This is required at least for "lib/uniwidth/cjk.h".
-    dst_dir=`dirname "$cp_dst"`
-    test -d "$dst_dir" || mkdir -p "$dst_dir"
-
-    if test -z "$c1"; then
-      cmp -s "$cp_src" "$cp_dst" || {
-        # Copy the file first to get proper permissions if it
-        # doesn't already exist.  Then overwrite the copy.
-        echo "$me: cp -f $cp_src $cp_dst" &&
-        rm -f "$cp_dst" &&
-        cp "$cp_src" "$cp_dst-t" &&
-        sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
-        mv -f "$cp_dst-t" "$cp_dst"
-      }
-    else
-      # Copy the file first to get proper permissions if it
-      # doesn't already exist.  Then overwrite the copy.
-      cp "$cp_src" "$cp_dst-t" &&
-      (
-        echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
-        echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
-        sed "s!$bt_regex/!!g" "$cp_src"
-      ) > $cp_dst-t &&
-      if cmp -s "$cp_dst-t" "$cp_dst"; then
-        rm -f "$cp_dst-t"
-      else
-        echo "$me: cp $cp_src $cp_dst # with edits" &&
-        mv -f "$cp_dst-t" "$cp_dst"
-      fi
-    fi
-  fi
-}
+if test $with_gettext = yes; then
+  # Released autopoint has the tendency to install macros that have been
+  # obsoleted in current gnulib, so run this before gnulib-tool.
+  echo "$0: $AUTOPOINT --force"
+  $AUTOPOINT --force || exit
+fi
+
+# Autoreconf runs aclocal before libtoolize, which causes spurious
+# warnings if the initial aclocal is confused by the libtoolized
+# (or worse out-of-date) macro directory.
+if test $use_libtool = 1; then
+  echo "running: $LIBTOOLIZE --copy --install"
+  $LIBTOOLIZE --copy --install
+fi
 
 version_controlled_file() {
   dir=$1
@@ -771,83 +780,17 @@ version_controlled_file() {
   test $found = yes
 }
 
-slurp() {
-  for dir in . `(cd $1 && find * -type d -print)`; do
-    copied=
-    sep=
-    for file in `ls -a $1/$dir`; do
-      case $file in
-      .|..) continue;;
-      # FIXME: should all file names starting with "." be ignored?
-      .*) continue;;
-      esac
-      test -d $1/$dir/$file && continue
-      for excluded_file in $excluded_files; do
-        test "$dir/$file" = "$excluded_file" && continue 2
-      done
-      if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
-        copied=$copied${sep}$gnulib_mk; sep=$nl
-        remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
-        sed "$remove_intl" $1/$dir/$file |
-        cmp - $dir/$gnulib_mk > /dev/null || {
-          echo "$me: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
-          rm -f $dir/$gnulib_mk &&
-          sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
-          gnulib_mk_hook $dir/$gnulib_mk
-        }
-      elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
-           version_controlled_file $dir $file; then
-        echo "$me: $dir/$file overrides $1/$dir/$file"
-      else
-        copied=$copied$sep$file; sep=$nl
-        cp_mark_as_generated $1/$dir/$file $dir/$file
-      fi || exit
-    done
-
-    for dot_ig in x $vc_ignore; do
-      test $dot_ig = x && continue
-      ig=$dir/$dot_ig
-      if test -n "$copied"; then
-        insert_vc_ignore $ig "$copied"
-        # If an ignored file name ends with .in.h, then also add
-        # the name with just ".h".  Many gnulib headers are generated,
-        # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
-        # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
-        f=`echo "$copied" |
-          sed '
-            s/\.in\.h$/.h/
-            s/\.sin$/.sed/
-            s/\.y$/.c/
-            s/\.gperf$/.h/
-          '
-        `
-        insert_vc_ignore $ig "$f"
-
-        # For files like sys_stat.in.h and sys_time.in.h, record as
-        # ignorable the directory we might eventually create: sys/.
-        f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
-        insert_vc_ignore $ig "$f"
-      fi
-    done
-  done
-}
-
-
-# Create boot temporary directories to import from gnulib and gettext.
-rm -fr $bt $bt2 &&
-mkdir $bt $bt2 || exit
-
 # Import from gnulib.
 
 gnulib_tool_options="\
  --import\
  --no-changelog\
- --aux-dir $bt/$build_aux\
- --doc-base $bt/$doc_base\
+ --aux-dir $build_aux\
+ --doc-base $doc_base\
  --lib $gnulib_name\
- --m4-base $bt/$m4_base/\
- --source-base $bt/$source_base/\
- --tests-base $bt/$tests_base\
+ --m4-base $m4_base/\
+ --source-base $source_base/\
+ --tests-base $tests_base\
  --local-dir $local_gl_dir\
  $gnulib_tool_option_extras\
 "
@@ -859,25 +802,13 @@ if test $use_libtool = 1; then
 fi
 echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
 $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
-slurp $bt || exit
 
 for file in $gnulib_files; do
   symlink_to_dir "$GNULIB_SRCDIR" $file || exit
 done
 
-
-# Import from gettext.
-with_gettext=yes
-grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
-    with_gettext=no
-
-if test $with_gettext = yes; then
-  echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
-  cp configure.ac $bt2 &&
-  (cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
-  slurp $bt2 $bt || exit
-fi
-rm -fr $bt $bt2 || exit
+bootstrap_post_import_hook \
+  || { echo >&2 "$me: bootstrap_post_import_hook failed"; exit 1; }
 
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
 # gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
@@ -891,28 +822,21 @@ find "$m4_base" "$source_base" \
   -depth \( -name '*.m4' -o -name '*.[ch]' \) \
   -type l -xtype l -delete > /dev/null 2>&1
 
-# Reconfigure, getting other files.
-
-# Skip autoheader if it's not needed.
-grep -E '^[	 ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
-  AUTOHEADER=true
-
-for command in \
-  libtool \
-  "${ACLOCAL-aclocal} --force -I '$m4_base' $ACLOCAL_FLAGS" \
-  "${AUTOCONF-autoconf} --force" \
-  "${AUTOHEADER-autoheader} --force" \
-  "${AUTOMAKE-automake} --add-missing --copy --force-missing"
-do
-  if test "$command" = libtool; then
-    test $use_libtool = 0 \
-      && continue
-    command="${LIBTOOLIZE-libtoolize} -c -f"
-  fi
-  echo "$0: $command ..."
-  eval "$command" || exit
-done
+# Some systems (RHEL 5) are using ancient autotools, for which the
+# --no-recursive option had not been invented.  Detect that lack and
+# omit the option when it's not supported.  FIXME in 2017: remove this
+# hack when RHEL 5 autotools are updated, or when they become irrelevant.
+no_recursive=
+case $($AUTORECONF --help) in
+  *--no-recursive*) no_recursive=--no-recursive;;
+esac
 
+# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
+echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
+    "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
+AUTOPOINT=true LIBTOOLIZE=true \
+    $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
+  || exit 1
 
 # Get some extra files from gnulib, overriding existing files.
 for file in $gnulib_extra_files; do
diff --git a/bootstrap.conf b/bootstrap.conf
index 4aee59a..2b7a5ec 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -104,7 +104,9 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
 # Automake requires that ChangeLog exist.
 test -f ChangeLog || touch ChangeLog || exit 1
 
-gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests"
+gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
+ --makefile-name=gnulib.mk
+"
 
 # Build prerequisites
 buildreq="\
@@ -121,9 +123,5 @@ tar        -
 
 bootstrap_epilogue()
 {
-  # Change paths in gnulib-tests/gnulib.mk from "../.." to "..".
-  m=gnulib-tests/gnulib.mk
-  sed 's,\.\./\.\.,..,g' $m > $m-t
-  mv -f $m-t $m
   perl -pi -e "s/\@PACKAGE\@/$package/g" README-release
 }
diff --git a/lib/Makefile.am b/lib/Makefile.am
index afbf3cd..04ae51e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -14,6 +14,17 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+AM_CFLAGS =
+AM_CPPFLAGS =
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST =
+MAINTAINERCLEANFILES =
+MOSTLYCLEANDIRS =
+MOSTLYCLEANFILES =
+SUFFIXES =
+noinst_LIBRARIES =
+
 include gnulib.mk
 
 INCLUDES = -I.. -I$(srcdir)
diff --git a/tests/init.sh b/tests/init.sh
index 759842c..5985552 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -61,7 +61,7 @@ ME_=`expr "./$0" : '.*/\(.*\)$'`
 
 # We use a trap below for cleanup.  This requires us to go through
 # hoops to get the right exit status transported through the handler.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
 # Turn off errexit here so that we don't trip the bug with OSF1/Tru64
 # sh inside this function.
 Exit () { set +e; (exit $1); exit $1; }
@@ -172,7 +172,7 @@ else
     if test "$re_shell_" = __current__; then
       # 'eval'ing this code makes Solaris 10's /bin/sh exit with
       # $? set to 2.  It does not evaluate any of the code after the
-      # "unexpected" first `('.  Thus, we must run it in a subshell.
+      # "unexpected" first '('.  Thus, we must run it in a subshell.
       ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
     else
       "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
@@ -221,16 +221,102 @@ export MALLOC_PERTURB_
 # a partition, or to undo any other global state changes.
 cleanup_ () { :; }
 
-if ( diff -u "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
-  compare () { diff -u "$@"; }
-elif ( diff -c "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
-  compare () { diff -c "$@"; }
+# Emit a header similar to that from diff -u;  Print the simulated "diff"
+# command so that the order of arguments is clear.  Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+  printf '%s\n' "diff -u $*" \
+    "--- $1	1970-01-01" \
+    "+++ $2	1970-01-01"
+}
+
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
+{
+  test $# = 2 || return 2
+
+  if test "x$1" = x/dev/null; then
+    test -s "$2" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+    return 1
+  fi
+
+  if test "x$2" = x/dev/null; then
+    test -s "$1" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+    return 1
+  fi
+
+  return 2
+}
+
+if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then
+  if test -z "$diff_out_"; then
+    compare_ () { diff -u "$@"; }
+  else
+    compare_ ()
+    {
+      if diff -u "$@" > diff.out; then
+        # No differences were found, but Solaris 'diff' produces output
+        # "No differences encountered". Hide this output.
+        rm -f diff.out
+        true
+      else
+        cat diff.out
+        rm -f diff.out
+        false
+      fi
+    }
+  fi
+elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
+  if test -z "$diff_out_"; then
+    compare_ () { diff -c "$@"; }
+  else
+    compare_ ()
+    {
+      if diff -c "$@" > diff.out; then
+        # No differences were found, but AIX and HP-UX 'diff' produce output
+        # "No differences encountered" or "There are no differences between the
+        # files.". Hide this output.
+        rm -f diff.out
+        true
+      else
+        cat diff.out
+        rm -f diff.out
+        false
+      fi
+    }
+  fi
 elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
-  compare () { cmp -s "$@"; }
+  compare_ () { cmp -s "$@"; }
 else
-  compare () { cmp "$@"; }
+  compare_ () { cmp "$@"; }
 fi
 
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+  # This looks like it can be factored to use a simple "case $?"
+  # after unchecked compare_dev_null_ invocation, but that would
+  # fail in a "set -e" environment.
+  if compare_dev_null_ "$@"; then
+    return 0
+  else
+    case $? in
+      1) return 1;;
+      *) compare_ "$@";;
+    esac
+  fi
+}
+
 # An arbitrary prefix to help distinguish test directories.
 testdir_prefix_ () { printf gt; }
 
@@ -441,7 +527,7 @@ mktempd_ ()
   esac
 
   # First, try to use mktemp.
-  d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
+  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
     || fail=1
 
   # The resulting name must be in the specified directory.

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=ad4168bef21ef91e31637a83170deac3044b56de


commit 75b74e442f993c03e6af8b9e2e74cd657e6cce14
Author: Jim Meyering <meyering@redhat.com>
Date:   Sun Jan 22 11:40:52 2012 +0100

    build: update bootstrap from gnulib and adapt
    
    * bootstrap: Update from gnulib.
    * tests/init.sh: Update from gnulib.
    * bootstrap.conf (bootstrap_epilogue): Remove now-unnecessary,
    snippet that edited gnulib-tests/gnulib.mk.
    (gnulib_tool_option_extras): Add both --symlink and
    --makefile-name=gnulib.mk.  Remove use of $bt.
    * lib/Makefile.am: Initialize numerous automake variables so that
    generated code in gnulib.mk may use += to append to them.

diff --git a/bootstrap b/bootstrap
index 8c8a9cc..bb046b4 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2011-08-11.17; # UTC
+scriptversion=2012-01-22.10; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -38,10 +38,6 @@ export LC_ALL
 
 local_gl_dir=gl
 
-# Temporary directory names.
-bt='._bootmp'
-bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
-bt2=${bt}2
 me=$0
 
 usage() {
@@ -88,9 +84,12 @@ gnulib_modules=
 # Any gnulib files needed that are not in modules.
 gnulib_files=
 
-# A function to be called to edit gnulib.mk right after it's created.
+: ${AUTOPOINT=autopoint}
+: ${AUTORECONF=autoreconf}
+
+# A function to be called right after gnulib-tool is run.
 # Override it via your own definition in bootstrap.conf.
-gnulib_mk_hook() { :; }
+bootstrap_post_import_hook() { :; }
 
 # A function to be called after everything else in this script.
 # Override it via your own definition in bootstrap.conf.
@@ -105,6 +104,11 @@ po_download_command_format=\
 "rsync --delete --exclude '*.s1' -Lrtvz \
  'translationproject.org::tp/latest/%s/' '%s'"
 
+# Fallback for downloading .po files (if rsync fails).
+po_download_command_format2=\
+"wget --mirror -nd -q -np -A.po -P '%s' \
+ http://translationproject.org/latest/%s/"
+
 extract_package_name='
   /^AC_INIT(/{
      /.*,.*,.*, */{
@@ -312,8 +316,8 @@ insert_vc_ignore() {
   pattern="$2"
   case $vc_ignore_file in
   *.gitignore)
-    # A .gitignore entry that does not start with `/' applies
-    # recursively to subdirectories, so prepend `/' to every
+    # A .gitignore entry that does not start with '/' applies
+    # recursively to subdirectories, so prepend '/' to every
     # .gitignore entry.
     pattern=`echo "$pattern" | sed s,^,/,`;;
   esac
@@ -473,6 +477,32 @@ if test $use_libtool = 1; then
   find_tool LIBTOOLIZE glibtoolize libtoolize
 fi
 
+# gnulib-tool requires at least automake and autoconf.
+# If either is not listed, add it (with minimum version) as a prerequisite.
+case $buildreq in
+  *automake*) ;;
+  *) buildreq="automake 1.9
+$buildreq" ;;
+esac
+case $buildreq in
+  *autoconf*) ;;
+  *) buildreq="autoconf 2.59
+$buildreq" ;;
+esac
+
+# When we can deduce that gnulib-tool will require patch,
+# and when patch is not already listed as a prerequisite, add it, too.
+if test ! -d "$local_gl_dir" \
+    || find "$local_gl_dir" -name '*.diff' -exec false {} +; then
+  :
+else
+  case $buildreq in
+    *patch*) ;;
+    *) buildreq="patch -
+$buildreq" ;;
+  esac
+fi
+
 if ! printf "$buildreq" | check_versions; then
   echo >&2
   if test -f README-prereq; then
@@ -583,6 +613,9 @@ download_po_files() {
   domain=$2
   echo "$me: getting translations into $subdir for $domain..."
   cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+  eval "$cmd" && return
+  # Fallback to HTTP.
+  cmd=`printf "$po_download_command_format2" "$subdir" "$domain"`
   eval "$cmd"
 }
 
@@ -703,56 +736,32 @@ symlink_to_dir()
   }
 }
 
-cp_mark_as_generated()
-{
-  cp_src=$1
-  cp_dst=$2
+# NOTE: we have to be careful to run both autopoint and libtoolize
+# before gnulib-tool, since gnulib-tool is likely to provide newer
+# versions of files "installed" by these two programs.
+# Then, *after* gnulib-tool (see below), we have to be careful to
+# run autoreconf in such a way that it does not run either of these
+# two just-pre-run programs.
 
-  if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
-    symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
-  elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
-    symlink_to_dir $local_gl_dir "$cp_dst"
-  else
-    case $cp_dst in
-      *.[ch])             c1='/* '; c2=' */';;
-      *.texi)             c1='@c '; c2=     ;;
-      *.m4|*/Make*|Make*) c1='# ' ; c2=     ;;
-      *)                  c1=     ; c2=     ;;
-    esac
+# Import from gettext.
+with_gettext=yes
+grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
+    with_gettext=no
 
-    # If the destination directory doesn't exist, create it.
-    # This is required at least for "lib/uniwidth/cjk.h".
-    dst_dir=`dirname "$cp_dst"`
-    test -d "$dst_dir" || mkdir -p "$dst_dir"
-
-    if test -z "$c1"; then
-      cmp -s "$cp_src" "$cp_dst" || {
-        # Copy the file first to get proper permissions if it
-        # doesn't already exist.  Then overwrite the copy.
-        echo "$me: cp -f $cp_src $cp_dst" &&
-        rm -f "$cp_dst" &&
-        cp "$cp_src" "$cp_dst-t" &&
-        sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
-        mv -f "$cp_dst-t" "$cp_dst"
-      }
-    else
-      # Copy the file first to get proper permissions if it
-      # doesn't already exist.  Then overwrite the copy.
-      cp "$cp_src" "$cp_dst-t" &&
-      (
-        echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
-        echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
-        sed "s!$bt_regex/!!g" "$cp_src"
-      ) > $cp_dst-t &&
-      if cmp -s "$cp_dst-t" "$cp_dst"; then
-        rm -f "$cp_dst-t"
-      else
-        echo "$me: cp $cp_src $cp_dst # with edits" &&
-        mv -f "$cp_dst-t" "$cp_dst"
-      fi
-    fi
-  fi
-}
+if test $with_gettext = yes; then
+  # Released autopoint has the tendency to install macros that have been
+  # obsoleted in current gnulib, so run this before gnulib-tool.
+  echo "$0: $AUTOPOINT --force"
+  $AUTOPOINT --force || exit
+fi
+
+# Autoreconf runs aclocal before libtoolize, which causes spurious
+# warnings if the initial aclocal is confused by the libtoolized
+# (or worse out-of-date) macro directory.
+if test $use_libtool = 1; then
+  echo "running: $LIBTOOLIZE --copy --install"
+  $LIBTOOLIZE --copy --install
+fi
 
 version_controlled_file() {
   dir=$1
@@ -771,83 +780,17 @@ version_controlled_file() {
   test $found = yes
 }
 
-slurp() {
-  for dir in . `(cd $1 && find * -type d -print)`; do
-    copied=
-    sep=
-    for file in `ls -a $1/$dir`; do
-      case $file in
-      .|..) continue;;
-      # FIXME: should all file names starting with "." be ignored?
-      .*) continue;;
-      esac
-      test -d $1/$dir/$file && continue
-      for excluded_file in $excluded_files; do
-        test "$dir/$file" = "$excluded_file" && continue 2
-      done
-      if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
-        copied=$copied${sep}$gnulib_mk; sep=$nl
-        remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
-        sed "$remove_intl" $1/$dir/$file |
-        cmp - $dir/$gnulib_mk > /dev/null || {
-          echo "$me: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
-          rm -f $dir/$gnulib_mk &&
-          sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
-          gnulib_mk_hook $dir/$gnulib_mk
-        }
-      elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
-           version_controlled_file $dir $file; then
-        echo "$me: $dir/$file overrides $1/$dir/$file"
-      else
-        copied=$copied$sep$file; sep=$nl
-        cp_mark_as_generated $1/$dir/$file $dir/$file
-      fi || exit
-    done
-
-    for dot_ig in x $vc_ignore; do
-      test $dot_ig = x && continue
-      ig=$dir/$dot_ig
-      if test -n "$copied"; then
-        insert_vc_ignore $ig "$copied"
-        # If an ignored file name ends with .in.h, then also add
-        # the name with just ".h".  Many gnulib headers are generated,
-        # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
-        # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
-        f=`echo "$copied" |
-          sed '
-            s/\.in\.h$/.h/
-            s/\.sin$/.sed/
-            s/\.y$/.c/
-            s/\.gperf$/.h/
-          '
-        `
-        insert_vc_ignore $ig "$f"
-
-        # For files like sys_stat.in.h and sys_time.in.h, record as
-        # ignorable the directory we might eventually create: sys/.
-        f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
-        insert_vc_ignore $ig "$f"
-      fi
-    done
-  done
-}
-
-
-# Create boot temporary directories to import from gnulib and gettext.
-rm -fr $bt $bt2 &&
-mkdir $bt $bt2 || exit
-
 # Import from gnulib.
 
 gnulib_tool_options="\
  --import\
  --no-changelog\
- --aux-dir $bt/$build_aux\
- --doc-base $bt/$doc_base\
+ --aux-dir $build_aux\
+ --doc-base $doc_base\
  --lib $gnulib_name\
- --m4-base $bt/$m4_base/\
- --source-base $bt/$source_base/\
- --tests-base $bt/$tests_base\
+ --m4-base $m4_base/\
+ --source-base $source_base/\
+ --tests-base $tests_base\
  --local-dir $local_gl_dir\
  $gnulib_tool_option_extras\
 "
@@ -859,25 +802,13 @@ if test $use_libtool = 1; then
 fi
 echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
 $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
-slurp $bt || exit
 
 for file in $gnulib_files; do
   symlink_to_dir "$GNULIB_SRCDIR" $file || exit
 done
 
-
-# Import from gettext.
-with_gettext=yes
-grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
-    with_gettext=no
-
-if test $with_gettext = yes; then
-  echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
-  cp configure.ac $bt2 &&
-  (cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
-  slurp $bt2 $bt || exit
-fi
-rm -fr $bt $bt2 || exit
+bootstrap_post_import_hook \
+  || { echo >&2 "$me: bootstrap_post_import_hook failed"; exit 1; }
 
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
 # gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
@@ -891,28 +822,21 @@ find "$m4_base" "$source_base" \
   -depth \( -name '*.m4' -o -name '*.[ch]' \) \
   -type l -xtype l -delete > /dev/null 2>&1
 
-# Reconfigure, getting other files.
-
-# Skip autoheader if it's not needed.
-grep -E '^[	 ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
-  AUTOHEADER=true
-
-for command in \
-  libtool \
-  "${ACLOCAL-aclocal} --force -I '$m4_base' $ACLOCAL_FLAGS" \
-  "${AUTOCONF-autoconf} --force" \
-  "${AUTOHEADER-autoheader} --force" \
-  "${AUTOMAKE-automake} --add-missing --copy --force-missing"
-do
-  if test "$command" = libtool; then
-    test $use_libtool = 0 \
-      && continue
-    command="${LIBTOOLIZE-libtoolize} -c -f"
-  fi
-  echo "$0: $command ..."
-  eval "$command" || exit
-done
+# Some systems (RHEL 5) are using ancient autotools, for which the
+# --no-recursive option had not been invented.  Detect that lack and
+# omit the option when it's not supported.  FIXME in 2017: remove this
+# hack when RHEL 5 autotools are updated, or when they become irrelevant.
+no_recursive=
+case $($AUTORECONF --help) in
+  *--no-recursive*) no_recursive=--no-recursive;;
+esac
 
+# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
+echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
+    "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
+AUTOPOINT=true LIBTOOLIZE=true \
+    $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
+  || exit 1
 
 # Get some extra files from gnulib, overriding existing files.
 for file in $gnulib_extra_files; do
diff --git a/bootstrap.conf b/bootstrap.conf
index 4aee59a..2b7a5ec 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -104,7 +104,9 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
 # Automake requires that ChangeLog exist.
 test -f ChangeLog || touch ChangeLog || exit 1
 
-gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests"
+gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
+ --makefile-name=gnulib.mk
+"
 
 # Build prerequisites
 buildreq="\
@@ -121,9 +123,5 @@ tar        -
 
 bootstrap_epilogue()
 {
-  # Change paths in gnulib-tests/gnulib.mk from "../.." to "..".
-  m=gnulib-tests/gnulib.mk
-  sed 's,\.\./\.\.,..,g' $m > $m-t
-  mv -f $m-t $m
   perl -pi -e "s/\@PACKAGE\@/$package/g" README-release
 }
diff --git a/lib/Makefile.am b/lib/Makefile.am
index afbf3cd..04ae51e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -14,6 +14,17 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+AM_CFLAGS =
+AM_CPPFLAGS =
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST =
+MAINTAINERCLEANFILES =
+MOSTLYCLEANDIRS =
+MOSTLYCLEANFILES =
+SUFFIXES =
+noinst_LIBRARIES =
+
 include gnulib.mk
 
 INCLUDES = -I.. -I$(srcdir)
diff --git a/tests/init.sh b/tests/init.sh
index 759842c..5985552 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -61,7 +61,7 @@ ME_=`expr "./$0" : '.*/\(.*\)$'`
 
 # We use a trap below for cleanup.  This requires us to go through
 # hoops to get the right exit status transported through the handler.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
 # Turn off errexit here so that we don't trip the bug with OSF1/Tru64
 # sh inside this function.
 Exit () { set +e; (exit $1); exit $1; }
@@ -172,7 +172,7 @@ else
     if test "$re_shell_" = __current__; then
       # 'eval'ing this code makes Solaris 10's /bin/sh exit with
       # $? set to 2.  It does not evaluate any of the code after the
-      # "unexpected" first `('.  Thus, we must run it in a subshell.
+      # "unexpected" first '('.  Thus, we must run it in a subshell.
       ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
     else
       "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
@@ -221,16 +221,102 @@ export MALLOC_PERTURB_
 # a partition, or to undo any other global state changes.
 cleanup_ () { :; }
 
-if ( diff -u "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
-  compare () { diff -u "$@"; }
-elif ( diff -c "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
-  compare () { diff -c "$@"; }
+# Emit a header similar to that from diff -u;  Print the simulated "diff"
+# command so that the order of arguments is clear.  Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+  printf '%s\n' "diff -u $*" \
+    "--- $1	1970-01-01" \
+    "+++ $2	1970-01-01"
+}
+
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
+{
+  test $# = 2 || return 2
+
+  if test "x$1" = x/dev/null; then
+    test -s "$2" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+    return 1
+  fi
+
+  if test "x$2" = x/dev/null; then
+    test -s "$1" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+    return 1
+  fi
+
+  return 2
+}
+
+if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then
+  if test -z "$diff_out_"; then
+    compare_ () { diff -u "$@"; }
+  else
+    compare_ ()
+    {
+      if diff -u "$@" > diff.out; then
+        # No differences were found, but Solaris 'diff' produces output
+        # "No differences encountered". Hide this output.
+        rm -f diff.out
+        true
+      else
+        cat diff.out
+        rm -f diff.out
+        false
+      fi
+    }
+  fi
+elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
+  if test -z "$diff_out_"; then
+    compare_ () { diff -c "$@"; }
+  else
+    compare_ ()
+    {
+      if diff -c "$@" > diff.out; then
+        # No differences were found, but AIX and HP-UX 'diff' produce output
+        # "No differences encountered" or "There are no differences between the
+        # files.". Hide this output.
+        rm -f diff.out
+        true
+      else
+        cat diff.out
+        rm -f diff.out
+        false
+      fi
+    }
+  fi
 elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
-  compare () { cmp -s "$@"; }
+  compare_ () { cmp -s "$@"; }
 else
-  compare () { cmp "$@"; }
+  compare_ () { cmp "$@"; }
 fi
 
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+  # This looks like it can be factored to use a simple "case $?"
+  # after unchecked compare_dev_null_ invocation, but that would
+  # fail in a "set -e" environment.
+  if compare_dev_null_ "$@"; then
+    return 0
+  else
+    case $? in
+      1) return 1;;
+      *) compare_ "$@";;
+    esac
+  fi
+}
+
 # An arbitrary prefix to help distinguish test directories.
 testdir_prefix_ () { printf gt; }
 
@@ -441,7 +527,7 @@ mktempd_ ()
   esac
 
   # First, try to use mktemp.
-  d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
+  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
     || fail=1
 
   # The resulting name must be in the specified directory.

-----------------------------------------------------------------------

Summary of changes:
 bootstrap       |  250 +++++++++++++++++++------------------------------------
 bootstrap.conf  |    8 +-
 lib/Makefile.am |   11 +++
 src/egrep.c     |    2 +-
 src/fgrep.c     |    2 +-
 src/grep.c      |    4 +-
 src/main.c      |    2 +-
 tests/init.sh   |  104 +++++++++++++++++++++--
 8 files changed, 201 insertions(+), 182 deletions(-)


hooks/post-receive
-- 
grep


