From c5061b6116266cb7e74e25fca0517871e8580619 Mon Sep 17 00:00:00 2001 From: nagai Date: Thu, 20 Nov 2003 16:47:30 +0000 Subject: * check existence of "pthread.h" * define is_ruby_native_thread() macro when not HAVE_NATIVETHREAD git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ruby.h') diff --git a/ruby.h b/ruby.h index 9818a3e149..9bd6217bb7 100644 --- a/ruby.h +++ b/ruby.h @@ -672,6 +672,9 @@ static char *dln_libs_to_be_linked[] = { EXTLIB, 0 }; #endif #if defined(HAVE_LIBPTHREAD) +#ifdef HAVE_PTHREAD_H +#include +#endif typedef pthread_t rb_nativethread_t; # define NATIVETHREAD_CURRENT() pthread_self() # define NATIVETHREAD_EQUAL(t1,t2) pthread_equal((t1),(t2)) @@ -682,7 +685,11 @@ typedef DWORD rb_nativethread_t; # define NATIVETHREAD_EQUAL(t1,t2) ((t1) == (t2)) # define HAVE_NATIVETHREAD #endif +#ifdef HAVE_NATIVETHREAD RUBY_EXTERN int is_ruby_native_thread(); +#else +#define is_ruby_native_thread() (1) +#endif #if defined(__cplusplus) } /* extern "C" { */ -- cgit v1.2.3