X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fpgsql_config.pl;h=277a4f71da431ba99e25851940f41061fac7ad75;hb=59bd18f2a0b43b71ee32124add9d40d1d3a54919;hp=be9fa06ed659cba4a0e51f6e422f15b3cae590ae;hpb=f0f4dd725b20c5acca3eacdc77754ad9d2103626;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/pgsql_config.pl b/src/modules/extra/pgsql_config.pl index be9fa06ed..277a4f71d 100644 --- a/src/modules/extra/pgsql_config.pl +++ b/src/modules/extra/pgsql_config.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -my $v = substr(`pg_config --version`, 11); -my($a, $b, $c) = split(/\./, $v); - -print "-D PGSQL_HAS_ESCAPECONN" if(hex(sprintf("%02x", $a) . sprintf("%02x", $b) . sprintf("%02x", $c)) >= 0x080000); +my $s = `pg_config --version`; +$s =~ /^.*?(\d+)\.(\d+)\.(\d+).*?$/; +my $v = hex(sprintf("0x%02x%02x%02x", $1, $2, $3)); +print "-DPGSQL_HAS_ESCAPECONN" if(($v >= 0x080104) or (($v >= 0x07030F) and ($v < 0x080000)));