mirror of
https://github.com/rsyslog/rsyslog.git
synced 2026-05-07 17:00:50 +02:00
fixed probem with my regex merge; added compile time option output to -v
option display
This commit is contained in:
parent
db8c41e2d5
commit
f820d0ac23
1
NEWS
1
NEWS
@ -10,6 +10,7 @@ Version 1.10.0 (RGer), 2005-09-??
|
||||
- added the FROMHOST property in the template processor, which could
|
||||
previously not be obtained. Thanks to Cristian Testa for pointing
|
||||
this out and even providing a fix.
|
||||
- added display of compile-time options to -v output
|
||||
---------------------------------------------------------------------------
|
||||
Version 1.0.0 (RGer), 2005-09-12
|
||||
- changed install doc to cover daily cron scripts - a trouble source
|
||||
|
||||
@ -49,6 +49,10 @@ ifeq ($(strip $(FEATURE_DB)), 1)
|
||||
WITHDB=-DWITH_DB
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(FEATURE_REGEXP)), 1)
|
||||
F_REGEXP=-DFEATURE_REGEXP
|
||||
endif
|
||||
|
||||
# Include MySQL client lib if DB is selected
|
||||
ifdef WITHDB
|
||||
LIBS = -lmysqlclient -L/usr/local/lib/mysql
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#LDFLAGS= -g -Wall -fno-omit-frame-pointer
|
||||
#CFLAGS= -DSYSV -g -Wall -fno-omit-frame-pointer
|
||||
|
||||
CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce -I/usr/local/include $(NOLARGEFILE) $(WITHDB)
|
||||
CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce -I/usr/local/include $(NOLARGEFILE) $(WITHDB) $(F_REGEXP)
|
||||
LDFLAGS= -s
|
||||
|
||||
# There is one report that under an all ELF system there may be a need to
|
||||
|
||||
10
syslogd.c
10
syslogd.c
@ -2325,6 +2325,16 @@ int main(argc, argv)
|
||||
break;
|
||||
case 'v':
|
||||
printf("rsyslogd %s.%s\n", VERSION, PATCHLEVEL);
|
||||
printf("compiled with:\n");
|
||||
#ifdef FEATURE_REGEXP
|
||||
printf("\tFEATURE_REGEXP\n");
|
||||
#endif
|
||||
#ifdef WITH_DB
|
||||
printf("\tFEATURE_DB\n");
|
||||
#endif
|
||||
#ifndef NOLARGEFILE
|
||||
printf("\tFEATURE_LARGEFILE\n");
|
||||
#endif
|
||||
exit(0);
|
||||
case '?':
|
||||
default:
|
||||
|
||||
46
template.c
46
template.c
@ -286,16 +286,19 @@ static int do_Parameter(char **pp, struct template *pTpl)
|
||||
} else {
|
||||
/* now we fall through the "regular" FromPos code */
|
||||
#endif /* #ifdef FEATURE_REGEXP */
|
||||
iNum = 0;
|
||||
while(isdigit(*p))
|
||||
iNum = iNum * 10 + *p++ - '0';
|
||||
pTpe->data.field.iFromPos = iNum;
|
||||
/* skip to next known good */
|
||||
while(*p && *p != '%' && *p != ':') {
|
||||
/* TODO: complain on extra characters */
|
||||
dprintf("error: extra character in frompos: '%s'\n", p);
|
||||
++p;
|
||||
iNum = 0;
|
||||
while(isdigit(*p))
|
||||
iNum = iNum * 10 + *p++ - '0';
|
||||
pTpe->data.field.iFromPos = iNum;
|
||||
/* skip to next known good */
|
||||
while(*p && *p != '%' && *p != ':') {
|
||||
/* TODO: complain on extra characters */
|
||||
dprintf("error: extra character in frompos: '%s'\n", p);
|
||||
++p;
|
||||
}
|
||||
#ifdef FEATURE_REGEXP
|
||||
}
|
||||
#endif /* #ifdef FEATURE_REGEXP */
|
||||
}
|
||||
/* check topos (holds an regex if FromPos is "R"*/
|
||||
if(*p == ':') {
|
||||
@ -341,25 +344,28 @@ static int do_Parameter(char **pp, struct template *pTpl)
|
||||
pTpe->data.field.has_regex = 2;
|
||||
}
|
||||
|
||||
/* Finally we move the pointer to the end of the regex so it aint parsed twice or something weird */
|
||||
/* Finally we move the pointer to the end of the regex
|
||||
* so it aint parsed twice or something weird */
|
||||
p = regex_end + 5/*strlen("--end")*/;
|
||||
free(regex_char);
|
||||
}
|
||||
} else {
|
||||
/* fallthrough to "regular" ToPos code */
|
||||
|
||||
#endif /* #ifdef FEATURE_REGEXP */
|
||||
|
||||
iNum = 0;
|
||||
while(isdigit(*p))
|
||||
iNum = iNum * 10 + *p++ - '0';
|
||||
pTpe->data.field.iToPos = iNum;
|
||||
/* skip to next known good */
|
||||
while(*p && *p != '%' && *p != ':') {
|
||||
/* TODO: complain on extra characters */
|
||||
dprintf("error: extra character in frompos: '%s'\n", p);
|
||||
++p;
|
||||
iNum = 0;
|
||||
while(isdigit(*p))
|
||||
iNum = iNum * 10 + *p++ - '0';
|
||||
pTpe->data.field.iToPos = iNum;
|
||||
/* skip to next known good */
|
||||
while(*p && *p != '%' && *p != ':') {
|
||||
/* TODO: complain on extra characters */
|
||||
dprintf("error: extra character in frompos: '%s'\n", p);
|
||||
++p;
|
||||
}
|
||||
#ifdef FEATURE_REGEXP
|
||||
}
|
||||
#endif /* #ifdef FEATURE_REGEXP */
|
||||
}
|
||||
|
||||
/* TODO: add more sanity checks. For now, we do the bare minimum */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user