summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-02 12:26:50 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-02 12:26:50 +0000
commit83eceb2a79188a54871b354d95f2e1fe352305b0 (patch)
tree70e63f9ff1a665f8b96ee0c3e90672817e75b7ba /time.c
parent5f8dfdd9c7e0b5f8666a4fba3fa06b54a17334dc (diff)
* time.c (timew_out_of_timet_range): specialization for
SIZEOF_TIME_T == SIZEOF_INT64_T. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/time.c b/time.c
index 5a50808553..b27ad95b92 100644
--- a/time.c
+++ b/time.c
@@ -1741,6 +1741,19 @@ timew_out_of_timet_range(wideval_t timew)
return 0;
}
#endif
+#if SIZEOF_TIME_T == SIZEOF_INT64_T
+ if (FIXWV_P(timew)) {
+ wideint_t t = FIXWV2WINT(timew);
+ if (~(time_t)0 <= 0) {
+ return 0;
+ }
+ else {
+ if (t < 0)
+ return 1;
+ return 0;
+ }
+ }
+#endif
timexv = w2v(timew);
if (lt(timexv, mul(INT2FIX(TIME_SCALE), TIMET2NUM(TIMET_MIN))) ||
le(mul(INT2FIX(TIME_SCALE), add(TIMET2NUM(TIMET_MAX), INT2FIX(1))), timexv))