Commit Graph

163 Commits

Author SHA1 Message Date
Jan Pokorný
bd31052e7d
build: persuade git-version-gen vMAJOR.MINOR tags just miss .0
Recent "v1.0" discovered this discrepancy propagated all around
and also this is not very compatible with the logic of commit 26d3911.

Treat missing "patch" component of the version as an implicit zero
to make such oddity go away.

Adjust spec file generation accordingly.
2016-04-04 16:08:18 +02:00
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
Chrissie Caulfield
67af307953 Merge pull request #196 from jnpkrn/demystify-qblog.h
Low: explain mysterious lines in a public header (qblog.h)
2016-04-01 16:01:14 +01:00
Jan Pokorný
8e9a296154
build: add flags for splint: +showscan +showsummary 2016-03-17 15:13:44 +01:00
Jan Pokorný
82db489ee0
build: reorder LINT_FLAGS in a more logical way 2016-03-17 15:13:20 +01:00
Svante Signell
6bd3f0865a Add Hurd support
* configure.ac: Define QB_GNU.
  Add a check for a working clock_getres for the CLOCK_MONOTONIC
  option defining HAVE_CLOCK_GETRES_MONOTONIC.

  * lib/log_thread.c: Replace second argument of
  qb_log_thread_priority_set(): logt_sched_param.sched_priority by 0
  when not supported by the OS.

  * lib/util.c: Use the CLOCK_REALTIME option in clock_getres() if
  HAVE_CLOCK_GETRES_MONOTONIC os not defined.
2016-03-17 13:47:16 +01:00
Jan Pokorný
464817579e
docs: {html,man}.dox.in: extract common parts to common.dox 2016-03-17 13:29:28 +01:00
Jan Pokorný
f5ed676fe9
build: be more restrictive about QB_HAVE_ATTRIBUTE_SECTION
That's because the code relies on (fairly unportable) treatment by the
linker, specifically ld linker from binutils suite:

    <https://sourceware.org/binutils/docs/ld/Orphan-Sections.html>

and without that in place, QB_HAVE_ATTRIBUTE_SECTION cannot be enabled
as the __{start,stop}_SECNAME extern references in qb/qblog.h will not
get resolved at the link time.
2016-03-04 15:42:22 +01:00
Jan Pokorný
e490932907
build: GCC < 4.6 does not support diagnostic push/pop pragmas
Better to get sort of a spurious warning then to possibly mess up
with a warnings safety net.

Reported by Chrissie (thanks).
2016-02-22 14:51:19 +01:00
Chrissie Caulfield
c242bada46 Merge pull request #177 from jnpkrn/changing-syslog-identifier-nicer
Changing syslog identifier + testing syslog, preferred edition
2016-02-18 15:32:33 +00:00
Jan Pokorný
642f74de61
Feature: allow changing the identifier for syslog (+tests)
Original "qb_log_ctl" interface had to be extended for passing read-only
strings (new parameter), resulting in new "qb_log_ctl2" function, which
is what qb_log_ctl calls into with the new parameter set to NULL.
This ensures backward compatibility.

A new QB_LOG_CONF_IDENT configuration directive for the mentioned
interface is added with a goal to set new internal identifier
that is, notably, used for syslog sink.  This allows for switching
the identification without a need to reinitialize logging subsystem,
akin to changing target logging facility.

Also a brand new concept of testing syslog sink in particular is
introduced (finally).  During initial trial&error stage, it used
LD_PRELOAD hack but it seems that libtool is sophisticated enough
that no such extra intervention is needed and the desired symbol
resolution Just Works (tm).  However, the technique is highly
non-portable (there is even a warning about that from libtool,
which is partially on purpose as the _syslog_override.so should
rather be explicit it is by no mean a regular library) and hence
the syslog tests have to be enabled with explicit

    ./configure --enable-syslog-tests

rather than possibly break on untested platforms (far too many).
The concept can be extended upon, but initially, just the new
feature is being tested.

