diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-20 16:47:30 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-20 16:47:30 +0000 |
commit | a18d0b9ecb11492da668a105b66e484d9479e3d6 (patch) | |
tree | 9730c1804672b3eee226a8bf3bd166de4d354503 /ruby.h | |
parent | 708323f5ced1e8161ce14fbaacaa3b3ccd16e6ea (diff) | |
download | ruby-a18d0b9ecb11492da668a105b66e484d9479e3d6.tar.gz ruby-a18d0b9ecb11492da668a105b66e484d9479e3d6.tar.xz ruby-a18d0b9ecb11492da668a105b66e484d9479e3d6.zip |
* check existence of "pthread.h"
* define is_ruby_native_thread() macro when not HAVE_NATIVETHREAD
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r-- | ruby.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -672,6 +672,9 @@ static char *dln_libs_to_be_linked[] = { EXTLIB, 0 }; #endif #if defined(HAVE_LIBPTHREAD) +#ifdef HAVE_PTHREAD_H +#include <pthread.h> +#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" { */ |