Browse Source

VS2010 build: Fixed compatibility with non-MSVS compilers.

nfactor-troky
unknown 11 years ago committed by Noel Maersk
parent
commit
dab737c6fe
  1. 6
      ccan/opt/helpers.c

6
ccan/opt/helpers.c

@ -74,10 +74,10 @@ char *opt_set_floatval(const char *arg, float *f)
char *endp; char *endp;
errno = 0; errno = 0;
#if (_MSC_VER >= 1800) #if defined (_MSC_VER) && (_MSC_VER < 1800)
*f = strtof(arg, &endp);
#else
*f = strtod(arg, &endp); *f = strtod(arg, &endp);
#else
*f = strtof(arg, &endp);
#endif #endif
if (*endp || !arg[0]) if (*endp || !arg[0])
return arg_bad("'%s' is not a number", arg); return arg_bad("'%s' is not a number", arg);

Loading…
Cancel
Save