From cff23b8d38480dda2bf446b422edafe49ab06cb6 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 2 Apr 2016 12:05:46 +0200 Subject: [PATCH] fix commit "ngspice.h, cm.h, cleanup NAN defines" --- src/include/ngspice/cm.h | 6 ++++-- src/include/ngspice/ngspice.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/include/ngspice/cm.h b/src/include/ngspice/cm.h index 42681f37e..d05cbf673 100644 --- a/src/include/ngspice/cm.h +++ b/src/include/ngspice/cm.h @@ -45,9 +45,11 @@ NON-STANDARD FEATURES #include "ngspice/cmproto.h" #include "ngspice/mifcmdat.h" +#include + #if !defined(NAN) -#if defined(_MSC_VER) && (_MSC_VER < 1800) - /* VS 2012 or less cannot evaluate 0.0/0.0 */ +#if defined(_MSC_VER) + /* NAN is not defined in VS 2012 or older */ static const __int64 global_nan = 0x7ff8000000000000i64; #define NAN (*(const double *) &global_nan) #else diff --git a/src/include/ngspice/ngspice.h b/src/include/ngspice/ngspice.h index 2bd4fba73..086b214cf 100644 --- a/src/include/ngspice/ngspice.h +++ b/src/include/ngspice/ngspice.h @@ -206,8 +206,8 @@ extern double x_atanh(double); #endif #if !defined(NAN) -#if defined(_MSC_VER) && (_MSC_VER < 1800) - /* VS 2012 or less cannot evaluate 0.0/0.0 */ +#if defined(_MSC_VER) + /* NAN is not defined in VS 2012 or older */ static const __int64 global_nan = 0x7ff8000000000000i64; #define NAN (*(const double *) &global_nan) #else