avoid truncating time values when long is smaller than time_t
authorTony Cook <tony@develop-help.com>
Wed, 18 Jan 2012 03:36:12 +0000 (14:36 +1100)
committerTony Cook <tony@develop-help.com>
Wed, 18 Jan 2012 03:40:47 +0000 (14:40 +1100)
commite2054bceda6db6aa9644dfd39b55e7f06bcbbdce
tree43869edad1fa32665b7e0ab5fb8edba0a655f67b
parent33f89799d9328f3d175aa913900d16794119e284
avoid truncating time values when long is smaller than time_t

long is only 32-bits on x64 Win32, but time_t is 64-bits.  This was warning:

POSIX.xs(1777) : warning C4244: 'initializing' : conversion from 'time_t' to 'const long', possible loss of data

The check against (time_t)-1 is the approved check from ANSI C 89 and
99.
ext/POSIX/POSIX.xs