X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fpgsql_config.pl;h=277a4f71da431ba99e25851940f41061fac7ad75;hb=5adff9af1b71adb9ebaaa09159821b1947f7f625;hp=4c56e4cf6680ae352d53df2f7f6112b308bd6914;hpb=95ac8e2fd305798bdaa6d0e1720fb36e3f954b18;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/pgsql_config.pl b/src/modules/extra/pgsql_config.pl index 4c56e4cf6..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(($a >= 8) and ($b >= 1) and ($c >= 4)); +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)));