bug-grep
[Top][All Lists]
Advanced

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

[PATCH] grep: add include guards


From: Paolo Bonzini
Subject: [PATCH] grep: add include guards
Date: Sun, 14 Nov 2010 16:59:16 +0100

* src/system.h: Add multiple inclusion guards.
* src/grep.h: Likewise.
---
 src/grep.h   |    5 +++++
 src/system.h |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/grep.h b/src/grep.h
index 67ea793..72146e7 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 a0d3c4a..7429883 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
-- 
1.7.3.2




reply via email to

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