mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Fix shadowing messages in pgsql and regex_pcre2.
This commit is contained in:
parent
d5fc385bf7
commit
5d2f760e4d
@ -579,17 +579,17 @@ public:
|
||||
|
||||
void init() override
|
||||
{
|
||||
int version = PQlibVersion();
|
||||
int minor = version / 100 % 100;
|
||||
int revision = version % 100;
|
||||
if (version >= 10'00'00)
|
||||
int pqversion = PQlibVersion();
|
||||
int minor = pqversion / 100 % 100;
|
||||
int revision = pqversion % 100;
|
||||
if (pqversion >= 10'00'00)
|
||||
{
|
||||
// Ref: https://www.postgresql.org/docs/current/libpq-misc.html#LIBPQ-PQLIBVERSION
|
||||
minor = revision;
|
||||
revision = 0;
|
||||
}
|
||||
ServerInstance->Logs.Normal(MODNAME, "Module was compiled against libpq version {} and is running against version {}.{}.{}",
|
||||
PG_VERSION, version / 10000, minor, revision);
|
||||
PG_VERSION, pqversion / 10000, minor, revision);
|
||||
}
|
||||
|
||||
void ReadConfig(ConfigStatus& status) override
|
||||
|
@ -139,12 +139,12 @@ public:
|
||||
|
||||
void init() override
|
||||
{
|
||||
std::vector<char> version(16);
|
||||
if (pcre2_config(PCRE2_CONFIG_VERSION, version.data()) < 0)
|
||||
std::vector<char> pcre_version(16);
|
||||
if (pcre2_config(PCRE2_CONFIG_VERSION, pcre_version.data()) < 0)
|
||||
return;
|
||||
|
||||
ServerInstance->Logs.Normal(MODNAME, "Module was compiled against PCRE2 version {}.{} and is running against version {}",
|
||||
PCRE2_MAJOR, PCRE2_MINOR, version.data());
|
||||
PCRE2_MAJOR, PCRE2_MINOR, pcre_version.data());
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user