Mainly as a light-weight alternative to full-blown autoconf/pkg-config
machineries, whereby one can:
* workaround functionality not present in libqb up to 1.0 (inclusive)
- note that this versioning schema is being introduced *after*
1.0.0 release so one cannot tell that version from any older,
but will be able to safely identify any later one (1.0.1+)
and act accordingly
- example:
#if !defined(QB_VER_MAJOR) || ((QB_VER_MAJOR == 1) && (QB_VER_MINOR < 1))
#warning "Feature X not supported"
int do_foo(int arg) { };
#else
int
do_foo(int arg)
{
/* use feature X of libqb */
}
#endif
* make its program report libqb API version it was built with by
emitting QB_VER_STR symbolic string (see tests/print_ver.c for example)
Also added is a print_ver test program to:
* emit how original unparsed version is parsed to particular components
defined in qbconfig.h (QB_VER_{MAJOR,MINOR,PATCH} symbolic integer
constants and QB_VER_REST symbolic string) when being compiled
* emit mentioned QB_VER_STR symbolic string joining the components
back to a single string, plus the components themselves
Resolves: https://github.com/ClusterLabs/libqb/issues/186
On my system I get:
qb store] Duration: 8.289 OPs/sec: 1206381.250
snprintf] Duration: 16.712 OPs/sec: 598368.000
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
My first attempt at this broke "make rpm" - oops.
It seems that we need a common extension for tests to get the
dependancies to work.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This is to try and get a better balance in the amount
of processing between IPC and totem in corosync.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This ringbuffer is usable across processes.
the point is to use this for IPC to provide async
connections from client to server, but with inherient
flow control.
This still needs a bit of clean up, but committing now
for feedback and as it is quite functional.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fix make distcheck
Add qbhash.h to the makefiles
Fix make rpm.
Make sure the makefiles are generatd for hash
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>