Date | Commit message (Collapse) |
|
FreeBSD not only uses different values than Linux for TCP
states, but different names, too. To ease writing portable code
between the OSes, do more CPP metaprogramming via extconf.rb
and define a common hash supported on both OSes.
Putting all this in a hash allows for easy dumping and mapping
in an OS-neutral way, since the actual TCP states are
OS-independent.
|
|
Of course these fields are not portable between Linux and FreeBSD,
but they should remain ABI-compatible for future versions of each OS.
Tested on FreeBSD 10.3-RELEASE i386
TCP state names will be another problem...
|
|
Neither the GCC nor libatomic_ops URLs are valid, anymore.
Update them to the latest versions and ensure the URLs themselves
are visible in documentation as links to external sites.
Additionally, the current cgit installation on bogomips.org will
soon be replaced by a CSS-free web-based viewer.
Also, correct the reference to "LGPL-2.1+" while we're at it
and add references to the nntp:// mail archives.
|
|
The linux/tcp.h header may not exist on alternative libc
implementations such as musl.
Noticed-by: Doug Forster <doug.forster@gmail.com>
|
|
__sync_lock_test_and_set might not be the correct check after all,
but __sync_val_compare_and_swap probably is. At least this is
what Ruby 2.0.0 uses to check and attempt -march=i486 on.
|
|
Attempting to test for CMPXCHG on x86 should allow this check to
fail on i386 systems. We also won't need try_run as a result,
enabling cross-compilation. The configure.in check in Ruby
1.9.3 does something similar and that's far more widely used
than raindrops is.
|
|
This appears to cause __BSD_VISIBLE to not be defined,
which is required for MAP_ANON to be visible in
sys/mman.h
Thanks for Aleksandar Simic for the hint and Troex Nevelin
for the bug report!
|
|
dir_config may be used to build for libatomic_ops. The
previous use of dir_config was from back when I didn't
understand mkmf.
This means you can now use:
gem install raindrops -- --with-atomic_ops-dir=/usr/local
If you libatomic_ops library was installed in /usr/local
instead of /usr
|
|
We no longer use it.
|
|
It can detect cross-thread close() calls
|
|
This allows limited resizing of the Raindrops memory
area since we always over-allocate due to the required
page aligment for mmap.
It would be nice if mremap() worked with MAP_SHARED,
but it does not and triggers a bus error when attempting
to access the new area.
ref: https://bugzilla.kernel.org/show_bug.cgi?id=8691
|
|
Nobody uses i386 anymore (especially not with Ruby!),
but some systems like FreeBSD 7.0 still target GCC at
i386 by default, so we force GCC to use a slightly
more modern instruction set and allow it to use
atomic builtins.
|
|
This allows non-GCC 4.x users to experience Raindrops.
|
|
|