Post-review: thanks Chrissie for a suggestion how to deal with
extract-arg-and-forget in a less intrusive way (no defines).
2016-02-18 11:30:14 +01:00
Jan Pokorný
4f6c235470
build: avoid too keen -Wmissing-format-attribute warning
Grouped with pre-existing -Wsuggest-attribute=format treatment.
2016-02-12 23:33:13 +01:00
Jan Pokorný
ea35cfaa61
build: avoid too keen -Wsuggest-attribute=format warning
With gcc 5.3.1 20151207:
> log.c: In function 'cs_format':
> log.c:182:2: warning: function might be possible candidate for
>              'gnu_printf' format attribute [-Wsuggest-attribute=format]
>   len = vsnprintf(str, QB_LOG_MAX_LEN, cs->format, ap_copy);
>   ^

We certainly don't want to disable that warning globally so make use of
diagnostic pragmas for GCC instead in one instance that we cannot
annotate properly.

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2016-02-03 15:40:11 +01:00
chrissie-c
ea0345428e Merge pull request #164 from kgaillot/fixes
Improvements to build process
2016-01-11 15:31:43 +00:00
Ruben Kerkhof
f15407b9e2 configure.ac: remove an unused DEFINE 2015-12-16 20:07:23 +01:00
Ken Gaillot
5e38df0b74 Update last reference to quarterback-devel mailing list 2015-09-11 17:15:22 -05:00
Helge Deller
85082aa059 Fix alignment issues on hppa
libqb fails to build on the hppa architecture, because the built-in
testcases fail as can be seen here:
http://buildd.debian-ports.org/status/fetch.php?pkg=libqb&arch=hppa&ver=0.17.0-2&stamp=1409458262

I did analyzed why they fail, and the reason is that on hppa we have
somewhat more complicated requirements (e.g. alignments) which needs to
be followed in order to mmap shared pages between processes. It's
different than what can be done compared to ia64 and sparc.
The attached patch fixes libqb on the hppa architecture and with it all
testcases finish successful.

By the way, I fixed a small typo in configure.ac too where arm platforms
prints "ia64"...

Forwarded-From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760199
Signed-off-by: Christoph Berg <myon@debian.org>
2015-04-24 12:26:01 +02:00
Ruben Kerkhof
5279aa3b5f Fix detection of warning flags for clang
Using ./configure CC=clang, the following flags are detected
as supported:

checking whether clang supports "-Wgnu89-inline"... yes
checking whether clang supports "-Wno-strict-aliasing"... yes

Which results in a lot of warnings during make:

warning: unknown warning option '-Wunsigned-char' [-Wunknown-warning-option]
warning: unknown warning option '-Wgnu89-inline' [-Wunknown-warning-option]

Clang doesn't support these flags, but the compile check returns a
warning, not an error:

configure:16649: checking whether clang supports "-Wunsigned-char"
configure:16662: clang -E  -Wunsigned-char conftest.c
warning: unknown warning option '-Wunsigned-char' [-Wunknown-warning-option]
1 warning generated.
configure:16662: $? = 0
configure:16663: result: yes
2015-01-19 21:27:57 +01:00
Angus Salkeld
6f382aaade Add internal support for the new __atomic gcc builtins
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 10:15:55 +10:00
Angus Salkeld
d782f4216b Rename the configure macros from atomic to sync
This is so I can add support for the new atomic's which
are named __atomic.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 09:45:50 +10:00
Andrei Belov
e7d4508483 Typo fixed in configure
Hello.
2013-04-10 19:01:33 +10:00
Angus Salkeld
7667536626 Deal better with corrupt blackbox files.
fixes #59
Thanks to Jan Friesse for the reproducer.
https://github.com/jfriesse/csts/blob/master/tests/fplay-segfault.sh

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-02 13:52:57 +11:00
Angus Salkeld
c445c06620 Properly discover SO_NOSIGPIPE and MSG_SIGNAL
bug #57
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-03-12 21:13:47 +11:00
Angus Salkeld
185f9cff21 Fedora's splint has a strange syntax error, don't fail on it.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-04 15:56:02 +11:00
Виноградов Василий
f44efc4529 Get libqb building on cygwin.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-09-07 09:14:07 +10:00
Angus Salkeld
c7810b38b1 Remove IPC_NEEDS_RESPONSE_ACK and turn off shm ipc on solaris
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-31 14:53:38 +10:00
Angus Salkeld
f6f50a9d38 Define unix path max for openbsd
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-31 13:55:29 +10:00
Angus Salkeld
939c1fa7d4 Only turn on ipc_needs_response_ack=yes for solaris
Hopefully I can kill this option.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-31 13:43:04 +10:00
Angus Salkeld
924ad01058 openbsd has a different UNIX_PATH_MAX
103 other bsd's are 108

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 22:30:24 +10:00
Angus Salkeld
a55554efb1 LOG: change qb_vsprintf_serialize() into qb_vsnprintf_serialize()
This is to prevent overwriting the ringbuffer.
Also remove stpcpy() as it is not used anymore.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 21:40:40 +10:00
Angus Salkeld
f9a272870d Turn off attribute_section on netbsd
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 12:27:20 +10:00
Angus Salkeld
83062001f7 Add a config check for pthread_mutexattr_setpshared
Not available on netbsd

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 10:22:00 +10:00
Fabio M. Di Nitto
5e16bcd004 build: fix libqb.pc creation and make maintainer-clean
LIB_RT is unnecessary around. AC_CHECK_LIBS will do the right thing

