From c84e0aa1c37abf8a8cc439d5a900b762c71b662c Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 23 Apr 2024 15:13:56 +0800 Subject: [PATCH] core: convert version.c to C++ Signed-off-by: Berthold Stoeger --- Subsurface-mobile.pro | 2 +- core/CMakeLists.txt | 2 +- core/{version.c => version.cpp} | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) rename core/{version.c => version.cpp} (67%) diff --git a/Subsurface-mobile.pro b/Subsurface-mobile.pro index 161688f29..bc7be27ac 100644 --- a/Subsurface-mobile.pro +++ b/Subsurface-mobile.pro @@ -78,7 +78,7 @@ SOURCES += subsurface-mobile-main.cpp \ core/statistics.c \ core/worldmap-save.cpp \ core/libdivecomputer.cpp \ - core/version.c \ + core/version.cpp \ core/save-git.cpp \ core/datatrak.cpp \ core/ostctools.c \ diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 0460a7bd0..ba6eab1aa 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -195,7 +195,7 @@ set(SUBSURFACE_CORE_LIB_SRCS uploadDiveShare.h uploadDiveLogsDE.cpp uploadDiveLogsDE.h - version.c + version.cpp version.h videoframeextractor.cpp videoframeextractor.h diff --git a/core/version.c b/core/version.cpp similarity index 67% rename from core/version.c rename to core/version.cpp index 9774d7b5f..bf1bcefb0 100644 --- a/core/version.c +++ b/core/version.cpp @@ -2,13 +2,12 @@ #include "ssrf-version.h" // let's leave the two redundant functions in case we change our minds on git SHAs -const char *subsurface_git_version(void) +extern "C" const char *subsurface_git_version(void) { return CANONICAL_VERSION_STRING_4; } -const char *subsurface_canonical_version(void) +extern "C" const char *subsurface_canonical_version(void) { return CANONICAL_VERSION_STRING; } -