X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fpgsql_config.pl;h=277a4f71da431ba99e25851940f41061fac7ad75;hb=5adff9af1b71adb9ebaaa09159821b1947f7f625;hp=bc91fa24de7e56a2cd2bc660e5373984b6577171;hpb=e533a9bb2afa6adb89c842ba6108b1867d45cc54;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/pgsql_config.pl b/src/modules/extra/pgsql_config.pl index bc91fa24d..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)) >= 0x080104); +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)));