sqlite: Add hack for 32-bit to properly get address of SetDllDirectoryW

This commit is contained in:
Alexpux
2014-11-08 22:33:03 +03:00
parent 3a181c50a9
commit 690efeaada
4 changed files with 71 additions and 29 deletions

View File

@@ -0,0 +1,25 @@
diff -Naur sqlite-autoconf-3080701-orig/sqlite3.c sqlite-autoconf-3080701/sqlite3.c
--- sqlite-autoconf-3080701-orig/sqlite3.c 2014-11-08 20:34:01.593800000 +0300
+++ sqlite-autoconf-3080701/sqlite3.c 2014-11-08 20:37:42.146600000 +0300
@@ -38527,7 +38527,7 @@
#ifdef _WIN32
module = osGetModuleHandleW(L"CYGWIN1.DLL");
if( !module){
- module = osGetModuleHandleW(L"MSYS-1.0.DLL");
+ module = osGetModuleHandleW(L"MSYS-2.0.DLL");
}
if( module ){
for( i=78; i<ArraySize(aSyscall); ++i ){
@@ -100964,6 +100964,12 @@
handle = sqlite3OsDlOpen(pVfs, zAltFile);
sqlite3_free(zAltFile);
}
+ if( handle==0 ){
+ zAltFile = sqlite3_mprintf("msys-sqlite3%s-0.%s", zFile, azEnding);
+ if( zAltFile==0 ) return SQLITE_NOMEM;
+ handle = sqlite3OsDlOpen(pVfs, zAltFile);
+ sqlite3_free(zAltFile);
+ }
#endif
}
if( handle==0 ){