diff --git a/Subsurface-mobile.pro b/Subsurface-mobile.pro index 88e1d3ae2..161688f29 100644 --- a/Subsurface-mobile.pro +++ b/Subsurface-mobile.pro @@ -93,7 +93,7 @@ SOURCES += subsurface-mobile-main.cpp \ core/selection.cpp \ core/sha1.c \ core/string-format.cpp \ - core/strtod.c \ + core/strtod.cpp \ core/tag.cpp \ core/taxonomy.c \ core/time.cpp \ diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index b4cc55723..0460a7bd0 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -169,7 +169,7 @@ set(SUBSURFACE_CORE_LIB_SRCS statistics.h string-format.h string-format.cpp - strtod.c + strtod.cpp subsurface-float.h subsurface-string.cpp subsurface-string.h diff --git a/core/strtod.c b/core/strtod.cpp similarity index 93% rename from core/strtod.c rename to core/strtod.cpp index 39abfb7a7..e76ee47c0 100644 --- a/core/strtod.c +++ b/core/strtod.cpp @@ -109,12 +109,12 @@ no_conversion: return 0.0; } -double permissive_strtod(const char *str, const char **ptr) +extern "C" double permissive_strtod(const char *str, const char **ptr) { return strtod_flags(str, ptr, false); } -double ascii_strtod(const char *str, const char **ptr) +extern "C" double ascii_strtod(const char *str, const char **ptr) { return strtod_flags(str, ptr, true); }