diff options
author | Chris Robinson <[email protected]> | 2018-03-21 01:56:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-03-21 08:35:37 -0700 |
commit | 55a73b8df94ce3abc4d6c6a654e2516acf8ef631 (patch) | |
tree | eddbef4ba9c43131444a725c81d80b88a7a817a1 /examples/alrecord.c | |
parent | c40b4ce3f2b09d09093b8844646c2bd95b247eba (diff) |
Fix for older MSVC lacking strtof
Diffstat (limited to 'examples/alrecord.c')
-rw-r--r-- | examples/alrecord.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 }; |