mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* internal.h: Define TIMET_MAX and TIMET_MIN here.
* time.c: Remove TIMET_MAX and TIMET_MIN definitions. * thread.c: Ditto. * thread_pthread.c: Remove TIMET_MAX definition. * thread_win32.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9b3d6ad13a
commit
bfb0edbad2
6 changed files with 15 additions and 10 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
Tue Mar 26 23:41:18 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* internal.h: Define TIMET_MAX and TIMET_MIN here.
|
||||||
|
|
||||||
|
* time.c: Remove TIMET_MAX and TIMET_MIN definitions.
|
||||||
|
|
||||||
|
* thread.c: Ditto.
|
||||||
|
|
||||||
|
* thread_pthread.c: Remove TIMET_MAX definition.
|
||||||
|
|
||||||
|
* thread_win32.c: Ditto.
|
||||||
|
|
||||||
Tue Mar 26 22:31:10 2013 Tanaka Akira <akr@fsij.org>
|
Tue Mar 26 22:31:10 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/socket/socket.c (sockaddr_len): return the shortest length for
|
* ext/socket/socket.c (sockaddr_len): return the shortest length for
|
||||||
|
|
|
@ -19,6 +19,9 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define TIMET_MAX (~(time_t)0 <= 0 ? (time_t)((~(unsigned_time_t)0) >> 1) : (time_t)(~(unsigned_time_t)0))
|
||||||
|
#define TIMET_MIN (~(time_t)0 <= 0 ? (time_t)(((unsigned_time_t)1) << (sizeof(time_t) * CHAR_BIT - 1)) : (time_t)0)
|
||||||
|
|
||||||
struct rb_deprecated_classext_struct {
|
struct rb_deprecated_classext_struct {
|
||||||
char conflict[sizeof(VALUE) * 3];
|
char conflict[sizeof(VALUE) * 3];
|
||||||
};
|
};
|
||||||
|
|
3
thread.c
3
thread.c
|
@ -73,9 +73,6 @@
|
||||||
#define THREAD_DEBUG 0
|
#define THREAD_DEBUG 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TIMET_MAX (~(time_t)0 <= 0 ? (time_t)((~(unsigned_time_t)0) >> 1) : (time_t)(~(unsigned_time_t)0))
|
|
||||||
#define TIMET_MIN (~(time_t)0 <= 0 ? (time_t)(((unsigned_time_t)1) << (sizeof(time_t) * CHAR_BIT - 1)) : (time_t)0)
|
|
||||||
|
|
||||||
VALUE rb_cMutex;
|
VALUE rb_cMutex;
|
||||||
VALUE rb_cThreadShield;
|
VALUE rb_cThreadShield;
|
||||||
|
|
||||||
|
|
|
@ -376,8 +376,6 @@ typedef unsigned LONG_LONG unsigned_time_t;
|
||||||
# error cannot find integer type which size is same as time_t.
|
# error cannot find integer type which size is same as time_t.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TIMET_MAX (~(time_t)0 <= 0 ? (time_t)((~(unsigned_time_t)0) >> 1) : (time_t)(~(unsigned_time_t)0))
|
|
||||||
|
|
||||||
static struct timespec
|
static struct timespec
|
||||||
native_cond_timeout(rb_thread_cond_t *cond, struct timespec timeout_rel)
|
native_cond_timeout(rb_thread_cond_t *cond, struct timespec timeout_rel)
|
||||||
{
|
{
|
||||||
|
|
|
@ -516,8 +516,6 @@ typedef unsigned LONG_LONG unsigned_time_t;
|
||||||
# error cannot find integer type which size is same as time_t.
|
# error cannot find integer type which size is same as time_t.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TIMET_MAX (~(time_t)0 <= 0 ? (time_t)((~(unsigned_time_t)0) >> 1) : (time_t)(~(unsigned_time_t)0))
|
|
||||||
|
|
||||||
static struct timespec
|
static struct timespec
|
||||||
native_cond_timeout(rb_thread_cond_t *cond, struct timespec timeout_rel)
|
native_cond_timeout(rb_thread_cond_t *cond, struct timespec timeout_rel)
|
||||||
{
|
{
|
||||||
|
|
3
time.c
3
time.c
|
@ -736,9 +736,6 @@ typedef unsigned LONG_LONG unsigned_time_t;
|
||||||
# error cannot find integer type which size is same as time_t.
|
# error cannot find integer type which size is same as time_t.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TIMET_MAX (~(time_t)0 <= 0 ? (time_t)((~(unsigned_time_t)0) >> 1) : (time_t)(~(unsigned_time_t)0))
|
|
||||||
#define TIMET_MIN (~(time_t)0 <= 0 ? (time_t)(((unsigned_time_t)1) << (sizeof(time_t) * CHAR_BIT - 1)) : (time_t)0)
|
|
||||||
|
|
||||||
static wideval_t
|
static wideval_t
|
||||||
rb_time_magnify(wideval_t w)
|
rb_time_magnify(wideval_t w)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue