grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v2.16-12-gc28c90b


From: Jim Meyering
Subject: grep branch, master, updated. v2.16-12-gc28c90b
Date: Mon, 27 Jan 2014 15:23:28 +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  c28c90bc17b61e355bbad757e26a7027feb57fe1 (commit)
      from  5a1357c9909a79fb3a15218446dca052680ef525 (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=c28c90bc17b61e355bbad757e26a7027feb57fe1


commit c28c90bc17b61e355bbad757e26a7027feb57fe1
Author: Jim Meyering <address@hidden>
Date:   Sat Jan 11 12:15:30 2014 -0800

    maint: remove vestiges of support for long-disabled --mmap option
    
    This option was disabled in March of 2010, and began to elicit a
    warning in January of 2012.  Its time has come.
    * doc/grep.in.1: Remove mention.
    * doc/grep.texi: Likewise.
    * src/main.c (GROUP_SEPARATOR_OPTION, usage, MMAP_OPTION)
    (long_options, main): Remove all traces.
    * tests/Makefile.am (check_PROGRAMS): Remove mention of ignore-mmap.
    * tests/ignore-mmap: Remove file.
    * NEWS (Maintenance): Mention it.

diff --git a/NEWS b/NEWS
index 589b2ac..a662960 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,12 @@ GNU grep NEWS                                    -*- outline 
-*-
   are not yet guaranteed to use the rational range interpretation even
   in GNU systems.
 
+** Maintenance
+
+  grep's --mmap option was disabled in March of 2010, and began to
+  elicit a warning in January of 2012.  Now it is completely gone.
+
+
 * Noteworthy changes in release 2.16 (2014-01-01) [stable]
 
 ** Bug fixes
diff --git a/doc/grep.in.1 b/doc/grep.in.1
index d91de8c..58a6c0e 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -544,23 +544,6 @@ Follow all symbolic links, unlike
 Use line buffering on output.
 This can cause a performance penalty.
 .TP
-.B \-\^\-mmap
-If possible, use the
-.BR mmap (2)
-system call to read input, instead of
-the default
-.BR read (2)
-system call.
-In some situations,
-.B \-\^\-mmap
-yields better performance.
-However,
-.B \-\^\-mmap
-can cause undefined behavior (including core dumps)
-if an input file shrinks while
-.B grep
-is operating, or if an I/O error occurs.
-.TP
 .BR \-U ", " \-\^\-binary
 Treat the file(s) as binary.
 By default, under \s-1MS-DOS\s0 and \s-1MS\s0-Windows,
@@ -1219,7 +1202,7 @@ Back-references are very slow, and may require 
exponential time.
 .SS "Regular Manual Pages"
 awk(1), cmp(1), diff(1), find(1), gzip(1),
 perl(1), sed(1), sort(1), xargs(1), zgrep(1),
-mmap(2), read(2),
+read(2),
 pcre(3), pcresyntax(3), pcrepattern(3),
 terminfo(5),
 glob(7), regex(7).
diff --git a/doc/grep.texi b/doc/grep.texi
index 42fb9a2..e82f34d 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -706,15 +706,6 @@ directory, recursively, following all symbolic links.
 Use line buffering on output.
 This can cause a performance penalty.
 
address@hidden --mmap
address@hidden --mmap
address@hidden memory mapped input
-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.
-
 @item -U
 @itemx --binary
 @opindex -U
diff --git a/src/main.c b/src/main.c
index bfd0982..3f16061 100644
--- a/src/main.c
+++ b/src/main.c
@@ -288,8 +288,7 @@ enum
   LINE_BUFFERED_OPTION,
   LABEL_OPTION,
   EXCLUDE_DIRECTORY_OPTION,
-  GROUP_SEPARATOR_OPTION,
-  MMAP_OPTION
+  GROUP_SEPARATOR_OPTION
 };
 
 /* Long options equivalences. */
@@ -327,8 +326,6 @@ static struct option const long_options[] =
   {"line-regexp", no_argument, NULL, 'x'},
   {"max-count", required_argument, NULL, 'm'},
 
-  /* FIXME: disabled in Mar 2010; warn towards end of 2011; remove in 2013.  */
-  {"mmap", no_argument, NULL, MMAP_OPTION},
   {"no-filename", no_argument, NULL, 'h'},
   {"no-group-separator", no_argument, NULL, GROUP_SEPARATOR_OPTION},
   {"no-messages", no_argument, NULL, 's'},
@@ -1572,8 +1569,7 @@ Miscellaneous:\n\
   -s, --no-messages         suppress error messages\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                deprecated no-op; evokes a warning\n"));
+      --help                display this help and exit\nn"));
       printf (_("\
 \n\
 Output control:\n\
@@ -2263,10 +2259,6 @@ main (int argc, char **argv)
         label = optarg;
         break;
 
-      case MMAP_OPTION:
-        error (0, 0, _("the --mmap option has been a no-op since 2010"));
-        break;
-
       case 0:
         /* long options */
         break;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a37a814..e2967fa 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -65,7 +65,6 @@ TESTS =                                               \
   grep-dev-null                                        \
   grep-dir                                     \
   help-version                                 \
-  ignore-mmap                                  \
   in-eq-out-infloop                            \
   include-exclude                              \
   inconsistent-range                           \
diff --git a/tests/ignore-mmap b/tests/ignore-mmap
deleted file mode 100755
index 8c40868..0000000
--- a/tests/ignore-mmap
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-# Ensure that --mmap is ignored
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
-
-echo a > in || framework_failure_
-fail=0
-
-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>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:
 NEWS              |    6 ++++++
 doc/grep.in.1     |   19 +------------------
 doc/grep.texi     |    9 ---------
 src/main.c        |   12 ++----------
 tests/Makefile.am |    1 -
 tests/ignore-mmap |   20 --------------------
 6 files changed, 9 insertions(+), 58 deletions(-)
 delete mode 100755 tests/ignore-mmap


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]