iv_examples(3): Update the NAME section.

The NAME section is used and parsed by tools such as whatis to display
short summaries.  If it does not follow the format expected by the
tool, it will be ignored.

The iv_examples(3) man page is therefore ignored by whatis, which is
unfortunate.  The trivial patch below updates the NAME section, and
makes the page findable via whatis.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Trade in -fvisibility= for a linker symbol version script.

Since commit "Use -fvisibility= to hide internal ELF symbols.", on
toolchains that support it, we mark all ELF symbols hidden by default,
and explicitly whitelist symbols that we want to be public by
annotating them with IV_API in the C sources (which resets the
visibility of the symbol to 'default').

This is a step in the right direction, but we can do better: Gergely
Nagy <algernon@balabit.hu> suggested that we start using ELF symbol
versioning for ivykis, and this can actually replace our visibility
tricks entirely.

From now on, if the linker supports Sun style symbol version scripts,
we will use a version script to mark all symbols hidden by default,
and tack a version onto the symbols that we do decide to export.
This allows us to make changes to the API/ABI while still supporting
the older API/ABI from the same shared library, which is a plus if
we'll ever need to do this.

The original patch for this was written by Gergely Nagy
<algernon@balabit.hu>, and he should get most if not all of the
credit for this.

Reported-by: Gergely Nagy <algernon@balabit.hu>
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
iv_fd_pump: Replace ->relay_eof in struct iv_fd_pump by a flags bitmask.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
iv_fd_pump: Make iv_fd_pump_init() return void.

Since it can never fail.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
iv_fd_pump: Add man page.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
iv_getaddrinfo: Remove OpenSSL dependency.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
iv_getaddrinfo: Fix building of test application on FreeBSD.

By including <netinet/in.h>.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
kqueue: FreeBSD build fixes.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
configure.ac: Test for both pthread_atfork() and pthread_create().

On Linux, linking against libpthread.so.0 doesn't give you
pthread_atfork(), as the latter is defined in
libpthread_nonshared.a, which doesn't get pulled in if
libpthread.so.0 is pulled in indirectly, e.g. via -lrt, but does
get pulled in if you link against -lpthread, as libpthread.so is
a linker script that references both libpthread.so.0 and
libpthread_nonshared.a.

Therefore, we test for pthread_atfork() in AC_SEARCH_LIBS(), to
make sure that libpthread.so really does get pulled in explicitly
via -lpthread rather than implicitly via another shared library
dependency.

However, on FreeBSD, pthread_atfork() is provided by libc.so, and
so, testing for pthread_atfork() in AC_SEARCH_LIBS() doesn't end up
making the other pthreads functions available in the linking stage.

Work around all of this by testing for both pthread_atfork() and
pthread_create() in configure.ac.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
lib/test/client: Avoid stack overflow due to infinite recursion.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Bump version number to 0.29.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
debian: Conflict/Replace libsyslog-ng-dev (<< 3.3.6~)

syslog-ng 3.3.6 will be patched to support upstream ivykis, so any
version prior to that (and it's snapshots) we need to conflict with
and replace.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
debian: changelog update

Bump the version to 0.29-1, and update the date.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
debian: Add README.source.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge branch 'patched' into debian
debian: gitpkg config update

Use debian/$DEB_REF instead of debian/patched/$DEB_REF, and
v$UPSTREAM_REF-trunk instead of v$UPSTREAM_REF.

We want the trunk, as that does not contain generated files.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
debian: Further gitpkg mods.

We'll be tagging both the patched and the Debian branch, to make
gitpkg happy, and able to export a proper source for us.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
debian: Add a watch file

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
debian: Add a symbol file

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
debian: Minor control updates

Use Breaks/Replaces instead of Conflicts/Replaces, and remove the
Section fro the libivykis0 package, as it duplicates the section
inherited from the source stanza.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>