diff options
author | Andy Wingo <wingo@pobox.com> | 2011-03-29 13:21:44 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-03-29 13:21:44 +0200 |
commit | 8cf49d836ff41838812cba1fd61bfce3fb877144 (patch) | |
tree | 18122aecc92e42ad9baab53933216210dc770e92 /libguile/pthread-threads.h | |
parent | fb6df3ea137eabad25d70219da2c84282883b433 (diff) | |
download | guile-8cf49d836ff41838812cba1fd61bfce3fb877144.tar.gz |
fix compilation with libgc 7.0, 7.1
* configure.ac: Check for GC_pthread_exit and GC_pthread_cancel.
* libguile/gen-scmconfig.c: Write HAVE_GC_PTHREAD_CANCEL and
HAVE_GC_PTHREAD_EXIT into scmconfig.h.
* libguile/pthread-threads.h (scm_i_pthread_exit, scm_i_pthread_cancel):
Only redefine to their GC_pthread_* variants if we have those
functions, which is not the case in libgc < 7.2.
Diffstat (limited to 'libguile/pthread-threads.h')
-rw-r--r-- | libguile/pthread-threads.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libguile/pthread-threads.h b/libguile/pthread-threads.h index c180af252..b5fff834d 100644 --- a/libguile/pthread-threads.h +++ b/libguile/pthread-threads.h @@ -38,8 +38,19 @@ #define scm_i_pthread_self pthread_self #define scm_i_pthread_create GC_pthread_create #define scm_i_pthread_detach GC_pthread_detach + +#if SCM_HAVE_GC_PTHREAD_EXIT #define scm_i_pthread_exit GC_pthread_exit +#else +#define scm_i_pthread_exit pthread_exit +#endif + +#if SCM_HAVE_GC_PTHREAD_CANCEL #define scm_i_pthread_cancel GC_pthread_cancel +#else +#define scm_i_pthread_cancel pthread_cancel +#endif + #define scm_i_pthread_cleanup_push pthread_cleanup_push #define scm_i_pthread_cleanup_pop pthread_cleanup_pop #define scm_i_sched_yield sched_yield |