Print libevent version with -V option

This commit is contained in:
tedbullock 2007-11-17 00:50:56 +00:00
parent 4115dd2a14
commit 07ff4bbac9
2 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,7 @@
2007-11-16 Ted Bullock <tbullock@canada.com> 2007-11-16 Ted Bullock <tbullock@canada.com>
* configure.ac: Enable libevent dependancy * configure.ac: Enable libevent dependancy
* src/httperf.c: Print libevent version event notification mechanism
2007-11-15 Ted Bullock <tbullock@canada.com> 2007-11-15 Ted Bullock <tbullock@canada.com>

View File

@ -67,6 +67,11 @@
#include <sys/time.h> #include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
/*
* libevent api
*/
#include <event.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h> #include <object.h>
#include <timer.h> #include <timer.h>
@ -235,6 +240,11 @@ main(int argc, char **argv)
int numRates = 0; int numRates = 0;
/*
* Initialize libevent
*/
event_init();
#ifdef __FreeBSD__ #ifdef __FreeBSD__
/* /*
* This works around a bug in earlier versions of FreeBSD that cause * This works around a bug in earlier versions of FreeBSD that cause
@ -874,7 +884,11 @@ main(int argc, char **argv)
"out" "out"
#endif #endif
" TIME_SYSCALLS.\n", prog_name); " TIME_SYSCALLS.\n", prog_name);
break; printf
("Using libevent-%s for %s event notification system.\n",
event_get_version(), event_get_method());
exit(0);
case 'h': case 'h':
usage(); usage();