[syslog-ng] [PATCH 3/6] cfg-grammar.y: Put a few more things into cfg-grammar.h
Gergely Nagy
algernon at balabit.hu
Wed Sep 4 14:35:29 CEST 2013
Export last_template, last_value_pairs and last_vp_transset to the
cfg-grammar.h header, because these are used by exported rules.
Consequently, remove the redeclaration of these from modules that had it
before.
Signed-off-by: Balazs Scheidler <bazsi at balabit.hu>
Signed-off-by: Gergely Nagy <algernon at balabit.hu>
---
lib/cfg-grammar.y | 3 +++
modules/afamqp/afamqp-grammar.ym | 8 +++-----
modules/afmongodb/afmongodb-grammar.ym | 6 +-----
modules/afsql/afsql-grammar.ym | 7 +++----
4 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/lib/cfg-grammar.y b/lib/cfg-grammar.y
index 41830f5..e78b032 100644
--- a/lib/cfg-grammar.y
+++ b/lib/cfg-grammar.y
@@ -50,6 +50,9 @@ extern struct _FilePermOptions *last_file_perm_options;
extern struct _MsgFormatOptions *last_msg_format_options;
extern struct _LogDriver *last_driver;
extern struct _LogParser *last_parser;
+extern struct _LogTemplate *last_template;
+extern struct _ValuePairs *last_value_pairs;
+extern struct _ValuePairsTransformSet *last_vp_transset;
}
diff --git a/modules/afamqp/afamqp-grammar.ym b/modules/afamqp/afamqp-grammar.ym
index a336d5d..0e3f06a 100644
--- a/modules/afamqp/afamqp-grammar.ym
+++ b/modules/afamqp/afamqp-grammar.ym
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2012 Nagy, Attila <bra at fsn.hu>
- * Copyright (c) 2012 BalaBit IT Ltd, Budapest, Hungary
- * Copyright (c) 2012 Gergely Nagy <algernon at balabit.hu>
+ * Copyright (c) 2012-2013 BalaBit IT Ltd, Budapest, Hungary
+ * Copyright (c) 2012-2013 Gergely Nagy <algernon at balabit.hu>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
@@ -31,13 +31,11 @@
%code {
#include "cfg-parser.h"
+#include "cfg-grammar.h"
#include "afamqp-grammar.h"
#include "plugin.h"
#include "vptransform.h"
-extern LogDriver *last_driver;
-extern ValuePairs *last_value_pairs;
-extern ValuePairsTransformSet *last_vp_transset;
}
%name-prefix "afamqp_"
diff --git a/modules/afmongodb/afmongodb-grammar.ym b/modules/afmongodb/afmongodb-grammar.ym
index 41fa079..0c8f002 100644
--- a/modules/afmongodb/afmongodb-grammar.ym
+++ b/modules/afmongodb/afmongodb-grammar.ym
@@ -29,14 +29,10 @@
%code {
-#include "cfg-parser.h"
-#include "afmongodb-grammar.h"
+#include "cfg-grammar.h"
#include "plugin.h"
#include "vptransform.h"
-extern LogDriver *last_driver;
-extern ValuePairs *last_value_pairs;
-extern ValuePairsTransformSet *last_vp_transset;
}
%name-prefix "afmongodb_"
diff --git a/modules/afsql/afsql-grammar.ym b/modules/afsql/afsql-grammar.ym
index ec8241e..2bcc133 100644
--- a/modules/afsql/afsql-grammar.ym
+++ b/modules/afsql/afsql-grammar.ym
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2002-2012 BalaBit IT Ltd, Budapest, Hungary
- * Copyright (c) 1998-2012 Balázs Scheidler
+ * Copyright (c) 2002-2013 BalaBit IT Ltd, Budapest, Hungary
+ * Copyright (c) 1998-2013 Balázs Scheidler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
@@ -30,13 +30,12 @@
%code {
#include "afsql.h"
+#include "cfg-grammar.h"
#include "cfg-parser.h"
#include "afsql-grammar.h"
#include "messages.h"
#include "plugin.h"
-extern LogDriver *last_driver;
-
}
%name-prefix "afsql_"
--
1.7.10.4
More information about the syslog-ng
mailing list