vcl/unx/generic/app/geninst.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 81a9a5c5d24cf6825600d47cd5877f98e35d45b0
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Aug 20 12:29:56 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Aug 20 15:32:01 2024 +0200

    emscripten: Show actual Emscripten version in "About"
    
    Display the actual Emscripten version instead of a literal
    "__EMSCRIPTEN_major__.__EMSCRIPTEN_minor__.__EMSCRIPTEN_tiny__"
    for the environment information in "Help" -> "About LibreOfficeDev".
    
    Change-Id: I6a29e8c323e8874e89201b2cce7c28d2218fc8cb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172107
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/unx/generic/app/geninst.cxx b/vcl/unx/generic/app/geninst.cxx
index fe3aefe9b71a..28eb33141b4d 100644
--- a/vcl/unx/generic/app/geninst.cxx
+++ b/vcl/unx/generic/app/geninst.cxx
@@ -25,6 +25,9 @@
 #if defined(__FreeBSD__)
 #  include <sys/utsname.h>
 #endif
+#if defined(EMSCRIPTEN)
+#include <emscripten/version.h>
+#endif
 
 #include <config_features.h>
 #if HAVE_FEATURE_OPENGL
@@ -88,10 +91,9 @@ OUString SalGenericInstance::getOSVersion()
     }
     aKernelVer = OUString::createFromAscii(stName.sysname) + " " + 
aKernelVer.copy(0, nIndex);
 #elif defined(EMSCRIPTEN)
-#define str(s) #s
-#define xstr(s) str(s)
-    aKernelVer = "Emscripten " xstr(__EMSCRIPTEN_major__)
-                 "." xstr(__EMSCRIPTEN_minor__) "." xstr(__EMSCRIPTEN_tiny__);
+    aKernelVer = u"Emscripten "_ustr + OUString::number(__EMSCRIPTEN_major__) 
+ u"."_ustr
+                 + OUString::number(__EMSCRIPTEN_minor__) + u"."_ustr
+                 + OUString::number(__EMSCRIPTEN_tiny__);
 #endif
     return aKernelVer;
 }

Reply via email to