summaryrefslogtreecommitdiffstats
path: root/grammar/rainerscript.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-03-13 15:45:29 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-03-13 15:45:29 +0100
commit4c4ca32b6bab140015b8eb1d0386aad4bcc8591a (patch)
tree357c5262fc46cc3aeb1135db9cbd0382df005712 /grammar/rainerscript.c
parenta25a4bc02e2a6e9915677600401ef927f9b58013 (diff)
parent462426844d188e21a402cda78dc33c100e1b394d (diff)
downloadrsyslog-4c4ca32b6bab140015b8eb1d0386aad4bcc8591a.tar.gz
rsyslog-4c4ca32b6bab140015b8eb1d0386aad4bcc8591a.tar.bz2
rsyslog-4c4ca32b6bab140015b8eb1d0386aad4bcc8591a.zip
Merge branch 'v7-stable'
Conflicts: configure.ac doc/manual.html
Diffstat (limited to 'grammar/rainerscript.c')
-rw-r--r--grammar/rainerscript.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 6dbdad63..7ef7bf7f 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -3233,7 +3233,7 @@ cnfDoInclude(char *name)
{
char *cfgFile;
char *finalName;
- unsigned i;
+ int i;
int result;
glob_t cfgFiles;
struct stat fileInfo;
@@ -3269,7 +3269,12 @@ cnfDoInclude(char *name)
return 1;
}
- for(i = 0; i < cfgFiles.gl_pathc; i++) {
+ /* note: bison "stacks" the files, so we need to submit them
+ * in reverse order to the *stack* in order to get the proper
+ * parsing order. Also see
+ * http://bugzilla.adiscon.com/show_bug.cgi?id=411
+ */
+ for(i = cfgFiles.gl_pathc - 1; i >= 0 ; i--) {
cfgFile = cfgFiles.gl_pathv[i];
if(stat(cfgFile, &fileInfo) != 0) {
char errStr[1024];