tcl-rivet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxman...@apache.org
Subject svn commit: r1068596 - in /tcl/rivet/branches/rivet-namespace: ChangeLog src/Makefile.am src/apache-2/Makefile.am src/apache-2/mod_rivet.c src/apache-2/rivetCore.c src/rivet.h src/rivetPkgInit.c
Date Tue, 08 Feb 2011 21:51:18 GMT
Author: mxmanghi
Date: Tue Feb  8 21:51:18 2011
New Revision: 1068596

URL: http://svn.apache.org/viewvc?rev=1068596&view=rev
Log:
2011-02-08 Massimo Manghi <mxmanghi@apache.org>
    * src/apache-2/rivetCore.c: call to Rivet_InitWWW to include into Rivet's core the commands
provided in
    src/rivetWWW.c
    * src/apache-2/mod_rivet.c: the inclusion into the module of RivetLib through Tcl_PkgRequire
proved
    to cause segfaults in Rivet_ServerConf. The commands in rivetWWW.c are temporarily loaded
by rivetCore.c
    * src/apache-2/Makefile.am: build of mod_rivet.so includes also code from src/libWWW.o


Modified:
    tcl/rivet/branches/rivet-namespace/ChangeLog
    tcl/rivet/branches/rivet-namespace/src/Makefile.am
    tcl/rivet/branches/rivet-namespace/src/apache-2/Makefile.am
    tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c
    tcl/rivet/branches/rivet-namespace/src/apache-2/rivetCore.c
    tcl/rivet/branches/rivet-namespace/src/rivet.h
    tcl/rivet/branches/rivet-namespace/src/rivetPkgInit.c

Modified: tcl/rivet/branches/rivet-namespace/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/ChangeLog?rev=1068596&r1=1068595&r2=1068596&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/ChangeLog (original)
+++ tcl/rivet/branches/rivet-namespace/ChangeLog Tue Feb  8 21:51:18 2011
@@ -1,4 +1,11 @@
-2011-02-03 Massimo Manghi <mxmanghi@apache.org>
+2011-02-08 Massimo Manghi <mxmanghi@apache.org>
+    * src/apache-2/rivetCore.c: call to Rivet_InitWWW to include into Rivet's core the commands
provided in
+    src/rivetWWW.c
+    * src/apache-2/mod_rivet.c: the inclusion into the module of RivetLib through Tcl_PkgRequire
proved
+    to cause segfaults in Rivet_ServerConf. The commands in rivetWWW.c are temporarily loaded
by rivetCore.c
+    * src/apache-2/Makefile.am: build of mod_rivet.so includes also code from src/libWWW.o
+
+2011-02-07 Massimo Manghi <mxmanghi@apache.org>
     * branches/rivet-namespace: new branch to experiment with the Rivet namespace and Rivet
package 
     * src/rivetPkgInit.c: Provides RivetLib package now when loaded by mod_rivet. Commands
are now
     in the ::Rivet namespace

Modified: tcl/rivet/branches/rivet-namespace/src/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/Makefile.am?rev=1068596&r1=1068595&r2=1068596&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/Makefile.am (original)
+++ tcl/rivet/branches/rivet-namespace/src/Makefile.am Tue Feb  8 21:51:18 2011
@@ -26,7 +26,7 @@ INCLUDES = -I@apache_include@ 
 # rather than the standard library location for the system.
 
 lib_libexecdir = @RIVET_TCL_TARGET@
-lib_libexec_LTLIBRARIES = librivet.la librivetparser.la
+lib_libexec_LTLIBRARIES = librivetlib.la librivetparser.la
 
 #
 # Apache Rivet Module, mod_rivet.so / mod_rivet.dll
@@ -50,10 +50,10 @@ lib_libexec_LTLIBRARIES = librivet.la li
 #
 # Rivet Library
 #
