From 04c43f85892b5c34d7cef503c7393d9674b2d472 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 2 Sep 2004 01:31:39 +0000 Subject: [PATCH] Fixed a bug reported by kama - recommend not use -wait for rewrite --- dlls/pgsql/Makefile.pl | 7 ++++--- dlls/pgsql/pgsql.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/pgsql/Makefile.pl b/dlls/pgsql/Makefile.pl index 6c796902..3765523f 100755 --- a/dlls/pgsql/Makefile.pl +++ b/dlls/pgsql/Makefile.pl @@ -16,6 +16,7 @@ $PROJECT = "pgsql_amxx"; $sdk = "../hlsdk/SourceCode"; $mm = "../metamod/metamod"; $pg = "postgresql-7.4.3/src"; +$gccf = "gcc"; @CPP_SOURCE_FILES = ("pgsql.cpp", "pgsql_amx.cpp", "amxxmodule.cpp"); @@ -46,7 +47,7 @@ while ($cmd = shift) } } -$gcc = `gcc --version`; +$gcc = `$gccf --version`; if ($gcc =~ /2\.9/) { $OPT{"opt"} .= " -malign-loops=2 -malign-jumps=2 -malign-functions=2"; @@ -135,7 +136,7 @@ for ($i=0; $i<=$#CPP_SOURCE_FILES; $i++) $ofile = $file; $ofile =~ s/\.cpp/\.o/; $ofile = "$outdir/$ofile"; - $gcc = "gcc $cflags -Dstrcmpi=strcasecmp -fPIC $inc -c $file -o $ofile"; + $gcc = "$gccf $cflags -Dstrcmpi=strcasecmp -fPIC $inc -c $file -o $ofile"; if (-e $ofile) { $file_time = (stat($file))[9]; @@ -173,6 +174,6 @@ for ($i=0; $i<=$#CPP_SOURCE_FILES; $i++) } } -$gcc = "gcc $cflags $inc -shared -ldl -lm @LINK -lpq -lz -lcrypt -o $outdir/$bin"; +$gcc = "$gccf $cflags $inc -shared -ldl -lm @LINK -lpq -lz -lcrypt -o $outdir/$bin"; print "$gcc\n"; `$gcc`; diff --git a/dlls/pgsql/pgsql.cpp b/dlls/pgsql/pgsql.cpp index 28ac140d..2872f4f8 100755 --- a/dlls/pgsql/pgsql.cpp +++ b/dlls/pgsql/pgsql.cpp @@ -40,7 +40,7 @@ CVector DBList; int sql_exists(const char* host,const char* user,const char* pass,const char* dbase) { unsigned int i = 0; int id = 0; - for (i=0; i<=DBList.size(); i++) { + for (i=0; iHost.compare(host) == 0) && (DBList[i]->Username.compare(user) == 0) &&