summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2010-10-24 12:53:35 +0200
committerPaolo Bonzini <bonzini@gnu.org>2010-11-14 17:05:26 +0100
commitb8fa0e106fe976912044d703c8e90d22e4d4c3d0 (patch)
treec7f33fe2fce92eb49e82d7f3b565bbf5519bf015
parent46dba4e75aafb76970160769b42d3f06f7eb3de5 (diff)
downloadgrep-b8fa0e106fe976912044d703c8e90d22e4d4c3d0.tar.gz
grep: add include guards
* src/system.h: Add multiple inclusion guards. * src/grep.h: Likewise.
-rw-r--r--src/grep.h5
-rw-r--r--src/system.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/grep.h b/src/grep.h
index 67ea7936..72146e75 100644
--- a/src/grep.h
+++ b/src/grep.h
@@ -17,6 +17,9 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
+#ifndef GREP_GREP_H
+#define GREP_GREP_H 1
+
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__
# define __attribute__(x)
#endif
@@ -43,3 +46,5 @@ extern int match_icase; /* -i */
extern int match_words; /* -w */
extern int match_lines; /* -x */
extern unsigned char eolbyte; /* -z */
+
+#endif
diff --git a/src/system.h b/src/system.h
index a0d3c4ae..74298837 100644
--- a/src/system.h
+++ b/src/system.h
@@ -16,6 +16,9 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
+#ifndef GREP_SYSTEM_H
+#define GREP_SYSTEM_H 1
+
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
@@ -54,3 +57,4 @@ enum { EXIT_TROUBLE = 2 };
#endif
#include "unlocked-io.h"
+#endif