]> arthur.barton.de Git - bup.git/commit
Handle mincore cross-platform differences
authorRob Browning <rlb@defaultvalue.org>
Fri, 3 Jul 2015 17:34:24 +0000 (12:34 -0500)
committerRob Browning <rlb@defaultvalue.org>
Tue, 14 Jul 2015 01:29:55 +0000 (20:29 -0500)
commit6178db0ca9a784fa9961d2de5b29090c3c4c3e03
tree78e8ee3e6d723386b921ba2af2ec60322462dda1
parente6ee5c9bbee41e7a3b1891e252de89571d0ee717
Handle mincore cross-platform differences

On the BSDs, mincore is defined to return char values rather than
unsigned char values, so test for that and adjust our invocation.

Also check for MINCORE_INCORE, which is used on some platforms to test
the returned status bytes.  When it's found, define
helpers.MINCORE_INCORE appropriately.

Rework the mincore-related code, moving much of the fmincore C code to
Python to avoid dealing with platform-related strerror_r differences,
and replace the _helpers fmincore with a more primitive mincore.

To accommodate the more complicated ./configure testing, require bash,
and use printf -v to (safely) set ac_defined_$name during all calls to
AC_DEFINE so that we can use the discovered values to guard tests during
configuration.

Thanks to Thomas Klausner for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
config/configure
config/configure.inc
lib/bup/_helpers.c
lib/bup/hashsplit.py
lib/bup/helpers.py
lib/bup/t/thashsplit.py