summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-10-03 12:24:16 +0200
committerJim Meyering <meyering@redhat.com>2012-10-03 12:24:16 +0200
commitf97be96b2dcea51605b143fa1695b4ea5c75bddc (patch)
tree4b1f4f29fe8012f5541eef64d49600982d6ef6f9
parent3b14aaa4ddefb86e1bff782fc4575eec6186ca49 (diff)
downloadgrep-f97be96b2dcea51605b143fa1695b4ea5c75bddc.tar.gz
maint: factor out STREQ definition
* src/main.c (STREQ): Remove definition. * src/pcresearch.c: (STREQ): Likewise. * src/system.h (STREQ): Define it here instead.
-rw-r--r--src/main.c2
-rw-r--r--src/pcresearch.c2
-rw-r--r--src/system.h3
3 files changed, 3 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index e3b5186b..6750007f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -52,8 +52,6 @@
#define SEP_CHAR_REJECTED '-'
#define SEP_STR_GROUP "--"
-#define STREQ(a, b) (strcmp (a, b) == 0)
-
#define AUTHORS \
proper_name ("Mike Haertel"), \
_("others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>")
diff --git a/src/pcresearch.c b/src/pcresearch.c
index a15f598d..2e95f2df 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -29,8 +29,6 @@
# include <langinfo.h>
#endif
-#define STREQ(a, b) (strcmp (a, b) == 0)
-
#if HAVE_LIBPCRE
/* Compiled internal form of a Perl regular expression. */
static pcre *cre;
diff --git a/src/system.h b/src/system.h
index 426d8937..95208dff 100644
--- a/src/system.h
+++ b/src/system.h
@@ -52,4 +52,7 @@ enum { EXIT_TROUBLE = 2 };
#endif
#include "unlocked-io.h"
+
+#define STREQ(a, b) (strcmp (a, b) == 0)
+
#endif