1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Merge updates from trunk.

FossilOrigin-Name: 854d410ad3a2bb3af5465d933ac9535fe3f22bfe
This commit is contained in:
mistachkin
2014-02-24 21:23:07 +00:00
11 changed files with 84 additions and 41 deletions

View File

@@ -5135,10 +5135,6 @@ static int winFullPathname(
** Interfaces for opening a shared library, finding entry points
** within the shared library, and closing the shared library.
*/
/*
** Interfaces for opening a shared library, finding entry points
** within the shared library, and closing the shared library.
*/
static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
HANDLE h;
#if defined(__CYGWIN__)
@@ -5146,10 +5142,12 @@ static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
char *zFull = sqlite3MallocZero( nFull );
void *zConverted = 0;
if( zFull==0 ){
OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
return 0;
}
if( winFullPathname(pVfs, zFilename, nFull, zFull)!=SQLITE_OK ){
sqlite3_free(zFull);
OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
return 0;
}
zConverted = winConvertFromUtf8Filename(zFull);
@@ -5159,6 +5157,7 @@ static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
UNUSED_PARAMETER(pVfs);
#endif
if( zConverted==0 ){
OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
return 0;
}
if( osIsNT() ){
@@ -5173,6 +5172,7 @@ static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
h = osLoadLibraryA((char*)zConverted);
}
#endif
OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)h));
sqlite3_free(zConverted);
return (void*)h;
}
@@ -5181,12 +5181,17 @@ static void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
winGetLastErrorMsg(osGetLastError(), nBuf, zBufOut);
}
static void (*winDlSym(sqlite3_vfs *pVfs,void *pH,const char *zSym))(void){
FARPROC pProc;
UNUSED_PARAMETER(pVfs);
return (void(*)(void))osGetProcAddressA((HANDLE)pH, zSym);
pProc = osGetProcAddressA((HANDLE)pH, zSym);
OSTRACE(("DLSYM handle=%p, symbol=%s, proc=%p\n",
(void*)pH, zSym, (void*)pProc));
return (void(*)(void))pProc;
}
static void winDlClose(sqlite3_vfs *pVfs, void *pHandle){
UNUSED_PARAMETER(pVfs);
osFreeLibrary((HANDLE)pHandle);
OSTRACE(("DLCLOSE handle=%p\n", (void*)pHandle));
}
#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
#define winDlOpen 0