diff options
author | drh <drh@noemail.net> | 2012-11-27 16:39:31 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-11-27 16:39:31 +0000 |
commit | 7d1f0c79cfd5ee2fe8f8fce703a0d031786502b4 (patch) | |
tree | 5644f03844e0e97039cba37a79d70566a46c0ffe /src | |
parent | 71ba10d3c9e8f8c8137d0efaaa549f38f9a8233c (diff) | |
download | sqlite-7d1f0c79cfd5ee2fe8f8fce703a0d031786502b4.tar.gz sqlite-7d1f0c79cfd5ee2fe8f8fce703a0d031786502b4.zip |
Get SQLLOG working on windows. Fix a couple of compiler warnings.
FossilOrigin-Name: b3809c937b230b34e5bc6ce4909c04ceef72fb85
Diffstat (limited to 'src')
-rw-r--r-- | src/test_sqllog.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/test_sqllog.c b/src/test_sqllog.c index 52aa3a632..49569a39f 100644 --- a/src/test_sqllog.c +++ b/src/test_sqllog.c @@ -66,7 +66,11 @@ #include "sys/types.h" #include "unistd.h" static int getProcessId(void){ +#if SQLITE_OS_WIN + return (int)_getpid(); +#else return (int)getpid(); +#endif } @@ -210,14 +214,14 @@ static int sqllogFindAttached( rc = sqlite3_prepare_v2(p->db, "PRAGMA database_list", -1, &pStmt, 0); if( rc==SQLITE_OK ){ while( SQLITE_ROW==sqlite3_step(pStmt) ){ - char *zVal1; int nVal1; - char *zVal2; int nVal2; + const char *zVal1; int nVal1; + const char *zVal2; int nVal2; - zVal1 = sqlite3_column_text(pStmt, 1); + zVal1 = (const char*)sqlite3_column_text(pStmt, 1); nVal1 = sqlite3_column_bytes(pStmt, 1); memcpy(zName, zVal1, nVal1+1); - zVal2 = sqlite3_column_text(pStmt, 2); + zVal2 = (const char*)sqlite3_column_text(pStmt, 2); nVal2 = sqlite3_column_bytes(pStmt, 2); memcpy(zFile, zVal2, nVal2+1); @@ -466,4 +470,3 @@ void sqlite3_init_sqllog(void){ } } } - |