Skip to content

Commit

Permalink
9012 cmd/grep: don't use obsolete REG_ANCHOR
Browse files Browse the repository at this point in the history
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
Yuri Pankov authored and Dan McDonald committed Feb 2, 2018
1 parent 16b8cff commit 925beec
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions usr/src/cmd/grep/grep.c
Expand Up @@ -34,9 +34,8 @@
*
*/

/* Copyright 2017 Nexenta Systems, Inc. All rights reserved. */

/*
* Copyright 2018 Nexenta Systems, Inc.
* Copyright 2013 Damian Bogel. All rights reserved.
*/

Expand Down Expand Up @@ -284,7 +283,6 @@ main(int argc, char **argv)

case 'x': /* POSIX: full line matches */
xflag++;
regflags |= REG_ANCHOR;
break;

case 'E': /* POSIX: Extended RE's */
Expand Down Expand Up @@ -704,9 +702,7 @@ fixpatterns(void)
int rv, fix_pattern, npatterns;

/*
* As REG_ANCHOR flag is not supported in the current Solaris,
* need to fix the specified pattern if -x is specified with
* grep or egrep
* Fix the specified pattern if -x is specified.
*/
fix_pattern = !Fflag && xflag;

Expand Down

0 comments on commit 925beec

Please sign in to comment.