Skip to content

Commit dab737c

Browse files
trokyveox
authored andcommitted
VS2010 build: Fixed compatibility with non-MSVS compilers.
1 parent ee70f9f commit dab737c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ccan/opt/helpers.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ char *opt_set_floatval(const char *arg, float *f)
7474
char *endp;
7575

7676
errno = 0;
77-
#if (_MSC_VER >= 1800)
78-
*f = strtof(arg, &endp);
79-
#else
77+
#if defined (_MSC_VER) && (_MSC_VER < 1800)
8078
*f = strtod(arg, &endp);
79+
#else
80+
*f = strtof(arg, &endp);
8181
#endif
8282
if (*endp || !arg[0])
8383
return arg_bad("'%s' is not a number", arg);

0 commit comments

Comments
 (0)