similar for the other libs that are all exported via LIBS

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-08-27 15:07:36 +02:00
Fabio M. Di Nitto
7fe0d50b14 build: remove bashism in cc support check
this is required for all systems that don't use bash for /bin/sh

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-24 22:01:31 +10:00
Angus Salkeld
1e497d273c Remove color-tests and parallel-tests automake options.
This is just too painful for buildsystems like koji and travis.
You can't get access to the detailed output (error logs) that
otherwise be printed to screen.
I can't find a way to disable them on the command line (that
would be the best solution).

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-22 10:27:38 +10:00
Angus Salkeld
e4d33aba40 Turn off attribute_section on solaris
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 15:26:15 +10:00
Angus Salkeld
9956fe29ff LOG: fix the printing of %p in the blackbox
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-04 14:54:39 +10:00
Angus Salkeld
1e81530332 IPC: On bsd's use the notifier for responses
The point of this is to catch connection failures
more reliably.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-01 11:12:44 +10:00
Angus Salkeld
2f4fa09b1c config: use newer AC_COMPILE_IFELSE()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-31 22:08:16 +10:00
Angus Salkeld
33b582aad7 Remove strerror out of check_funcs
We only use strerror_r

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 19:14:21 +10:00
Angus Salkeld
4208a4b88b Add replacement function stpcpy
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 19:10:13 +10:00
Angus Salkeld
369e2614a9 Add missing AC_TYPE_UINT16_T to configure.ac
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:44:19 +10:00
Angus Salkeld
fe8014b379 Use AC_FUNC_STRERROR_R and STRERROR_R_CHAR_P
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:41:43 +10:00
Angus Salkeld
76582618cf Add stpcpy strcasecmp to the check_funcs
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:33:46 +10:00
Angus Salkeld
2b49dc7030 Move some conditional defines into code (from the configure script)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:33:03 +10:00
Angus Salkeld
847741c853 Remove some unused configure checks
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:31:02 +10:00
Angus Salkeld
aaae0a3c31 Check for union semun properly
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 13:35:48 +10:00
Angus Salkeld
c41f2c93a0 Add a tool to dump the blackbox.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 11:16:00 +10:00
Angus Salkeld
7f7a009103 configure.ac tweaks
Thanks again to Igor Pashev.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:43:33 +10:00
Angus Salkeld
259021414a SUN_LEN() macro is present if __EXTENSIONS__ is defined on Illumos
A bit reworked but originally from Igor Pashev:
84c47f8160

Note: __EXTENSIONS__ also defines _GNU_SOURCE, so removing it as well.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:37:04 +10:00
Angus Salkeld
ce1da1f28f Get the example socket includes right.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 09:51:28 +10:00
Angus Salkeld
26491555ef POLL: seperate out the poll/epoll and add kqueue
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 00:26:20 +10:00
Jan Friesse
d99c585941 Test existence of getpeer* functions
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-03 21:23:18 +10:00
Jan Friesse
59784de1e1 NetBSD doesn't have semun defined
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-03 20:49:56 +10:00
Angus Salkeld
3d291540b1 Cleanup the selection of semaphores to use
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-27 20:57:06 +11:00
Angus Salkeld
1af214d91d Try and improve the portability on bsd variants.
Also add a QB_IPC_NATIVE type that selects the best ipc type available.

