libqb/include
Jan Pokorný 137b3dea5b
API: introduce alternative, header-based versioning
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
2016-04-01 23:19:40 +02:00
..
qb API: introduce alternative, header-based versioning 2016-04-01 23:19:40 +02:00
.gitignore Cleanup the .gitignore files 2012-05-09 21:43:58 +10:00
Makefile.am build: include: fix extra trailing newline 2016-03-10 22:44:49 +01:00
os_base.h Properly discover SO_NOSIGPIPE and MSG_SIGNAL 2013-03-12 21:13:47 +11:00
tlist.h Unify to QB_TRUE/QB_FALSE a boolean value 2013-01-11 02:01:06 +09:00