diff options
author | drh <drh@noemail.net> | 2006-12-21 01:29:22 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-12-21 01:29:22 +0000 |
commit | 761df87ea5710a79ee8d79f3393fb9e0de1f99c0 (patch) | |
tree | 1260cd4722ba89bfad3ea4e313b49a6e85ec20ba /src/os_unix.c | |
parent | ec4d88fab5663b47ee9d883f1aabda0be1a805c4 (diff) | |
download | sqlite-761df87ea5710a79ee8d79f3393fb9e0de1f99c0.tar.gz sqlite-761df87ea5710a79ee8d79f3393fb9e0de1f99c0.zip |
Move the shared-library loading routines into the OS portability layer,
thus enabling the os_win.c code to handle the character encoding
confusion of win95/nt/ce. Ticket #2023. (CVS 3541)
FossilOrigin-Name: a1bcc6de578992b28924c1cf974ea58251454e2d
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 08c0191e0..046faf10a 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2581,6 +2581,23 @@ static int allocateUnixFile( ****************************************************************************/ +#ifndef SQLITE_OMIT_LOAD_EXTENSION +/* +** Interfaces for opening a shared library, finding entry points +** within the shared library, and closing the shared library. +*/ +#include <dlfcn.h> +void *sqlite3UnixDlopen(const char *zFilename){ + return dlopen(zFilename, RTLD_NOW | RTLD_GLOBAL); +} +void *sqlite3UnixDlsym(void *pHandle, const char *zSymbol){ + return dlsym(pHandle, zSymbol); +} +int sqlite3UnixDlclose(void *pHandle){ + return dlclose(pHandle); +} +#endif /* SQLITE_OMIT_LOAD_EXTENSION */ + /* ** Get information to seed the random number generator. The seed ** is written into the buffer zBuf[256]. The calling function must |