Index: third_party/sqlite/src/src/test_autoext.c |
diff --git a/third_party/sqlite/src/src/test_autoext.c b/third_party/sqlite/src/src/test_autoext.c |
index a5236d23908d45e00c0cc13dd78d3397692ec167..e23e41a08a897988e9284cdf501578ed4b8da263 100644 |
--- a/third_party/sqlite/src/src/test_autoext.c |
+++ b/third_party/sqlite/src/src/test_autoext.c |
@@ -11,7 +11,14 @@ |
************************************************************************* |
** Test extension for testing the sqlite3_auto_extension() function. |
*/ |
-#include "tcl.h" |
+#if defined(INCLUDE_SQLITE_TCL_H) |
+# include "sqlite_tcl.h" |
+#else |
+# include "tcl.h" |
+# ifndef SQLITE_TCLAPI |
+# define SQLITE_TCLAPI |
+# endif |
+#endif |
#include "sqlite3ext.h" |
#ifndef SQLITE_OMIT_LOAD_EXTENSION |
@@ -87,13 +94,13 @@ static int broken_init( |
** |
** Register the "sqr" extension to be loaded automatically. |
*/ |
-static int autoExtSqrObjCmd( |
+static int SQLITE_TCLAPI autoExtSqrObjCmd( |
void * clientData, |
Tcl_Interp *interp, |
int objc, |
Tcl_Obj *CONST objv[] |
){ |
- int rc = sqlite3_auto_extension((void*)sqr_init); |
+ int rc = sqlite3_auto_extension((void(*)(void))sqr_init); |
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); |
return SQLITE_OK; |
} |
@@ -103,13 +110,13 @@ static int autoExtSqrObjCmd( |
** |
** Unregister the "sqr" extension. |
*/ |
-static int cancelAutoExtSqrObjCmd( |
+static int SQLITE_TCLAPI cancelAutoExtSqrObjCmd( |
void * clientData, |
Tcl_Interp *interp, |
int objc, |
Tcl_Obj *CONST objv[] |
){ |
- int rc = sqlite3_cancel_auto_extension((void*)sqr_init); |
+ int rc = sqlite3_cancel_auto_extension((void(*)(void))sqr_init); |
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); |
return SQLITE_OK; |
} |
@@ -119,13 +126,13 @@ static int cancelAutoExtSqrObjCmd( |
** |
** Register the "cube" extension to be loaded automatically. |
*/ |
-static int autoExtCubeObjCmd( |
+static int SQLITE_TCLAPI autoExtCubeObjCmd( |
void * clientData, |
Tcl_Interp *interp, |
int objc, |
Tcl_Obj *CONST objv[] |
){ |
- int rc = sqlite3_auto_extension((void*)cube_init); |
+ int rc = sqlite3_auto_extension((void(*)(void))cube_init); |
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); |
return SQLITE_OK; |
} |
@@ -135,13 +142,13 @@ static int autoExtCubeObjCmd( |
** |
** Unregister the "cube" extension. |
*/ |
-static int cancelAutoExtCubeObjCmd( |
+static int SQLITE_TCLAPI cancelAutoExtCubeObjCmd( |
void * clientData, |
Tcl_Interp *interp, |
int objc, |
Tcl_Obj *CONST objv[] |
){ |
- int rc = sqlite3_cancel_auto_extension((void*)cube_init); |
+ int rc = sqlite3_cancel_auto_extension((void(*)(void))cube_init); |
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); |
return SQLITE_OK; |
} |
@@ -151,13 +158,13 @@ static int cancelAutoExtCubeObjCmd( |
** |
** Register the broken extension to be loaded automatically. |
*/ |
-static int autoExtBrokenObjCmd( |
+static int SQLITE_TCLAPI autoExtBrokenObjCmd( |
void * clientData, |
Tcl_Interp *interp, |
int objc, |
Tcl_Obj *CONST objv[] |
){ |
- int rc = sqlite3_auto_extension((void*)broken_init); |
+ int rc = sqlite3_auto_extension((void(*)(void))broken_init); |
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); |
return SQLITE_OK; |
} |
@@ -167,13 +174,13 @@ static int autoExtBrokenObjCmd( |
** |
** Unregister the broken extension. |
*/ |
-static int cancelAutoExtBrokenObjCmd( |
+static int SQLITE_TCLAPI cancelAutoExtBrokenObjCmd( |
void * clientData, |
Tcl_Interp *interp, |
int objc, |
Tcl_Obj *CONST objv[] |
){ |
- int rc = sqlite3_cancel_auto_extension((void*)broken_init); |
+ int rc = sqlite3_cancel_auto_extension((void(*)(void))broken_init); |
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); |
return SQLITE_OK; |
} |
@@ -186,7 +193,7 @@ static int cancelAutoExtBrokenObjCmd( |
** |
** Reset all auto-extensions |
*/ |
-static int resetAutoExtObjCmd( |
+static int SQLITE_TCLAPI resetAutoExtObjCmd( |
void * clientData, |
Tcl_Interp *interp, |
int objc, |