Fixed a bug reported by kama - recommend not use -wait for rewrite

This commit is contained in:
David Anderson 2004-09-02 01:31:39 +00:00
parent 9d733d7a6b
commit 04c43f8589
2 changed files with 5 additions and 4 deletions

View File

@ -16,6 +16,7 @@ $PROJECT = "pgsql_amxx";
$sdk = "../hlsdk/SourceCode"; $sdk = "../hlsdk/SourceCode";
$mm = "../metamod/metamod"; $mm = "../metamod/metamod";
$pg = "postgresql-7.4.3/src"; $pg = "postgresql-7.4.3/src";
$gccf = "gcc";
@CPP_SOURCE_FILES = ("pgsql.cpp", "pgsql_amx.cpp", "amxxmodule.cpp"); @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/) if ($gcc =~ /2\.9/)
{ {
$OPT{"opt"} .= " -malign-loops=2 -malign-jumps=2 -malign-functions=2"; $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 = $file;
$ofile =~ s/\.cpp/\.o/; $ofile =~ s/\.cpp/\.o/;
$ofile = "$outdir/$ofile"; $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) if (-e $ofile)
{ {
$file_time = (stat($file))[9]; $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"; print "$gcc\n";
`$gcc`; `$gcc`;

View File

@ -40,7 +40,7 @@ CVector<SQL*> DBList;
int sql_exists(const char* host,const char* user,const char* pass,const char* dbase) { int sql_exists(const char* host,const char* user,const char* pass,const char* dbase) {
unsigned int i = 0; unsigned int i = 0;
int id = 0; int id = 0;
for (i=0; i<=DBList.size(); i++) { for (i=0; i<DBList.size(); i++) {
id++; id++;
if ((DBList[i]->Host.compare(host) == 0) && if ((DBList[i]->Host.compare(host) == 0) &&
(DBList[i]->Username.compare(user) == 0) && (DBList[i]->Username.compare(user) == 0) &&