Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion torch/csrc/jit/script/strtod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ C10_EXPORT double strtod_c(const char *nptr, char **endptr)
static _locale_t loc = _create_locale(LC_ALL, "C");
return _strtod_l(nptr, endptr, loc);
}
#else
#elif defined(__ANDROID__)
C10_EXPORT double strtod_c(const char *nptr, char **endptr)
{
char *fail_pos;
Expand Down Expand Up @@ -247,6 +247,12 @@ C10_EXPORT double strtod_c(const char *nptr, char **endptr)
errno = EINVAL;
return -1.0;
}
#else
C10_EXPORT double strtod_c(const char* nptr, char** endptr) {
/// NOLINTNEXTLINE(hicpp-signed-bitwise)
static locale_t loc = newlocale(LC_ALL_MASK, "C", nullptr);
return strtod_l(nptr, endptr, loc);
}
#endif


Expand Down