From dab737c6fe03134661a34fb19c5419a767167aff Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Feb 2014 10:36:35 +0100 Subject: [PATCH] VS2010 build: Fixed compatibility with non-MSVS compilers. --- ccan/opt/helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ccan/opt/helpers.c b/ccan/opt/helpers.c index 6b7218a0..0cfd3f62 100644 --- a/ccan/opt/helpers.c +++ b/ccan/opt/helpers.c @@ -74,10 +74,10 @@ char *opt_set_floatval(const char *arg, float *f) char *endp; errno = 0; -#if (_MSC_VER >= 1800) - *f = strtof(arg, &endp); -#else +#if defined (_MSC_VER) && (_MSC_VER < 1800) *f = strtod(arg, &endp); +#else + *f = strtof(arg, &endp); #endif if (*endp || !arg[0]) return arg_bad("'%s' is not a number", arg);