From 3d04ed9ad0bdb12eabeb2cad5fd280d128d071f3 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 13 Jun 2019 14:33:22 -0600 Subject: [PATCH] configure: Remove the CPPDEFINE for RB_TIME_CONFIGURED. --- configure.ac | 5 +---- construct/construct.cc | 4 ++-- include/ircd/mods/mapi.h | 12 ++++++------ modules/console.cc | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index ee72d18b7..3d1cbd6b5 100644 --- a/configure.ac +++ b/configure.ac @@ -1735,11 +1735,8 @@ RB_DEFINE_UNQUOTED([DATESTR], ["$RB_DATESTR"], [Readable date string of configur DATECODE_CMD="date +%s" RB_DATECODE=`$DATECODE_CMD` -RB_DEFINE_UNQUOTED([DATECODE], [$RB_DATECODE], [UNIX epoch time at configuration time.]) - -dnl TODO: XXX: These have better names than the above, rm previous eventually. +RB_DEFINE_UNQUOTED([TIME_CONFIGURED], [$RB_DATECODE], [UNIX epoch time at configuration time.]) RB_DEFINE_UNQUOTED([DATE_CONFIGURED], ["$RB_DATESTR"], [Convenience string of RB_TIME_CONFIGURED]) -CPPDEFINE([RB_TIME_CONFIGURED], [$(date +%s)]) dnl dnl --with-custom-branding diff --git a/construct/construct.cc b/construct/construct.cc index e5aaea48a..9da6c7447 100644 --- a/construct/construct.cc +++ b/construct/construct.cc @@ -270,12 +270,12 @@ try ircd::info::tag, }; - if(RB_DATECODE > ircd::info::configured_time || RB_DATECODE < ircd::info::configured_time) + if(RB_TIME_CONFIGURED > ircd::info::configured_time || RB_TIME_CONFIGURED < ircd::info::configured_time) ircd::log::warning { "Header configuration time:%ld %s than library configuration time:%ld.", RB_VERSION_TAG, - RB_DATECODE > ircd::info::configured_time? "newer" : "older", + RB_TIME_CONFIGURED > ircd::info::configured_time? "newer" : "older", ircd::info::tag, }; diff --git a/include/ircd/mods/mapi.h b/include/ircd/mods/mapi.h index 2a4f67506..1f0c0bd28 100644 --- a/include/ircd/mods/mapi.h +++ b/include/ircd/mods/mapi.h @@ -100,12 +100,12 @@ IRCD_MAPI_SERIAL /// struct ircd::mapi::header { - const magic_t magic {IRCD_MAPI_MAGIC}; // The magic must match - const version_t version {IRCD_MAPI_VERSION}; // Version indicator - const serial_t serial {IRCD_MAPI_SERIAL}; // Serial indicator - const int64_t timestamp {RB_DATECODE}; // Module's compile epoch - std::unique_ptr meta; // Non-standard-layout header data - mods::mod *self {nullptr}; // Point to mod instance once loaded + const magic_t magic {IRCD_MAPI_MAGIC}; // The magic must match + const version_t version {IRCD_MAPI_VERSION}; // Version indicator + const serial_t serial {IRCD_MAPI_SERIAL}; // Serial indicator + const int64_t timestamp {RB_TIME_CONFIGURED}; // Module's compile epoch (TODO: XXX) + std::unique_ptr meta; // Non-standard-layout header data + mods::mod *self {nullptr}; // Point to mod instance once loaded // get and set metadata const string_view &operator[](const string_view &s) const; diff --git a/modules/console.cc b/modules/console.cc index ef05933f7..b7d05ee38 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -669,8 +669,8 @@ console_cmd__version(opt &out, const string_view &line) out << "info::startup " << info::startup << std::endl; out << std::endl; - out << "RB_DATECODE " << RB_DATECODE << std::endl; out << "RB_DATESTR " << RB_DATESTR << std::endl; + out << "RB_TIME_CONFIGURED " << RB_TIME_CONFIGURED << std::endl; out << "RB_DATE_CONFIGURED " << RB_DATE_CONFIGURED << std::endl; out << std::endl;