diff --git a/src/libCom/osi/os/WIN32/osdStrtod.h b/src/libCom/osi/os/WIN32/osdStrtod.h index 4edb444ee..a7df57002 100644 --- a/src/libCom/osi/os/WIN32/osdStrtod.h +++ b/src/libCom/osi/os/WIN32/osdStrtod.h @@ -13,10 +13,6 @@ extern "C" { #endif -/* - * epicsStrtod() for systems with broken strtod() routine - */ -epicsShareFunc double epicsStrtod(const char *str, char **endp); /* * Microsoft apparently added strto[u]ll() in VS2013 @@ -28,6 +24,19 @@ epicsShareFunc double epicsStrtod(const char *str, char **endp); # define strtoull _strtoui64 #endif +/* + * strtod works in MSVC 1900 and mingw, use + * the OS version in those and our own otherwise + */ +#if (_MSC_VER < 1900) && !defined(_MINGW) +/* + * epicsStrtod() for systems with broken strtod() routine + */ +epicsShareFunc double epicsStrtod(const char *str, char **endp); +#else +# define epicsStrtod strtod +#endif + #ifdef __cplusplus } #endif