From ca24e71f7576591dfa5d405e16e2475aba6d2386 Mon Sep 17 00:00:00 2001 From: om Date: Sun, 19 Nov 2006 16:13:28 +0000 Subject: Hopefully uncraq this script enough to actually work, should return for versions > 8.1.4 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5777 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/pgsql_config.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/modules/extra/pgsql_config.pl b/src/modules/extra/pgsql_config.pl index be9fa06ed..6e0b54baf 100644 --- a/src/modules/extra/pgsql_config.pl +++ b/src/modules/extra/pgsql_config.pl @@ -1,6 +1,4 @@ #!/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); +`pg_config --version` =~ /^.*?(\d+)\.(\d+)\.(\d+).*?$/; +print "-D PGSQL_HAS_ESCAPECONN" if(hex(sprintf("0x%02x%02x%02x", $1, $2, $3)) >= 0x080104); -- cgit v1.2.3