Age | Commit message (Collapse) | Author |
|
* configure.ac:
Check for working Solaris/NetBSD-style atomic.h independly on OS.
Add check for GCC-style __sync_*() builtins.
New defines: XS_ATOMIC_GCC_SYNC, XS_ATOMIC_SOLARIS.
Removed define: XS_FORCE_MUTEXES.
* src/atomic_counter.hpp:
(atomic_counter_t::add):
(atomic_counter_t::sub):
* src/atomic_ptr.hpp:
(atomic_ptr_t::xchg):
(atomic_ptr_t::cas):
Use result of these checks.
Preference order:
1. GCC-style __sync_*() builtins
2. Inline asm (x86, x86-64, armv7a)
3. Solaris/NetBSD-style atomic.h, Windows-specific API
4. Fallback to mutex-based implementation
|
|
This patch cleans up a number of obsolete constructs in the build
system, these include:
- Replacing AC_TRY_RUN with AC_RUN_IFELSE for the SOCK_CLOEXEC test
- Using AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER
- Using LT_INIT with the win32-dll parameter instead of the obsolete
AC_PROG_LIBTOOL and AC_LIBTOOL_WIN32_DLL macros
- Removing the unused and obsolete AC_TYPE_SIGNAL check
- Removing the unused alloca.h header check
- Replacing the deprecated INCLUDES macro with AM_CPPFLAGS
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
All polling systems are now checked and corresponding macros set
accordingly (e.g. detection of a working poll() function will define
XS_HAVE_POLL). Additionally if the user selects a specific polling
system via the --with-poller switch a corresponding XS_FORCE_* macro
will be defined. The select() and poll() tests now conditionally include
headers which makes them more robust on various target platforms.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
POSIX threads support is checked using the AX_PTHREAD macro, this
provides improved support and coverage of different platforms. The M4
macros are also moved into the M4 directory.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Define _GNU_SOURCE in addition to the __BSD_VISIBLE on the freebsd-like
hosts. It made in hope to cover cases and obtain the full power of
underlying kernel on "hybrid" systems like Debian GNU/kFreeBSD, when
GLibc (or derived) library lives on top of FreeBSD kernel.
On the "real" FreeBSD it only enables getline(3), and therefore, should
not hurt.
* configure.ac: Define _GNU_SOURCE in addition to the __BSD_VISIBLE for
cover GLibc (or derived) on top of FreeBSD kernel cases, as it is in
Debian GNU/kFreeBSD case.
|
|
The existing code for definining the XS_HAVE_* macros for the polling
mechanism may fail if the platform's `tr' command does not support the
GNU syntax. Replacing the hand-made declaration with autoconf macros
yields the same results on all platforms.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
- Use consistent quoting in M4 macros
- Use portable M4sh shell constructs where possible
- More consistent indentation and line wrapping
- Split lists of files or functions on multiple lines to simplify adding
and removing elements from them
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This simplifies the options for new users; either use libxs APIs or build
with --enable-libzmq and get libzmq 2.1 emulation.
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Follows autotools best practice, configure.in is the old name.
Signed-off-by: Martin Lucina <martin@lucina.net>
|