Signed-off-by: Angus <angus@anguss-mac-mini>
2012-03-24 22:43:37 +11:00
Angus Salkeld
f21cdb5a57 LOG: turn off __attribute__(section) for powerpc (not working)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 20:40:25 +11:00
Angus Salkeld
002f009941 Remove timerfd usage and go back to timelist.
timefd is using too much cpu and it is using up
file descriptors.

timelist is also more portable and now I have less
code to maintain.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-24 11:40:45 +11:00
Angus Salkeld
7a6382f0b6 Use safer versions of string functions (strcpy -> strlcpy)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-08 22:00:49 +11:00
Angus Salkeld
ab3dc60f7f Merge some portability changes from the mingw branch
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-21 14:23:43 +11:00
Angus Salkeld
3554d145fc Re-add new automake options
I like the automake options (and encourage other developers to
install the neccessary autotools).

Here is a handy script to install the newest autotools
into a private directory (if you can't get them pre-packaged).
http://people.redhat.com/meyering/autotools-install

autotools-install --prefix=$HOME/autotools --skip-check

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-21 14:23:23 +11:00
Andrew Beekhof
61d166abbc Support compilation on Mac OSX
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-19 22:16:30 +11:00
Angus Salkeld
30ba4cee83 make -rt configurable (not needed on mac)
Thanks to Andrew Beekhof

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-19 22:12:08 +11:00
Angus Salkeld
b69ca79c7f By default don't build in the slow benchlog
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-11-25 11:12:27 +11:00
Angus Salkeld
e1e83aa746 Move simple-log.c to examples/
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 22:40:26 +11:00
Angus Salkeld
1591075873 LOG: serialize the va_list, don't snprintf
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 10:29:48 +10:00
Angus Salkeld
ea8dfea7a0 LOG: allow the thread priority to be set.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-07 22:37:42 +10:00
Angus Salkeld
0cb84fcda2 configure: improve arch & os detection output.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-26 23:29:19 +10:00
Angus Salkeld
4a3536e72c Re-fix mmap() woes on sparc.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-07 19:53:26 +10:00
Angus Salkeld
5b5a6c65d4 Make building a bit quieter by default.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:40:50 +10:00
Jim Meyering
8ac48bac1b avoid autoconf warning
Autoconf warned about this:
configure.ac:72: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE\
  call detected in body
That's warning about the use via AC_COMPILE_IFELSE without
specifying a language.  The easiest way to work around that is
to avoid the use of CC altogether and instead to use the preprocessor.
* configure.ac (cc_supports_flag): Use AC_PREPROC_IFELSE in place
of AC_COMPILE_IFELSE (and CPPFLAGS in place of CFLAGS).

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-17 21:32:29 +10:00
Jim Meyering
58bfc75dc6 make the tests run in parallel
I ran "make check" in libqb and watched impatiently ;-)
as the tests ran in serial on my multi-core system.
If you add automake's "parallel-tests" option below, they'll
run in parallel.

The color-tests option makes it so the "PASS" and "FAIL" words
are colored green and red respectively.  Nice, but no big deal.
Similarly nice-to-have is the "dist-xz" option.
That makes is so when you run "make dist" it creates xz-compressed
tarballs in addition to the usual gzip-compressed ones.
The advantage of also using xz is that it compresses significantly better:

    $ du -sh *z
    1.2M    libqb-0.4.1.75-3737-dirty.tar.gz
    812K    libqb-0.4.1.75-3737-dirty.tar.xz

