sqlite3OsDl*() APIs can be omitted if SQLITE_OMIT_LOAD_EXTENSION defined. (CVS 5171)

FossilOrigin-Name: 7c51a97dc11f20f7323a9dc5c04a3b84380cf8fb
This commit is contained in:
shane 2008-05-29 02:52:59 +00:00
parent 7bc71e5e82
commit 75998ab3d9
5 changed files with 27 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Use\s%llx\sinstead\sof\s%x\sfor\s64\sbit\svalues\s(this\sonly\saffects\sa\sdebugging\sstatement).\s(CVS\s5170)
D 2008-05-28T18:01:45
C sqlite3OsDl*()\sAPIs\scan\sbe\somitted\sif\sSQLITE_OMIT_LOAD_EXTENSION\sdefined.\s(CVS\s5171)
D 2008-05-29T02:53:00
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in 62b2a40ff5944dd33c9c3184b21f720ea8e48a44
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -126,8 +126,8 @@ F src/mutex.h 079fa6fe9da18ceb89e79012c010594c6672addb
F src/mutex_os2.c 2911ea96955ab6cba734cc4ad903fe76f834b39e
F src/mutex_unix.c 466d20378a0645fea64c3f2e2669c33b7802df56
F src/mutex_w32.c 133698096a2c4e81cd11ea6f4de7891c66f7b9f7
F src/os.c 9348e092f3ac2c964491b01424a17862e0650e86
F src/os.h 7131c5b8e5cd59504d3818f88e4ae106da8fac01
F src/os.c 541ea39fbacc18483b3aa96cd0242bad2dd0f049
F src/os.h c0727c1a360aea23dc3213b32417608afa7143a3
F src/os_common.h 9da7339466404707af49943fe4c47e608034761b
F src/os_os2.c 1578149e21c4eac42c7f230a6f40500846f8e781
F src/os_unix.c 06dceb3230249d6e7c6a1d8d602fa6a93f4085b9
@ -160,7 +160,7 @@ F src/test_async.c 0d26a72361022f6f732dd1174c6615bad6e587ff
F src/test_autoext.c 5e892ab84aece3f0428920bf46923f16ac83962a
F src/test_btree.c c1308ba0b88ab577fa56c9e493a09829dfcded9c
F src/test_config.c 982bba6221b854a86427ae64e9c65b313b0f6e03
F src/test_devsym.c 76cf28b79c6f01658083ae2a972647b97a362a01
F src/test_devsym.c 647b4dbf305343873c1a08095cc828a80ce2781d
F src/test_func.c f4aafa10f17d52c43a64b47717265802e6e552b3
F src/test_hexio.c 2f1122aa3f012fa0142ee3c36ce5c902a70cd12f
F src/test_loadext.c 22065d601a18878e5542191001f0eaa5d77c0ed8
@ -590,7 +590,7 @@ F tool/speedtest16.c 6f5bc019dcf8b6537f379bbac0408a9e1a86f0b6
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c e74126bc12178fa29904f711bb100212a5448041
F tool/speedtest8inst1.c 025879132979a5fdec11218472cba6cf8f6ec854
P e015fa44586b2444c78da413af50787e2690046e
R 3e9228b0d9f6822c55e66633366a1aa7
P c81efc97bca58ebbd9500f990f7e45d133e1bd0b
R 9e30e2938cf70de7ee4bbf3a765ffb93
U shane
Z 7accd8022bb63f907adfa2c60741d11c
Z 63284a3ba625c43aca47806e6d9a8932

View File

@ -1 +1 @@
c81efc97bca58ebbd9500f990f7e45d133e1bd0b
7c51a97dc11f20f7323a9dc5c04a3b84380cf8fb

View File

@ -13,7 +13,7 @@
** This file contains OS interface code that is common to all
** architectures.
**
** $Id: os.c,v 1.108 2008/05/16 04:51:55 danielk1977 Exp $
** $Id: os.c,v 1.109 2008/05/29 02:53:00 shane Exp $
*/
#define _SQLITE_OS_C_ 1
#include "sqliteInt.h"
@ -137,6 +137,7 @@ int sqlite3OsFullPathname(
){
return pVfs->xFullPathname(pVfs, zPath, nPathOut, zPathOut);
}
#ifndef SQLITE_OMIT_LOAD_EXTENSION
void *sqlite3OsDlOpen(sqlite3_vfs *pVfs, const char *zPath){
return pVfs->xDlOpen(pVfs, zPath);
}
@ -149,6 +150,7 @@ void *sqlite3OsDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){
void sqlite3OsDlClose(sqlite3_vfs *pVfs, void *pHandle){
pVfs->xDlClose(pVfs, pHandle);
}
#endif /* SQLITE_OMIT_LOAD_EXTENSION */
int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
return pVfs->xRandomness(pVfs, nByte, zBufOut);
}

