This package is Ruby 1.9 based release. And this new release has several features and some incompatibility. Please refer changes from Ruby 1.8.7: http://svn.ruby-lang.org/repos/ruby/tags/v1_9_1_0/NEWS http://svn.ruby-lang.org/repos/ruby/tags/v1_9_2_0/NEWS *Note* NetBSD isn't "supported" but "perhaps" platform by Ruby. Please refer about it "Supported Platform" in http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/.
39 lines
1.3 KiB
Text
39 lines
1.3 KiB
Text
$NetBSD: patch-as,v 1.1.1.1 2010/09/12 03:50:06 taca Exp $
|
|
|
|
Handle 64bit size of time_t.
|
|
|
|
--- thread_pthread.c.orig 2010-07-22 13:13:57.000000000 +0000
|
|
+++ thread_pthread.c
|
|
@@ -17,6 +17,12 @@
|
|
#include <sys/resource.h>
|
|
#endif
|
|
|
|
+#if SIZEOF_TIME_T == 8
|
|
+#define FMT_TIME_T "lld"
|
|
+#else
|
|
+#define FMT_TIME_T "ld"
|
|
+#endif
|
|
+
|
|
static void native_mutex_lock(pthread_mutex_t *lock);
|
|
static void native_mutex_unlock(pthread_mutex_t *lock);
|
|
static int native_mutex_trylock(pthread_mutex_t *lock);
|
|
@@ -620,7 +626,7 @@ native_sleep(rb_thread_t *th, struct tim
|
|
}
|
|
}
|
|
|
|
- thread_debug("native_sleep %ld\n", tv ? tv->tv_sec : -1);
|
|
+ thread_debug("native_sleep %" FMT_TIME_T "\n", tv ? tv->tv_sec : -1);
|
|
GVL_UNLOCK_BEGIN();
|
|
{
|
|
pthread_mutex_lock(&th->interrupt_lock);
|
|
@@ -642,8 +648,8 @@ native_sleep(rb_thread_t *th, struct tim
|
|
}
|
|
else {
|
|
int r;
|
|
- thread_debug("native_sleep: pthread_cond_timedwait start (%ld, %ld)\n",
|
|
- (unsigned long)ts.tv_sec, ts.tv_nsec);
|
|
+ thread_debug("native_sleep: pthread_cond_timedwait start (%"
|
|
+ FMT_TIME_T ", %ld)\n", ts.tv_sec, ts.tv_nsec);
|
|
r = pthread_cond_timedwait(&th->native_thread_data.sleep_cond,
|
|
&th->interrupt_lock, &ts);
|
|
if (r && r != ETIMEDOUT) rb_bug_errno("pthread_cond_timedwait", r);
|