on 32bit systems constrain dates to fit

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39549 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-03-15 19:04:51 +00:00
parent a2ed652ca2
commit 1db866fde7
4 changed files with 40 additions and 4 deletions

View file

@ -1412,6 +1412,18 @@ otherTime(NSDate* other)
format: @"[%@-%@] interval is not a number",
NSStringFromClass([self class]), NSStringFromSelector(_cmd)];
}
#if GS_SIZEOF_VOIDP == 4
if (secs <= DISTANT_PAST)
{
secs = DISTANT_PAST;
}
else if (secs >= DISTANT_FUTURE)
{
secs = DISTANT_FUTURE;
}
#endif
_seconds_since_ref = secs;
return self;
}