Skip to content

Commit

Permalink
VS2010 build: Fixed compatibility with non-MSVS compilers.
Browse files Browse the repository at this point in the history
  • Loading branch information
troky authored and veox committed Feb 24, 2014
1 parent ee70f9f commit dab737c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ccan/opt/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dab737c

Please sign in to comment.