]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
More tweaking of linkage. Ticket #2554. (CVS 4200)
authordrh <drh@noemail.net>
Wed, 8 Aug 2007 12:11:21 +0000 (12:11 +0000)
committerdrh <drh@noemail.net>
Wed, 8 Aug 2007 12:11:21 +0000 (12:11 +0000)
FossilOrigin-Name: 3759a38fe8e8a873dc3aae8dc99ca1010551b50b

manifest
manifest.uuid
src/os_common.h
src/sqlite.h.in
src/sqliteInt.h
src/test1.c
tool/mksqlite3c.tcl

index d964c36031f89ee7ea313271cfe18a95835489a4..901e8458a73a5d1b0490d6d0a48e1911536e3e88 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Additional\srefinements\son\sthe\samalgamation:\s\sGive\sa\scouple\sof\sconstants\nfile\sscope\sand\sadd\sthe\sSQLITE_API\sprefix\sto\ssome\sinterfaces\sthat\sneed\sit.\nTicket\s#2554.\s(CVS\s4199)
-D 2007-08-08T01:04:52
+C More\stweaking\sof\slinkage.\s\sTicket\s#2554.\s(CVS\s4200)
+D 2007-08-08T12:11:21
 F Makefile.in 0c0e53720f658c7a551046442dd7afba0b72bfbe
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -90,7 +90,7 @@ F src/malloc.c 3850ab4a2edfb190ffee353c5674ebd8c6b4ccc7
 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
 F src/os.c 1f10b47acc1177fb9225edb4f5f0d25ed716f9cb
 F src/os.h cea2e179bb33f4fc09dbb9fcd51b2246544bd2db
-F src/os_common.h f7fd79fb4c5e9ffa9d76cbe4fe7fe182f4573a0e
+F src/os_common.h a5c446d3b93f09f369d13bf217de4bed3437dd1c
 F src/os_os2.c cba4e96fadb949076c717108fe0599d1a3c2e446
 F src/os_os2.h e5f17dd69333632bbc3112881ea407c37d245eb3
 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
@@ -109,13 +109,13 @@ F src/random.c 6119474a6f6917f708c1dee25b9a8e519a620e88
 F src/select.c 3b167744fc375bddfddcef87feb18f5171737677
 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
 F src/shell.c ac29402b538515fa4697282387be9c1205e6e9eb
-F src/sqlite.h.in 8164526b1658a6dad472953ea91239849f913d45
+F src/sqlite.h.in c5e572a7c122df0055e3d8ac32a866d6f24b1a6a
 F src/sqlite3ext.h a27bedc222df5e5f0f458ac99726d0483b953a91
-F src/sqliteInt.h c484c3e6feb944d45036457dfe35ae871dcf428c
+F src/sqliteInt.h aaf44ba52e0afe1327baae8082e3662d7b36723b
 F src/sqliteLimit.h f14609c27636ebc217c9603ade26dbdd7d0f6afa
 F src/table.c a8de75bcedf84d4060d804264b067ab3b1a3561d
 F src/tclsqlite.c 648e6f53041ce4974234d4963e71680926760925
-F src/test1.c 0024d7069ecabe0ccc4e2f491e4a43ed5d3f4196
+F src/test1.c 94bd41c24a4d8d782e39c1275421511587d8b293
 F src/test2.c 24458b17ab2f3c90cbc1c8446bd7ffe69be62f88
 F src/test3.c a280931fb40222b7c90da45eea926459beee8904
 F src/test4.c 8b784cd82de158a2317cb4ac4bc86f91ad315e25
@@ -454,7 +454,7 @@ F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8
 F tool/memleak3.tcl 7707006ee908cffff210c98158788d85bb3fcdbf
 F tool/mkkeywordhash.c ef93810fc41fb3d3dbacf9a33a29be88ea99ffa9
 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
-F tool/mksqlite3c.tcl e86df6c4d4980b5b6363f89b5a2b3411f1efb05e
+F tool/mksqlite3c.tcl 9780738c0198f3708d5eb1790164aa2d56d096fc
 F tool/mksqlite3internalh.tcl 47737a925fb02fce43e2c0a14b3cc17574a4d44a
 F tool/omittest.tcl e6b3d6a1285f9813bc1dea53bb522b4b72774710
 F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
