[前][次][番号順一覧][スレッド一覧]

ruby-changes:59146

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 10 Dec 2019 11:48:11 +0900 (JST)
Subject: [ruby-changes:59146] ec931ee9e1 (master): forward declare struct timespec

https://git.ruby-lang.org/ruby.git/commit/?id=ec931ee9e1

From ec931ee9e13b939f6693032564ee9beeec5a4a1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Tue, 10 Dec 2019 11:42:29 +0900
Subject: forward declare struct timespec

... like we do so for struct timeval at several hundreds of lines above.
Depending on OS/Compiler, this can be the first place for the struct to
appear.  To make sure the struct is global, we need a forward
declaration at this point.

diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 90d1254..2f60fb5 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -952,6 +952,7 @@ VALUE rb_mutex_unlock(VALUE mutex); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L952
 VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
 VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
 /* time.c */
+struct timespec;
 void rb_timespec_now(struct timespec *);
 VALUE rb_time_new(time_t, long);
 VALUE rb_time_nano_new(time_t, long);
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]