warzone2100/lib/sqlite3/sqlite3.diff

56 lines
2.0 KiB
Diff

--- sqlite3.c.orig 2008-03-09 12:46:34.000000000 +0100
+++ sqlite3.c 2008-03-09 12:47:47.000000000 +0100
@@ -4818,12 +4818,16 @@
#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE
SQLITE_PRIVATE void sqlite3BtreeEnter(Btree*);
SQLITE_PRIVATE void sqlite3BtreeLeave(Btree*);
+#ifndef NDEBUG
SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree*);
+#endif
SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor*);
SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor*);
SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3*);
SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3*);
+#ifndef NDEBUG
SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3*);
+#endif
SQLITE_PRIVATE void sqlite3BtreeMutexArrayEnter(BtreeMutexArray*);
SQLITE_PRIVATE void sqlite3BtreeMutexArrayLeave(BtreeMutexArray*);
SQLITE_PRIVATE void sqlite3BtreeMutexArrayInsert(BtreeMutexArray*, Btree*);
@@ -5427,6 +5431,8 @@
** Define the maximum size of a temporary filename
*/
#if OS_WIN
+# define WIN32_LEAN_AND_MEAN
+# define WIN32_EXTRA_LEAN
# include <windows.h>
# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
#elif OS_OS2
@@ -53986,7 +53992,7 @@
if( argType==0xff ){
pArg = db;
}else{
- pArg = (void*)(int)argType;
+ pArg = (void*)(size_t)argType;
}
sqlite3CreateFunc(db, aFuncs[i].zName, aFuncs[i].nArg,
aFuncs[i].eTextRep, pArg, aFuncs[i].xFunc, 0, 0);
@@ -54005,7 +54011,7 @@
sqlite3AttachFunctions(db);
#endif
for(i=0; i<sizeof(aAggs)/sizeof(aAggs[0]); i++){
- void *pArg = (void*)(int)aAggs[i].argType;
+ void *pArg = (void*)(size_t)aAggs[i].argType;
sqlite3CreateFunc(db, aAggs[i].zName, aAggs[i].nArg, SQLITE_UTF8,
pArg, 0, aAggs[i].xStep, aAggs[i].xFinalize);
if( aAggs[i].needCollSeq ){
@@ -62510,7 +62516,7 @@
#endif
if( res.azResult ){
assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
- res.azResult[0] = (char*)res.nData;
+ res.azResult[0] = (char*)(size_t)res.nData;
}
if( (rc&0xff)==SQLITE_ABORT ){
sqlite3_free_table(&res.azResult[1]);