From c3b76b109d294e16372a24ed35b7144437afbe50 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Wed, 10 Jul 2024 16:00:18 +0200 Subject: [PATCH] Format version.?? --- pdns/version.cc | 108 ++++++++++++++++++++++++++++++------------------ pdns/version.hh | 6 ++- 2 files changed, 73 insertions(+), 41 deletions(-) diff --git a/pdns/version.cc b/pdns/version.cc index 7f608572b3..56aa8f3bcd 100644 --- a/pdns/version.cc +++ b/pdns/version.cc @@ -33,16 +33,17 @@ static ProductType productType; string compilerVersion() { #if defined(__clang__) - return string("clang " __clang_version__ ); + return string("clang " __clang_version__); #elif defined(__GNUC__) - return string("gcc " __VERSION__ ); -#else // add other compilers here + return string("gcc " __VERSION__); +#else // add other compilers here return string("Unknown compiler"); #endif } // Human-readable product name -string productName() { +string productName() +{ switch (productType) { case ProductAuthoritative: return "PowerDNS Authoritative Server"; @@ -58,7 +59,8 @@ string getPDNSVersion() } // REST API product type -string productTypeApiType() { +string productTypeApiType() +{ switch (productType) { case ProductAuthoritative: return "authoritative"; @@ -70,85 +72,111 @@ string productTypeApiType() { void showProductVersion() { - g_log<