diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-28 17:40:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-28 17:40:15 +0200 |
commit | 6f9773f1faa79c87c4c35c679455151d4e6d9e00 (patch) | |
tree | 4defcb64087bdee40fb248131f624ff4f26f12d1 /template.c | |
parent | eefc9b6eb69c130015955cfb15dc45e36e431d5a (diff) | |
download | rsyslog-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
Diffstat (limited to 'template.c')
-rw-r--r-- | template.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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");*/ |