@@ -523,7 +523,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 7550dd1d5980a399fbb06b4ed69216700f879a0b
-R 584af6434a09845fc3702df718d20d4a
+P c09ec102c4f62e492dd3676ef0aa1a183d6ce3b3
+R cea8b15e0263240d01ec2143a968d634
 U drh
-Z 4a56fa1cdaa944e9bf519a503814dead
+Z dc18878d52ac04956311ef0f83f758c1
index 98f89c125dd6b14ac3d8661fd7f9650b3cb2f3e8..a736cb631ef64944d18e9c92cf5c32967b848471 100644 (file)
@@ -1 +1 @@
-c09ec102c4f62e492dd3676ef0aa1a183d6ce3b3
\ No newline at end of file
+3759a38fe8e8a873dc3aae8dc99ca1010551b50b
\ No newline at end of file
index 4294dd7fc9fd0f19146f89f4672803e683312d03..0c54405efacd0dba67054318d638f83e131fd9b5 100644 (file)
@@ -36,7 +36,7 @@
 unsigned int sqlite3_pending_byte = 0x40000000;
 #endif
 
-#ifdef SQLITE_TEST
+#ifdef SQLITE_DEBUG
 int sqlite3_os_trace = 0;
 #define OSTRACE1(X)         if( sqlite3_os_trace ) sqlite3DebugPrintf(X)
 #define OSTRACE2(X,Y)       if( sqlite3_os_trace ) sqlite3DebugPrintf(X,Y)
index f504d220f25d24ae87e684d63965741b09bb37fe..cd5cfda1a4736f98f570942123b6f3eefd853e9d 100644 (file)
@@ -30,7 +30,7 @@
 ** the version number) and changes its name to "sqlite3.h" as
 ** part of the build process.
 **
-** @(#) $Id: sqlite.h.in,v 1.218 2007/07/19 12:41:40 drh Exp $
+** @(#) $Id: sqlite.h.in,v 1.219 2007/08/08 12:11:21 drh Exp $
 */
 #ifndef _SQLITE3_H_
 #define _SQLITE3_H_
 extern "C" {
 #endif
 
+/*
+** Add the ability to override 'extern'
+*/
+#ifndef SQLITE_EXTERN
+# define SQLITE_EXTERN extern
+#endif
+
 /*
 ** Make sure these symbols where not defined by some previous header
 ** file.
@@ -100,7 +107,7 @@ extern "C" {
 ** is provided for DLL users who can only access functions and not
 ** constants within the DLL.
 */
-extern const char sqlite3_version[];
+SQLITE_EXTERN const char sqlite3_version[];
 const char *sqlite3_libversion(void);
 int sqlite3_libversion_number(void);
 
@@ -2020,7 +2027,7 @@ int sqlite3_sleep(int);
 ** it is not safe to invoke this routine after [sqlite3_open()] has
 ** been called.
 */
-extern char *sqlite3_temp_directory;
+SQLITE_EXTERN char *sqlite3_temp_directory;
 
 /*
 ** CAPI3REF:  Test To See If The Databse Is In Auto-Commit Mode
index f2868b504a8167263d156991d8d0c79689b1acc8..21e5dbd3c0285ac990b0be13e06c89ab1e54af30 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.584 2007/08/08 01:04:52 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.585 2007/08/08 12:11:21 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -1548,13 +1548,6 @@ typedef struct {
   int rc;             /* Result code stored here */
 } InitData;
 
-/*
- * This global flag is set for performance testing of triggers. When it is set
- * SQLite will perform the overhead of building new and old trigger references 
- * even when no triggers exist
- */
-extern int sqlite3_always_code_trigger_setup;
-
 /*
 ** Assuming zIn points to the first byte of a UTF-8 character,
 ** advance zIn to point to the first byte of the next UTF-8 character.
@@ -1954,6 +1947,6 @@ void sqlite3Put4byte(u8*, u32);
 # define IOTRACE(A)
 # define sqlite3VdbeIOTraceSql(X)
 #endif
-extern void (*sqlite3_io_trace)(const char*,...);
+SQLITE_EXTERN void (*sqlite3_io_trace)(const char*,...);
 
 #endif
index 7513c00066f49009825ae1bb9da5b1ecd8ace084..b86f4c8f661d9258bc15529496e49fc8e036b06d 100644 (file)
@@ -13,7 +13,7 @@
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test1.c,v 1.258 2007/06/26 00:37:28 drh Exp $
+** $Id: test1.c,v 1.259 2007/08/08 12:11:21 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
@@ -4440,7 +4440,6 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
   };
   static int bitmask_size = sizeof(Bitmask)*8;
   int i;
-  extern int sqlite3_os_trace;
   extern int sqlite3_where_trace;
   extern int sqlite3_sync_count, sqlite3_fullsync_count;
   extern int sqlite3_opentemp_count;
@@ -4460,6 +4459,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
   extern int sqlite3_os_type;
 #endif
 #ifdef SQLITE_DEBUG
+  extern int sqlite3_os_trace;
   extern int sqlite3_vdbe_addop_trace;
 #endif
 #ifdef SQLITE_TEST
@@ -4488,8 +4488,6 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
       (char*)&sqlite3_open_file_count, TCL_LINK_INT);
   Tcl_LinkVar(interp, "sqlite_current_time", 
       (char*)&sqlite3_current_time, TCL_LINK_INT);
-  Tcl_LinkVar(interp, "sqlite_os_trace",
-      (char*)&sqlite3_os_trace, TCL_LINK_INT);
   Tcl_LinkVar(interp, "sqlite3_tsd_count",
       (char*)&sqlite3_tsd_count, TCL_LINK_INT);
   Tcl_LinkVar(interp, "sqlite3_xferopt_count",
@@ -4537,6 +4535,8 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
       (char*)&sqlite3_vdbe_addop_trace, TCL_LINK_INT);
   Tcl_LinkVar(interp, "sqlite_where_trace",
       (char*)&sqlite3_where_trace, TCL_LINK_INT);
+  Tcl_LinkVar(interp, "sqlite_os_trace",
+      (char*)&sqlite3_os_trace, TCL_LINK_INT);
 #endif
 #ifdef SQLITE_MEMDEBUG
   Tcl_LinkVar(interp, "sqlite_memused",
index 84958153b09c3eef085a0d1568c8e06be0467b8a..d1e957ddcd7a6d3ba9dff10ed07ebffaa8d27d06 100644 (file)
@@ -129,7 +129,7 @@ proc copy_file {filename} {
   set tail [file tail $filename]
   section_comment "Begin file $tail"
   set in [open $filename r]
-  set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+ \*?(sqlite3[a-zA-Z0-9]+)([[;]| =)}
+  set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+(sqlite3[_a-zA-Z0-9]+)(\[|;| =)}
   set declpattern {[a-zA-Z][a-zA-Z_0-9 ]+ \*?(sqlite3[_a-zA-Z0-9]+)\(}
   if {[file extension $filename]==".h"} {
     set declpattern " *$declpattern"
@@ -155,7 +155,7 @@ proc copy_file {filename} {
       puts $out "#if 0"
     } elseif {[regexp {^#line} $line]} {
       # Skip #line directives.
-    } elseif {$addstatic && ![regexp {^static} $line]} {
+    } elseif {$addstatic && ![regexp {^(static|typedef)} $line]} {
       if {[regexp $declpattern $line all funcname]} {
         # Add the SQLITE_PRIVATE or SQLITE_API keyword before functions.
         # so that linkage can be modified at compile-time.
@@ -170,9 +170,13 @@ proc copy_file {filename} {
         if {![regexp {^sqlite3_} $varname]} {
           regsub {^extern } $line {} line
           puts $out "SQLITE_PRIVATE $line"
+        } elseif {![regexp {^SQLITE_EXTERN} $line]} {
+          puts $out "SQLITE_API $line"
         } else {
           puts $out $line
         }
+      } elseif {[regexp {^void \(\*sqlite3_io_trace\)} $line]} {
+        puts $out "SQLITE_API $line"
       } else {
         puts $out $line
       }