From 9323f76141f86e4c51f18af26bd29a564bbf5ec9 Mon Sep 17 00:00:00 2001 From: mlcreech Date: Wed, 19 Mar 2008 23:52:34 +0000 Subject: [PATCH] Fix build whether compiling with or without auto-extension enabled (CVS 4891) FossilOrigin-Name: 7b9682c65f545b09d410173cf282f7c4f4438097 --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/loadext.c | 8 +++++++- src/test_autoext.c | 10 ++++++---- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/manifest b/manifest index f027170460..fde79e6afd 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Don't\swrongly\slook\sfor\sthe\samalgamation\sin\s$(TOP)\s(CVS\s4890) -D 2008-03-19T23:15:38 +C Fix\sbuild\swhether\scompiling\swith\sor\swithout\sauto-extension\senabled\s(CVS\s4891) +D 2008-03-19T23:52:35 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 F Makefile.in 90256feffbc822b56e4ad0ebaa62f5871c8f0334 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -104,7 +104,7 @@ F src/insert.c 358c80592c20a61a8d5b4a127215b5e25de652f4 F src/journal.c 807bed7a158979ac8d63953e1774e8d85bff65e2 F src/legacy.c cb1939fdeb91ea88fb44fbd2768a10e14bc44650 F src/limits.h 71ab25f17e35e0a9f3f6f234b8ed49cc56731d35 -F src/loadext.c 4acd067b2e67608b42abeff50e39b6042eaae9f8 +F src/loadext.c 841cf403aa17b9f81655575ea1319bfa256906ad F src/main.c bb31f65f7b1870825a4c9a31f19354d566b7633c F src/malloc.c 60e392a4c12c839517f9b0db7b995f825444fb35 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217 @@ -155,7 +155,7 @@ F src/test7.c acec2256c7c2d279db5a8b5fa1a2a68fcc942c67 F src/test8.c 7933b27f8d300512546ef6bdd25f2fe64c3c13f3 F src/test9.c 4615ef08750245a2d96aaa7cbe2fb4aff2b57acc F src/test_async.c 3147c64c34721f088d5ab20f85dabd5d7732c007 -F src/test_autoext.c 1d128825bdf413330f66f4cf3a4d03e8a15b8231 +F src/test_autoext.c 5e892ab84aece3f0428920bf46923f16ac83962a F src/test_btree.c c1308ba0b88ab577fa56c9e493a09829dfcded9c F src/test_config.c 4c1fe5184b1e9db8a4bb130889f3a2e91f07508b F src/test_devsym.c cee1aecaa90c895030399ca4ae38f84a08038f8a @@ -624,7 +624,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 54c55cae556af5a16c0ce8be1a96d2932db80ad8 -R 7e61bb6e4e967339e4a75ce4dc843eb0 +P 41d6ca31acbc0bd8555e5487ba3b695db5c9a81a +R 693688e3ad80e102aa500e44231d652a U mlcreech -Z 7f010621b3ceba2944f64512a57bb30d +Z 7c18fbe1ac8b3b0218100603a8bf0e3e diff --git a/manifest.uuid b/manifest.uuid index 1a35252c61..04dc10591c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -41d6ca31acbc0bd8555e5487ba3b695db5c9a81a \ No newline at end of file +7b9682c65f545b09d410173cf282f7c4f4438097 \ No newline at end of file diff --git a/src/loadext.c b/src/loadext.c index 55289a6aa7..fd3d103745 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -12,7 +12,6 @@ ** This file contains code used to dynamically load extensions into ** the SQLite library. */ -#ifndef SQLITE_OMIT_LOAD_EXTENSION #ifndef SQLITE_CORE #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */ @@ -22,6 +21,8 @@ #include #include +#ifndef SQLITE_OMIT_LOAD_EXTENSION + /* ** Some API routines are omitted when various features are ** excluded from a build of SQLite. Substitute a NULL pointer @@ -500,6 +501,9 @@ void sqlite3_reset_auto_extension(void){ sqlite3_mutex_leave(mutex); } + +#ifndef SQLITE_OMIT_LOAD_EXTENSION + /* ** Load all automatic extensions. */ @@ -535,3 +539,5 @@ int sqlite3AutoLoadExtensions(sqlite3 *db){ } return rc; } + +#endif /* SQLITE_OMIT_LOADEXTENSION */ diff --git a/src/test_autoext.c b/src/test_autoext.c index d6ff10d61a..6c5b98370d 100644 --- a/src/test_autoext.c +++ b/src/test_autoext.c @@ -11,11 +11,12 @@ ************************************************************************* ** Test extension for testing the sqlite3_auto_extension() function. ** -** $Id: test_autoext.c,v 1.3 2008/03/19 16:08:54 drh Exp $ +** $Id: test_autoext.c,v 1.4 2008/03/19 23:52:35 mlcreech Exp $ */ #include "tcl.h" -#ifndef SQLITE_OMIT_LOAD_EXTENSION #include "sqlite3ext.h" + +#ifndef SQLITE_OMIT_LOAD_EXTENSION static SQLITE_EXTENSION_INIT1 /* @@ -128,6 +129,9 @@ static int autoExtBrokenObjCmd( return SQLITE_OK; } +#endif /* SQLITE_OMIT_LOAD_EXTENSION */ + + /* ** tclcmd: sqlite3_reset_auto_extension ** @@ -144,8 +148,6 @@ static int resetAutoExtObjCmd( } -#endif /* SQLITE_OMIT_LOAD_EXTENSION */ - /* ** This procedure registers the TCL procs defined in this file. */