From cba554d193a8b10ee140196a8c01ca5f7741f9fb Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 28 Aug 2006 21:21:06 +0000 Subject: [PATCH] fixed this up for gcc-3.4 and no lstdc++.a --- dlls/sqlite/Makefile | 6 +++--- dlls/sqlite/module.cpp | 4 ++++ dlls/sqlite/sqlite-source/pager.c | 2 +- dlls/sqlite/sqlite-source/select.c | 4 ++-- dlls/sqlite/threading.cpp | 5 ----- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dlls/sqlite/Makefile b/dlls/sqlite/Makefile index f7d85e84..5a88d60f 100755 --- a/dlls/sqlite/Makefile +++ b/dlls/sqlite/Makefile @@ -8,8 +8,8 @@ MM_ROOT = ../../metamod/metamod OPT_FLAGS = -O3 -funroll-loops -s -pipe -fomit-frame-pointer -fno-strict-aliasing DEBUG_FLAGS = -g -ggdb3 -CPP = gcc-4.1 -CC = gcc-4.1 +CPP = gcc-3.4 +CC = gcc-3.4 NAME = sqlite SQL = sqlite-source @@ -34,7 +34,7 @@ C_OBJECTS = $(SQL)/attach.c $(SQL)/auth.c $(SQL)/btree.c $(SQL)/build.c \ CFLAGS = -Wall -Werror CPPFLAGS = -Wall -Wno-non-virtual-dtor -Werror -LINK = -static-libgcc -lpthread /lib/libgcc_eh.a /lib/libstdc++.a +LINK = -lgcc -static-libgcc -lpthread INCLUDE = -I. -I$(HLSDK) -I$(HLSDK)/dlls -I$(HLSDK)/engine -I$(HLSDK)/game_shared -I$(HLSDK)/game_shared \ -I$(MM_ROOT) -I$(HLSDK)/common -I$(SQL) -I./sqlitepp -I./sdk -I./thread diff --git a/dlls/sqlite/module.cpp b/dlls/sqlite/module.cpp index bfe85c6d..be1f2c1c 100644 --- a/dlls/sqlite/module.cpp +++ b/dlls/sqlite/module.cpp @@ -80,3 +80,7 @@ void OnPluginsUnloaded() FreeAllHandles(Handle_Connection); } +extern "C" void __cxa_pure_virtual(void) +{ +} + diff --git a/dlls/sqlite/sqlite-source/pager.c b/dlls/sqlite/sqlite-source/pager.c index a84c2652..8ccbb587 100644 --- a/dlls/sqlite/sqlite-source/pager.c +++ b/dlls/sqlite/sqlite-source/pager.c @@ -1552,7 +1552,7 @@ int sqlite3pager_open( ){ Pager *pPager = 0; char *zFullPathname = 0; - int nameLen; /* Compiler is wrong. This is always initialized before use */ + int nameLen = 0; /* Compiler is wrong. This is always initialized before use */ OsFile *fd; int rc = SQLITE_OK; int i; diff --git a/dlls/sqlite/sqlite-source/select.c b/dlls/sqlite/sqlite-source/select.c index 4af435da..96e6c938 100644 --- a/dlls/sqlite/sqlite-source/select.c +++ b/dlls/sqlite/sqlite-source/select.c @@ -2775,8 +2775,8 @@ int sqlite3Select( WhereInfo *pWInfo; /* Return from sqlite3WhereBegin() */ Vdbe *v; /* The virtual machine under construction */ int isAgg; /* True for select lists like "count(*)" */ - ExprList *pEList; /* List of columns to extract. */ - SrcList *pTabList; /* List of tables to select from */ + ExprList *pEList=NULL; /* List of columns to extract. */ + SrcList *pTabList=NULL; /* List of tables to select from */ Expr *pWhere; /* The WHERE clause. May be NULL */ ExprList *pOrderBy; /* The ORDER BY clause. May be NULL */ ExprList *pGroupBy; /* The GROUP BY clause. May be NULL */ diff --git a/dlls/sqlite/threading.cpp b/dlls/sqlite/threading.cpp index 633ea750..5092d0da 100644 --- a/dlls/sqlite/threading.cpp +++ b/dlls/sqlite/threading.cpp @@ -397,11 +397,6 @@ bool AtomicResult::FieldNameToNum(const char *name, unsigned int *columnId) } } - if (columnId) - { - *columnId = -1; - } - return false; }