mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
a2ed652ca2
commit
1db866fde7
4 changed files with 40 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue