You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by ka...@apache.org on 2004/09/16 03:25:39 UTC
cvs commit: tcl-rivet/src rivetCrypt.c rivetList.c rivetPkgInit.c rivetWWW.c
karl 2004/09/15 18:25:39
Modified: . ChangeLog
src rivetCrypt.c rivetList.c rivetPkgInit.c rivetWWW.c
Added: . README.MacOSX
Log:
* src/rivetPkgInit.c: Added a Rivet_SafeInit so lib can be loaded from safe
interpreters, which also makes it work better under Mac OS X.
* src/rivetCrypt.c: Added function header to init routine.
* src/rivetList.c: (same)
* src/rivetWWW.c: (same)
* README.MacOSX: Temporary file to document Mac OS X build quirks.
2004-09-16 Karl Lehenbauer <ka...@sc.com>
Revision Changes Path
1.191 +11 -0 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -r1.190 -r1.191
--- ChangeLog 16 Sep 2004 01:08:52 -0000 1.190
+++ ChangeLog 16 Sep 2004 01:25:38 -0000 1.191
@@ -1,4 +1,15 @@
2004-09-16 Karl Lehenbauer <ka...@sc.com>
+ * src/rivetPkgInit.c: Added a Rivet_SafeInit so lib can
+ be loaded from safe interpreters, which also makes it work
+ better under Mac OS X.
+
+ * src/rivetCrypt.c: Added function header to init routine.
+ * src/rivetList.c: (same)
+ * src/rivetWWW.c: (same)
+
+ * README.MacOSX: Temporary file to document Mac OS X build quirks.
+
+2004-09-16 Karl Lehenbauer <ka...@sc.com>
* src/configure.tcl: If a configuration variable in
tclConfig.sh ever had an equal sign in the "value"
1.1 tcl-rivet/README.MacOSX
Index: README.MacOSX
===================================================================
$Id: README.MacOSX,v 1.1 2004/09/16 01:25:38 karl Exp $
Building Rivet isn't 100% turnkey under Mac OS X, but it's getting better
and hopefully it won't be too long until it builds without tweaking.
In the meantime, here's what we do:
Build and install tclsh8.4 and apache from darwinports, plus other stuff
like postgres. Go get Pgtcl off of gborg.postgresql.org and get it built
and installed. (If you want to use a SQL database, this is one way to go
about it, and we've had good results with it.)
Run the configure script:
tclsh8.4 ./configure.tcl -prefix /opt/local -with-apxs /opt/local/sbin/apxs -verbose -with-tclconfig /opt/local/lib/tclConfig.sh
It will complain about several undefined variables.
Edit configs.tcl and change
set ::configs::TCL_SHLIB_LD {}
to be
set ::configs::TCL_SHLIB_LD {cc -dynamiclib -undefined suppress -flat_namespace}
1.9 +12 -0 tcl-rivet/src/rivetCrypt.c
Index: rivetCrypt.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/rivetCrypt.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- rivetCrypt.c 30 Jun 2004 10:47:46 -0000 1.8
+++ rivetCrypt.c 16 Sep 2004 01:25:38 -0000 1.9
@@ -144,6 +144,18 @@
#endif /* ! crypt */
}
+
+/*-----------------------------------------------------------------------------
+ * Rivet_initCrypt --
+ * Initialize the encrypt, decrypt and crypt commands in an interpreter.
+ *
+ * These routines have been examined and are believed to be safe in a safe
+ * interpreter, as they only manipulate and return Tcl strings.
+ *
+ * Parameters:
+ * o interp - Interpreter to add commands to.
+ *-----------------------------------------------------------------------------
+ */
int
Rivet_InitCrypt( Tcl_Interp *interp )
{
1.6 +3 -0 tcl-rivet/src/rivetList.c
Index: rivetList.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/rivetList.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- rivetList.c 24 Feb 2004 10:24:34 -0000 1.5
+++ rivetList.c 16 Sep 2004 01:25:39 -0000 1.6
@@ -520,6 +520,9 @@
* Rivet_initList --
* Initialize the list commands in an interpreter.
*
+ * These routines have been examined and are believed to be safe in a safe
+ * interpreter, as they only manipulate Tcl lists, strings, and arrays.
+ *
* Parameters:
* o interp - Interpreter to add commands to.
*-----------------------------------------------------------------------------
1.4 +33 -0 tcl-rivet/src/rivetPkgInit.c
Index: rivetPkgInit.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/rivetPkgInit.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- rivetPkgInit.c 24 Feb 2004 10:24:34 -0000 1.3
+++ rivetPkgInit.c 16 Sep 2004 01:25:39 -0000 1.4
@@ -21,6 +21,15 @@
#include <tcl.h>
#include "rivet.h"
+
+/*-----------------------------------------------------------------------------
+ * Rivet_Init --
+ * Install the commands provided by librivet into an interpreter.
+ *
+ * Parameters:
+ * o interp - Interpreter to add commands to.
+ *-----------------------------------------------------------------------------
+ */
int
Rivet_Init( Tcl_Interp *interp )
{
@@ -32,3 +41,27 @@
return Tcl_PkgProvide( interp, "Rivet", "1.1" );
}
+
+
+/*-----------------------------------------------------------------------------
+ * Rivet_SafeInit --
+ * Install the commands provided by librivet that are believed to be
+ * safe for use in safe interpreters, into a safe interpreter.
+ *
+ * Parameters:
+ * o interp - Interpreter to add commands to.
+ *-----------------------------------------------------------------------------
+ */
+int
+Rivet_SafeInit( Tcl_Interp *interp )
+{
+ Rivet_InitList( interp );
+
+ Rivet_InitCrypt( interp );
+
+ Rivet_InitWWW( interp );
+
+ return Tcl_PkgProvide( interp, "Rivet", "1.1" );
+}
+
+
1.8 +4 -1 tcl-rivet/src/rivetWWW.c
Index: rivetWWW.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/rivetWWW.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- rivetWWW.c 6 May 2004 08:21:35 -0000 1.7
+++ rivetWWW.c 16 Sep 2004 01:25:39 -0000 1.8
@@ -337,6 +337,9 @@
* Rivet_InitWWW --
*
* Initialize the WWW functions.
+ *
+ * These functions have been examined and are believed to be safe for use
+ * in safe interpreters, as they process strings only.
*-----------------------------------------------------------------------------
*/
int
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org