Now, whenever a project releases both gzip-compressed and
xz-compressed tarballs, I always download only the latter, smaller ones.
Not only does it save time on the download (minimal in this case),
but it occupies less space on disk and uncompresses faster.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-17 21:25:46 +10:00
Angus Salkeld
d8b1c2564c Compile on FreeBSD
Also re-run autoscan.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-15 14:01:36 +10:00
Angus Salkeld
dc0865ba61 TEST: make a way of testing both with and without __attribute__((section))
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 22:21:39 +10:00
Angus Salkeld
17bdc93f88 LOG: fix the building of write_logs.c (for bench-log)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:58:29 +10:00
Angus Salkeld
b7e83fd3b2 LOG: add dynamic callsites (for platforms that don't support __attribute__(section)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:05:38 +10:00
Angus Salkeld
9aa50b2ece LOG: fix shared library callsites
This finds all the callsites in shared libraries
(using dl_iterate_phdr()) at the time qb_log_init()
is called.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>

Conflicts:

	lib/log.c
2011-04-06 22:09:46 +10:00
Angus Salkeld
cf27f4f6b4 BUILD: only set -g and -O options if explicitly requested.
compiler debug & optimization flags are only set with either
  --enable-debug or --enable-coverage.
 This prevents defaults and environmental flags from
 been overridden.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-01-31 11:25:32 +11:00
Angus Salkeld
957b1a81d8 Remove unneccessary check for library "dl"
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-01-09 17:23:37 +11:00
Angus Salkeld
487f611cb9 BUILD: improve the rpm building
copy corosync's rpm build system.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-01-09 17:22:24 +11:00
The Quarterback Library Release Team
f647c79693 Bump version to 0.4.0
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2011-01-05 21:56:53 +11:00
Angus Salkeld
b07b65df42 IPC: change service instance from handle to pointer.
Mainly to be consistent with the other objects.

Also:
- splint warnings(-weak) are now zero.
- Added a reference counter to replace the handle.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-03 21:41:05 +11:00
Angus Salkeld
920a927116 Cleanup config defines & add a check_all script
Run:
./check_all
to build with and without some common configurations.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-01 22:05:46 +11:00
Angus Salkeld
dc08661297 LOOP: add support for timerfd
If available use timerfd_create() as it is
much more accurate than tlist.h

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-01 10:14:08 +11:00
Angus Salkeld
cdc953384f Fix or ignore splint errors
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-22 14:50:04 +11:00
Angus Salkeld
cf12f09b31 fix some build issues on FreeBSD
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-22 14:49:54 +11:00
Angus Salkeld
ca8fd021f3 TEST: add glib mainloop option to bms
Note: glib is only linked into the test app, so
libqb not dependant on glib. This is just testing
integration.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-20 11:31:44 +11:00
Angus Salkeld
875a4f8d53 ATOMIC: fix the memory barrier setup.
This was horribly broken.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-20 11:31:44 +11:00
Angus Salkeld
9d8d6bfdce LINT: get the lint target working.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 22:36:08 +11:00
The Quarterback Library Release Team
01838c18c6 Bump version to 0.3.0
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2010-10-19 12:46:11 +11:00
Angus Salkeld
43d8b36518 Add atomic operations.
This was initially copied from glib. How ever I have
simplified it to only support proper atomic operations
with gcc builtin __sync calls. The backup is pthread_spin_lock().
I have also obviously namespaced the code to qb_.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-18 11:24:07 +11:00
The Quarterback Library Release Team
21fc479b92 Bump version to 0.2.0
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2010-10-18 10:07:46 +11:00
Angus Salkeld
7384c0a823 configure: re-add check for pthread_spin_lock
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-14 10:06:44 +11:00
Angus Salkeld
487eb57dd2 LOOP: add epoll support
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
69f2c88081 IPC: add a service_id and merge qb_ipcs_create() + qb_ipcs_service_handlers_set()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-02 21:06:12 +10:00
Angus Salkeld
22c46a341a cleanup the configure script.
Remove (now) unused checks.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-30 21:26:50 +10:00
Angus Salkeld
e5ffd5a210 BSD: port new changes to BSD
- check for doxygen
- no RLIMIT_MSGQUEUE on bsd
- change ENODATA to ENOMSG

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-03 14:04:00 +10:00
Angus Salkeld
8a6b8d78db IPC: rewrite (simpler API & more structured layout).
- implement using posix message queues
- implement using sys-v message queues
- implement shared memory ringbuffers
- add auth via unix sockets
- add items to the TODO

This is still a bit rough, more work to follow...

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-08-23 12:46:36 +10:00
Angus Salkeld
5221880227 automake: check for more headers
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-08-22 22:06:59 +10:00
Angus Salkeld
7cfb5e472f Roll all little libs into libqb.
This really makes things simpler (to produce and use).

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-05-27 11:34:58 +10:00