build: Support pthread builds without 'pthread_cancel' support (Android).
authorLudovic Courtès <ludo@gnu.org>
Fri, 4 Jul 2014 13:52:15 +0000 (15:52 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 4 Jul 2014 13:52:53 +0000 (15:52 +0200)
commitf184e887a6cb09a97cf34feab30eeba4a28a3ae4
tree10757885e405d96c0e895abd93a477ae4029d3d5
parent8c75d3ae01ed98ccb623bdff1c25cc17c046145c
build: Support pthread builds without 'pthread_cancel' support (Android).

Reported by Sylvain Beucler <beuc@beuc.net>.

* configure.ac: Check for 'pthread_cancel'.
* libguile/threads.c (scm_cancel_thread): Conditionalize on
  !SCM_USE_PTHREAD_THREADS || defined HAVE_PTHREAD_CANCEL.
* test-suite/tests/threads.test (require-cancel-thread): New procedure.
  ("timed joining fails if timeout exceeded", "join-thread returns
  timeoutval on timeout", "cancel succeeds", "handler result passed to
  join", "can cancel self"): Use it.
configure.ac
libguile/threads.c
test-suite/tests/threads.test