diff --git a/sqlite-2.8.17-tcl86.patch b/sqlite-2.8.17-tcl86.patch new file mode 100644 index 0000000..3e18d75 --- /dev/null +++ b/sqlite-2.8.17-tcl86.patch @@ -0,0 +1,53 @@ +diff --git a/src/md5.c b/src/md5.c +index a22f6d2..fc5693f 100644 +--- a/src/md5.c ++++ b/src/md5.c +@@ -296,6 +296,7 @@ static void DigestToBase16(unsigned char *digest, char *zBuf){ + static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){ + MD5Context ctx; + unsigned char digest[16]; ++ char buf[64]; + + if( argc!=2 ){ + Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0], +@@ -305,7 +306,8 @@ static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){ + MD5Init(&ctx); + MD5Update(&ctx, (unsigned char*)argv[1], (unsigned)strlen(argv[1])); + MD5Final(digest, &ctx); +- DigestToBase16(digest, interp->result); ++ DigestToBase16(digest, buf); ++ Tcl_SetResult(interp, buf, TCL_VOLATILE); + return TCL_OK; + } + +@@ -318,6 +320,7 @@ static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){ + MD5Context ctx; + unsigned char digest[16]; + char zBuf[10240]; ++ char buf[64]; + + if( argc!=2 ){ + Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0], +@@ -339,7 +342,8 @@ static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){ + } + fclose(in); + MD5Final(digest, &ctx); +- DigestToBase16(digest, interp->result); ++ DigestToBase16(digest, buf); ++ Tcl_SetResult(interp, buf, TCL_VOLATILE); + return TCL_OK; + } + +diff --git a/src/tclsqlite.c b/src/tclsqlite.c +index cc8daa1..7337ed7 100644 +--- a/src/tclsqlite.c ++++ b/src/tclsqlite.c +@@ -1246,7 +1246,7 @@ int TCLSH_MAIN(int argc, char **argv){ + } + if( Tcl_EvalFile(interp, argv[1])!=TCL_OK ){ + const char *zInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); +- if( zInfo==0 ) zInfo = interp->result; ++ if( zInfo==0 ) zInfo = Tcl_GetStringResult(interp); + fprintf(stderr,"%s: %s\n", *argv, zInfo); + return TCL_ERROR; + } diff --git a/sqlite2.spec b/sqlite2.spec index 10f6506..c02c7d6 100644 --- a/sqlite2.spec +++ b/sqlite2.spec @@ -19,6 +19,7 @@ Patch6: sqlite-2.8.17-test.patch Patch7: sqlite-2.8.17-tcl.patch Patch8: sqlite-2.8.17-ppc64.patch Patch9: sqlite-2.8.17-format-security.patch +Patch10: sqlite-2.8.17-tcl86.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel, readline-devel, %{_includedir}/tcl.h @@ -73,6 +74,7 @@ This package contains tcl bindings for sqlite. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 sed -i.rpath 's!__VERSION__!%{version}!g' Makefile.in # Patch additional /usr/lib locations where we don't have $(libdir) # to substitute with.