From 55a73b8df94ce3abc4d6c6a654e2516acf8ef631 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 21 Mar 2018 01:56:42 -0700 Subject: Fix for older MSVC lacking strtof --- examples/alrecord.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'examples') diff --git a/examples/alrecord.c b/examples/alrecord.c index c21ba30b..43b26d35 100644 --- a/examples/alrecord.c +++ b/examples/alrecord.c @@ -45,6 +45,13 @@ #endif +#if defined(_MSC_VER) && (_MSC_VER < 1900) +static float msvc_strtof(const char *str, char **end) +{ return (float)strtod(str, end); } +#define strtof msvc_strtof +#endif + + static void fwrite16le(ALushort val, FILE *f) { ALubyte data[2] = { val&0xff, (val>>8)&0xff }; -- cgit v1.2.3