From 44ff05f3bfca40511adcc3e3e4f418f25720b034 Mon Sep 17 00:00:00 2001 From: ivucica Date: Fri, 17 May 2013 18:38:19 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ Source/NSDate.m | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 93ebdd4bc..4617f2569 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-05-17 Ivan Vučica + + * 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 * Source/NSMessagePortNameServer.m: fix error in line count check diff --git a/Source/NSDate.m b/Source/NSDate.m index 42f88f0bb..ab460e88b 100644 --- a/Source/NSDate.m +++ b/Source/NSDate.m @@ -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