View File

@ -17,7 +17,7 @@
** This header file is #include-ed by sqliteInt.h and thus ends up
** being included by every source file.
**
** $Id: os.h,v 1.99 2008/05/16 04:51:55 danielk1977 Exp $
** $Id: os.h,v 1.100 2008/05/29 02:53:00 shane Exp $
*/
#ifndef _SQLITE_OS_H_
#define _SQLITE_OS_H_
@ -246,10 +246,12 @@ int sqlite3OsDelete(sqlite3_vfs *, const char *, int);
int sqlite3OsAccess(sqlite3_vfs *, const char *, int);
int sqlite3OsGetTempname(sqlite3_vfs *, int, char *);
int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *);
#ifndef SQLITE_OMIT_LOAD_EXTENSION
void *sqlite3OsDlOpen(sqlite3_vfs *, const char *);
void sqlite3OsDlError(sqlite3_vfs *, int, char *);
void *sqlite3OsDlSym(sqlite3_vfs *, void *, const char *);
void sqlite3OsDlClose(sqlite3_vfs *, void *);
#endif /* SQLITE_OMIT_LOAD_EXTENSION */
int sqlite3OsRandomness(sqlite3_vfs *, int, char *);
int sqlite3OsSleep(sqlite3_vfs *, int);
int sqlite3OsCurrentTime(sqlite3_vfs *, double*);

View File

@ -14,7 +14,7 @@
** different device types (by overriding the return values of the
** xDeviceCharacteristics() and xSectorSize() methods).
**
** $Id: test_devsym.c,v 1.4 2008/05/16 04:51:55 danielk1977 Exp $
** $Id: test_devsym.c,v 1.5 2008/05/29 02:53:00 shane Exp $
*/
#if SQLITE_TEST /* This file is used for testing only */
@ -61,10 +61,12 @@ static int devsymDelete(sqlite3_vfs*, const char *zName, int syncDir);
static int devsymAccess(sqlite3_vfs*, const char *zName, int flags);
static int devsymGetTempName(sqlite3_vfs*, int nOut, char *zOut);
static int devsymFullPathname(sqlite3_vfs*, const char *zName, int, char *zOut);
#ifndef SQLITE_OMIT_LOAD_EXTENSION
static void *devsymDlOpen(sqlite3_vfs*, const char *zFilename);
static void devsymDlError(sqlite3_vfs*, int nByte, char *zErrMsg);
static void *devsymDlSym(sqlite3_vfs*,void*, const char *zSymbol);
static void devsymDlClose(sqlite3_vfs*, void*);
#endif /* SQLITE_OMIT_LOAD_EXTENSION */
static int devsymRandomness(sqlite3_vfs*, int nByte, char *zOut);
static int devsymSleep(sqlite3_vfs*, int microseconds);
static int devsymCurrentTime(sqlite3_vfs*, double*);
@ -81,10 +83,17 @@ static sqlite3_vfs devsym_vfs = {
devsymAccess, /* xAccess */
devsymGetTempName, /* xGetTempName */
devsymFullPathname, /* xFullPathname */
#ifndef SQLITE_OMIT_LOAD_EXTENSION
devsymDlOpen, /* xDlOpen */
devsymDlError, /* xDlError */
devsymDlSym, /* xDlSym */
devsymDlClose, /* xDlClose */
#else
0, /* xDlOpen */
0, /* xDlError */
0, /* xDlSym */
0, /* xDlClose */
#endif /* SQLITE_OMIT_LOAD_EXTENSION */
devsymRandomness, /* xRandomness */
devsymSleep, /* xSleep */
devsymCurrentTime /* xCurrentTime */
@ -273,6 +282,7 @@ static int devsymFullPathname(
return sqlite3OsFullPathname(g.pVfs, zPath, nOut, zOut);
}
#ifndef SQLITE_OMIT_LOAD_EXTENSION
/*
** Open the dynamic library located at zPath and return a handle.
*/
@ -302,6 +312,7 @@ static void *devsymDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){
static void devsymDlClose(sqlite3_vfs *pVfs, void *pHandle){
sqlite3OsDlClose(g.pVfs, pHandle);
}
#endif /* SQLITE_OMIT_LOAD_EXTENSION */
/*
** Populate the buffer pointed to by zBufOut with nByte bytes of