In case NAN macro is defined in math.h, prefer that over using the nan() function call.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36647 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Ivan Vučica 2013-05-17 18:38:19 +00:00
parent 93859d8011
commit d4fd0ca901
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2013-05-17 Ivan Vučica <ivan@vucica.net>
* Source/NSDate.m:
In case NAN macro is defined in math.h, prefer that over
using the nan() function call.
2013-05-17 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSMessagePortNameServer.m: fix error in line count check

View file

@ -1233,7 +1233,11 @@ otherTime(NSDate* other)
- (NSTimeInterval) timeIntervalSinceDate: (NSDate*)otherDate
{
if (otherDate == nil)
#ifndef NAN
return nan("");
#else
return NAN;
#endif
/*
{
[NSException raise: NSInvalidArgumentException