summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-28 17:40:15 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-28 17:40:15 +0200
commit6f9773f1faa79c87c4c35c679455151d4e6d9e00 (patch)
tree4defcb64087bdee40fb248131f624ff4f26f12d1
parenteefc9b6eb69c130015955cfb15dc45e36e431d5a (diff)
downloadrsyslog-6f9773f1faa79c87c4c35c679455151d4e6d9e00.tar.gz
rsyslog-6f9773f1faa79c87c4c35c679455151d4e6d9e00.tar.xz
rsyslog-6f9773f1faa79c87c4c35c679455151d4e6d9e00.zip
bugfix: rsyslog did not build with --disable-regexp configure option
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=243
-rw-r--r--ChangeLog2
-rw-r--r--template.c12
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index dc6b9872..cbc91b87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+- bugfix: rsyslog did not build with --disable-regexp configure option
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=243
- bugfix: PRI was invalid on Solaris for message from local log socket
- enhance: added $BOM system property to ease writing byte order masks
- bugfix: RFC5424 parser confused by empty structured data
diff --git a/template.c b/template.c
index cc339653..1e1a6c3f 100644
--- a/template.c
+++ b/template.c
@@ -42,10 +42,13 @@
/* static data */
DEFobjCurrIf(obj)
DEFobjCurrIf(errmsg)
-DEFobjCurrIf(regexp)
DEFobjCurrIf(strgen)
+#ifdef FEATURE_REGEXP
+DEFobjCurrIf(regexp)
static int bFirstRegexpErrmsg = 1; /**< did we already do a "can't load regexp" error message? */
+#endif
+
static struct template *tplRoot = NULL; /* the root of the template list */
static struct template *tplLast = NULL; /* points to the last element of the template list */
static struct template *tplLastStatic = NULL; /* last static element of the template list */
@@ -549,10 +552,9 @@ static int do_Parameter(unsigned char **pp, struct template *pTpl)
cstr_t *pStrB;
struct templateEntry *pTpe;
int iNum; /* to compute numbers */
- rsRetVal iRetLocal;
-
#ifdef FEATURE_REGEXP
/* APR: variables for regex */
+ rsRetVal iRetLocal;
int longitud;
unsigned char *regex_char;
unsigned char *regex_end;
@@ -1084,11 +1086,13 @@ void tplDeleteAll(void)
break;
case FIELD:
/* check if we have a regexp and, if so, delete it */
+#ifdef FEATURE_REGEXP
if(pTpeDel->data.field.has_regex != 0) {
if(objUse(regexp, LM_REGEXP_FILENAME) == RS_RET_OK) {
regexp.regfree(&(pTpeDel->data.field.re));
}
}
+#endif
break;
}
/*dbgprintf("\n");*/
@@ -1137,12 +1141,14 @@ void tplDeleteNew(void)
free(pTpeDel->data.constant.pConstant);
break;
case FIELD:
+#ifdef FEATURE_REGEXP
/* check if we have a regexp and, if so, delete it */
if(pTpeDel->data.field.has_regex != 0) {
if(objUse(regexp, LM_REGEXP_FILENAME) == RS_RET_OK) {
regexp.regfree(&(pTpeDel->data.field.re));
}
}
+#endif
break;
}
/*dbgprintf("\n");*/