-librivet_la_SOURCES = rivetList.c rivetCrypt.c rivetWWW.c rivetPkgInit.c
-librivet_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version
-librivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@
-librivet_la_CPPFLAGS = @MOD_RIVET_INCLUDES@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@
@APR_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"'
+librivetlib_la_SOURCES = rivetList.c rivetCrypt.c rivetWWW.c rivetPkgInit.c
+librivetlib_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version
+librivetlib_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@
+librivetlib_la_CPPFLAGS = @MOD_RIVET_INCLUDES@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@
@APR_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"'
 
 #
 # Rivet Parser Library

Modified: tcl/rivet/branches/rivet-namespace/src/apache-2/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/apache-2/Makefile.am?rev=1068596&r1=1068595&r2=1068596&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/apache-2/Makefile.am (original)
+++ tcl/rivet/branches/rivet-namespace/src/apache-2/Makefile.am Tue Feb  8 21:51:18 2011
@@ -31,14 +31,15 @@ INCLUDES = -I@apache_include@ -I@RIVET_B
 #
 # Apache Rivet Module, mod_rivet.so / mod_rivet.dll
 #
-mod_rivet_la_SOURCES = 			\
-	apache_multipart_buffer.c 	\
-	apache_request.c			\
-	mod_rivet.c 				\
-	TclWebapache.c 				\
-	rivetCore.c					\
-	../rivetChannel.c 			\
-	../rivetParser.c
+mod_rivet_la_SOURCES = 			        \
+	        apache_multipart_buffer.c 	\
+	        apache_request.c			\
+	        mod_rivet.c 				\
+	        TclWebapache.c 				\
+	        rivetCore.c					\
+	        ../rivetChannel.c 			\
+            ../rivetParser.c            \
+            ../rivetWWW.c
 
 ##mod_rivet_la_SOURCES = mod_rivet.c mod_rivet.h
 

Modified: tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c?rev=1068596&r1=1068595&r2=1068596&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c (original)
+++ tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c Tue Feb  8 21:51:18 2011
@@ -898,8 +898,15 @@ Rivet_PerInterpInit(server_rec *s, rivet
                 "init.tcl must be installed correctly for Apache Rivet to function: %s",
                 Tcl_GetStringResult(interp) );
         exit(1);
-    } 
-
+    }
+ 
+/*
+ * It's been so far impossible to understand why the following call to Tcl_PkgRequire
+ * causes a segfault later on in Rivet_ServerConf when Apache reconstructs the 
+ * configuration record (weird behavior of the framework, still it was confirmed by 
+ * the people at Apache). Commands in rivetWWW.c are now setup by rivetCore.c
+ */
+/*
     if (Tcl_PkgRequire(interp, "RivetLib", "1.2", 1) == NULL)
     {
         ap_log_error( APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
@@ -907,7 +914,7 @@ Rivet_PerInterpInit(server_rec *s, rivet
                 Tcl_GetStringResult(interp) );
         exit(1);
     } 
-
+*/
     /* Set the output buffer size to the largest allowed value, so that we 
      * won't send any result packets to the browser unless the Rivet
      * programmer does a "flush stdout" or the page is completed.

Modified: tcl/rivet/branches/rivet-namespace/src/apache-2/rivetCore.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/apache-2/rivetCore.c?rev=1068596&r1=1068595&r2=1068596&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/apache-2/rivetCore.c (original)
+++ tcl/rivet/branches/rivet-namespace/src/apache-2/rivetCore.c Tue Feb  8 21:51:18 2011
@@ -53,6 +53,10 @@
 extern module rivet_module;
 extern char* TclWeb_GetRawPost (TclWebRequest *req);
 
+/* declarations for commands in rivetWWW.c */
+
+EXTERN int Rivet_InitWWW( Tcl_Interp *interp, Tcl_Namespace* ns);
+
 #define POOL (globals->r->pool)
 
 /*
@@ -1319,6 +1323,8 @@ Rivet_InitCore( Tcl_Interp *interp )
     RIVET_OBJ_CMD ("env",Rivet_EnvCmd,rivet_ns);
     RIVET_OBJ_CMD ("apache_log_error",Rivet_LogErrorCmd,rivet_ns);
 
+    Rivet_InitWWW( interp, rivet_ns);
+
 #ifdef TESTPANIC
     RIVET_OBJ_CMD ("testpanic",TestpanicCmd,rivet_ns);
 #endif

Modified: tcl/rivet/branches/rivet-namespace/src/rivet.h
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/rivet.h?rev=1068596&r1=1068595&r2=1068596&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/rivet.h (original)
+++ tcl/rivet/branches/rivet-namespace/src/rivet.h Tue Feb  8 21:51:18 2011
@@ -47,7 +47,6 @@ Tcl_CreateObjCommand( interp, /* Tcl int
 		      (Tcl_CmdDeleteProc *)NULL /* Tcl Delete Prov */); \
 Tcl_Export(interp,ns,name,0);
 
-
 EXTERN int Rivet_Init( Tcl_Interp *interp );
 EXTERN int Rivet_InitList( Tcl_Interp *interp, Tcl_Namespace* ns);
 EXTERN int Rivet_InitCrypt( Tcl_Interp *interp, Tcl_Namespace* ns);

Modified: tcl/rivet/branches/rivet-namespace/src/rivetPkgInit.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/rivetPkgInit.c?rev=1068596&r1=1068595&r2=1068596&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/rivetPkgInit.c (original)
+++ tcl/rivet/branches/rivet-namespace/src/rivetPkgInit.c Tue Feb  8 21:51:18 2011
@@ -22,12 +22,10 @@
 #include <rivet_config.h>
 #endif
 
-
 #include <tcl.h>
 #include "rivet.h"
 #include "mod_rivet.h"
 
-
 static Tcl_Namespace* 
 Rivet_GetNamespace( Tcl_Interp* interp)
 {
@@ -43,9 +41,7 @@ Rivet_GetNamespace( Tcl_Interp* interp)
     else
     {
 //      fprintf(stderr,"no Associated data found, running standalone\n");
-        rivet_ns = Tcl_CreateNamespace (interp,RIVET_NS,NULL,
-                                        (Tcl_NamespaceDeleteProc *)NULL);
-        
+        rivet_ns = Tcl_CreateNamespace (interp,RIVET_NS,NULL,(Tcl_NamespaceDeleteProc *)NULL);
     }
 
     return rivet_ns;
@@ -53,28 +49,31 @@ Rivet_GetNamespace( Tcl_Interp* interp)
 
 
 /*-----------------------------------------------------------------------------
- * Rivet_Init --
+ * Rivetlib_Init --
+ *
  *   Install the commands provided by librivet into an interpreter.
  *
  * Parameters:
+ *
  *   o interp - Interpreter to add commands to.
+ *
  *-----------------------------------------------------------------------------
  */
 int
-Rivet_Init( Tcl_Interp *interp )
+Rivetlib_Init( Tcl_Interp *interp )
 {
     Tcl_Namespace *rivet_ns = Rivet_GetNamespace(interp);
 
-    Rivet_InitList( interp, rivet_ns );
+    Rivet_InitList ( interp, rivet_ns );
     Rivet_InitCrypt( interp, rivet_ns );
-    Rivet_InitWWW( interp, rivet_ns );
+    Rivet_InitWWW  ( interp, rivet_ns );
 
     return Tcl_PkgProvide( interp, "RivetLib", "1.2" );
 }
 
 
 /*-----------------------------------------------------------------------------
- * Rivet_SafeInit --
+ * Rivetlib_SafeInit --
  *   Install the commands provided by librivet that are believed to be
  *   safe for use in safe interpreters, into a safe interpreter.
  *
@@ -82,8 +81,9 @@ Rivet_Init( Tcl_Interp *interp )
  *   o interp - Interpreter to add commands to.
  *-----------------------------------------------------------------------------
  */
+
 int
-Rivet_SafeInit( Tcl_Interp *interp )
+Rivetlib_SafeInit( Tcl_Interp *interp )
 {
     Tcl_Namespace *rivet_ns = Rivet_GetNamespace(interp);
 
@@ -94,4 +94,3 @@ Rivet_SafeInit( Tcl_Interp *interp )
     return Tcl_PkgProvide( interp, "RivetLib", "1.2" );
 }
 
-



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org


Mime
View raw message