[PATCH 1/3] build: avoid files with duplicate basenames

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

 



When -I. is passed to gcc — as autotools will do —,
src/parser.h). Rename include/parser.h to parscan.h ("parser and
scanner").

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
 include/parscan.h |   44 ++++++++++++++++++++++++++++++++++++++++++++
 include/parser.h  |   44 --------------------------------------------
 src/cli.c         |    2 +-
 src/main.c        |    2 +-
 src/parser.y      |    2 +-
 src/scanner.l     |    2 +-
 6 files changed, 48 insertions(+), 48 deletions(-)
 create mode 100644 include/parscan.h
 delete mode 100644 include/parser.h

diff --git a/include/parscan.h b/include/parscan.h
new file mode 100644
index 0000000..b807707
--- /dev/null
+++ b/include/parscan.h
@@ -0,0 +1,44 @@
+#ifndef NFTABLES_PARSCAN_H
+#define NFTABLES_PARSCAN_H
+
+#include <list.h>
+#include <rule.h> // FIXME
+
+#define MAX_INCLUDE_DEPTH		16
+#define TABSIZE				8
+
+#define YYLTYPE				struct location
+#define YYLTYPE_IS_TRIVIAL		0
+#define YYENABLE_NLS			0
+
+#define SCOPE_NEST_MAX			3
+
+struct parser_state {
+	struct input_descriptor		*indesc;
+	struct input_descriptor		indescs[MAX_INCLUDE_DEPTH];
+	unsigned int			indesc_idx;
+
+	struct list_head		*msgs;
+
+	struct scope			top_scope;
+	struct scope			*scopes[SCOPE_NEST_MAX];
+	unsigned int			scope;
+
+	struct list_head		cmds;
+};
+
+extern void parser_init(struct parser_state *state, struct list_head *msgs);
+extern int nft_parse(void *, struct parser_state *state);
+
+extern void *scanner_init(struct parser_state *state);
+extern void scanner_destroy(struct parser_state *state);
+
+extern int scanner_read_file(void *scanner, const char *filename,
+			     const struct location *loc);
+extern int scanner_include_file(void *scanner, const char *filename,
+				const struct location *loc);
+extern void scanner_push_buffer(void *scanner,
+				const struct input_descriptor *indesc,
+				const char *buffer);
+
+#endif /* NFTABLES_PARSCAN_H */
diff --git a/include/parser.h b/include/parser.h
deleted file mode 100644
index f5dd6f4..0000000
--- a/include/parser.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef NFTABLES_PARSER_H
-#define NFTABLES_PARSER_H
-
-#include <list.h>
-#include <rule.h> // FIXME
-
-#define MAX_INCLUDE_DEPTH		16
-#define TABSIZE				8
-
-#define YYLTYPE				struct location
-#define YYLTYPE_IS_TRIVIAL		0
-#define YYENABLE_NLS			0
-
-#define SCOPE_NEST_MAX			3
-
-struct parser_state {
-	struct input_descriptor		*indesc;
-	struct input_descriptor		indescs[MAX_INCLUDE_DEPTH];
-	unsigned int			indesc_idx;
-
-	struct list_head		*msgs;
-
-	struct scope			top_scope;
-	struct scope			*scopes[SCOPE_NEST_MAX];
-	unsigned int			scope;
-
-	struct list_head		cmds;
-};
-
-extern void parser_init(struct parser_state *state, struct list_head *msgs);
-extern int nft_parse(void *, struct parser_state *state);
-
-extern void *scanner_init(struct parser_state *state);
-extern void scanner_destroy(struct parser_state *state);
-
-extern int scanner_read_file(void *scanner, const char *filename,
-			     const struct location *loc);
-extern int scanner_include_file(void *scanner, const char *filename,
-				const struct location *loc);
-extern void scanner_push_buffer(void *scanner,
-				const struct input_descriptor *indesc,
-				const char *buffer);
-
-#endif /* NFTABLES_PARSER_H */
diff --git a/src/cli.c b/src/cli.c
index e302dfa..bb519f4 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -24,7 +24,7 @@
 #include <readline/history.h>
 
 #include <nftables.h>
-#include <parser.h>
+#include <parscan.h>
 #include <erec.h>
 #include <utils.h>
 
diff --git a/src/main.c b/src/main.c
index 3daa294..11dd21e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -20,7 +20,7 @@
 
 #include <nftables.h>
 #include <utils.h>
-#include <parser.h>
+#include <parscan.h>
 #include <rule.h>
 #include <netlink.h>
 #include <erec.h>
diff --git a/src/parser.y b/src/parser.y
index 90f9052..cb44372 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -22,7 +22,7 @@
 #include <statement.h>
 #include <expression.h>
 #include <utils.h>
-#include <parser.h>
+#include <parscan.h>
 #include <erec.h>
 
 #include "parser.h"
diff --git a/src/scanner.l b/src/scanner.l
index 7fc01f7..21994cb 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -19,7 +19,7 @@
 #include <nftables.h>
 #include <erec.h>
 #include <rule.h>
-#include <parser.h>
+#include <parscan.h>
 #include "parser.h"
 
 #define YY_NO_INPUT
-- 
1.6.2

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux