You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by mx...@apache.org on 2019/01/21 23:53:52 UTC

[tcl-rivet] branch quattuor updated (dbe7124 -> f612260)

This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a change to branch quattuor
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git.


    from dbe7124  creating branch quattuor with initial development for rivet 4
     add b953d0d  Add experimental thread_id command
     add bccd7e3  rigenerated rivet.xml
     add 974bd84  add changelog entry
     add ac95e6d  several changes to resolve ambiguities in implicit casting int from and to size_t
     add 714e7cb  regenerated from rivet.xml.in
     add 4f071db  Useless typecast of size_t into int removed
     add 2e2f6b7  adding automatic reference to current version in configure command example
     add bd8b327  Merge branch 'master' of https://gitbox.apache.org/repos/asf/tcl-rivet
     new d50007b  Merge branch 'master' into quattuor
     new d581f4b  new flag for bridges designed for fork capable MPMs
     new d2f783f  assuring in any way a definition of C99 boolean datatype (bool)
     new 1831e68  Add error message buffer size definition
     new f612260  error message buffer size definitions now using RIVET_MSG_BUFFER_SIZE

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ChangeLog                            | 39 +++++++++++++++++++++++++++---------
 doc/xml/installation.xml             |  4 ++--
 src/mod_rivet_ng/mod_rivet.c         |  5 ++---
 src/mod_rivet_ng/mod_rivet.h         |  4 ++++
 src/mod_rivet_ng/rivetCore.c         | 38 ++++++++++++++++++++++++++++++++---
 src/mod_rivet_ng/rivet_lazy_mpm.c    |  3 ++-
 src/mod_rivet_ng/rivet_prefork_mpm.c |  4 +++-
 src/mod_rivet_ng/rivet_types.h       | 21 +++++++++++++++++--
 src/mod_rivet_ng/rivet_worker_mpm.c  | 14 ++++++-------
 src/rivet.h                          |  1 +
 10 files changed, 105 insertions(+), 28 deletions(-)


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


[tcl-rivet] 01/05: Merge branch 'master' into quattuor

Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch quattuor
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit d50007b04d87be6f246447be8f6d64e78db9509a
Merge: dbe7124 bd8b327
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Wed Jan 16 22:10:55 2019 +0100

    Merge branch 'master' into quattuor

 ChangeLog                    | 19 +++++++++++++++----
 doc/xml/installation.xml     |  4 ++--
 src/mod_rivet_ng/rivetCore.c | 34 +++++++++++++++++++++++++++++++++-
 3 files changed, 50 insertions(+), 7 deletions(-)

diff --cc ChangeLog
index c6b23b5,3383de2..85d6976
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,8 -1,6 +1,12 @@@
+ 2019-01-14 Massimo Manghi <mx...@apache.org>
 -    * src/mod_rivet_ng/rivetCore.c: add experimental ::rivet::thread_id
 -    command
++	* src/mod_rivet_ng/rivetCore.c: add experimental ::rivet::thread_id
++	command
++
 +2019-01-08 Massimo Manghi <mx...@apache.org>
-     * : new branch quattuor created with an initial commit that tries
-     to remodel the initialization, optimize intepreter creation, remove
-     unneeded structures and other data keeping in mind the goal of
-     abating complexity 
++	* : new branch quattuor created with an initial commit that tries
++	to remodel the initialization, optimize intepreter creation, remove
++	unneeded structures and other data keeping in mind the goal of
++	abating complexity 
  
  2019-01-05 Massimo Manghi <mx...@apache.org>
      * doc/: merging from 3.1 fixes to various broken docbook elements


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


[tcl-rivet] 05/05: error message buffer size definitions now using RIVET_MSG_BUFFER_SIZE

Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch quattuor
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit f612260dbc6a477915f71b2daf1c7ae8400a4864
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Mon Jan 21 11:09:09 2019 +0100

    error message buffer size definitions now using RIVET_MSG_BUFFER_SIZE
---
 ChangeLog                           |  6 ++++++
 src/mod_rivet_ng/rivetCore.c        |  4 ++--
 src/mod_rivet_ng/rivet_worker_mpm.c | 13 ++++++-------
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2bfa08b..f5dc5f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,12 @@
 2019-01-05 Massimo Manghi <mx...@apache.org>
 	* doc/: merging from 3.1 fixes to various broken docbook elements
 	 and new entities to external resources' URLs
+	* src/mod_rivet_ng/rivetCore.c,rivet_worker_mpm.c: hardcoded buffer size into
+	their correct macro definitions
+
+2019-01-05 Massimo Manghi <mx...@apache.org>
+	* doc/: merging from 3.1 fixes to various broken docbook elements
+	and new entities to external resources' URLs
 
 2018-12-24 Georgios Petasis <pe...@apache.org>
 	* README.md: Added badges also for the GitHub fork at:
diff --git a/src/mod_rivet_ng/rivetCore.c b/src/mod_rivet_ng/rivetCore.c
index 223a3a3..4ef8de0 100644
--- a/src/mod_rivet_ng/rivetCore.c
+++ b/src/mod_rivet_ng/rivetCore.c
@@ -278,9 +278,9 @@ TCL_CMD_HEADER( Rivet_Parse )
     stat_s = apr_stat(&finfo_b,filename,APR_FINFO_NORM,private->r->pool);
     if (stat_s != APR_SUCCESS)
     {
-        char apr_error_message[256];
+        char apr_error_message[RIVET_MSG_BUFFER_SIZE];
 
-        Tcl_AddErrorInfo(interp,apr_strerror(stat_s,apr_error_message,256));
+        Tcl_AddErrorInfo(interp,apr_strerror(stat_s,apr_error_message,RIVET_MSG_BUFFER_SIZE));
         return TCL_ERROR;
     }
 
diff --git a/src/mod_rivet_ng/rivet_worker_mpm.c b/src/mod_rivet_ng/rivet_worker_mpm.c
index 5992d20..45b3850 100644
--- a/src/mod_rivet_ng/rivet_worker_mpm.c
+++ b/src/mod_rivet_ng/rivet_worker_mpm.c
@@ -321,9 +321,9 @@ static void start_thread_pool (int nthreads)
 
         if (rv != APR_SUCCESS) 
         {
-            char    errorbuf[512];
+            char    errorbuf[RIVET_MSG_BUFFER_SIZE];
 
-            apr_strerror(rv, errorbuf,200);
+            apr_strerror(rv, errorbuf,RIVET_MSG_BUFFER_SIZE);
             ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, module_globals->server, 
                 "Error starting request_processor thread (%d) rv=%d:%s\n",i,rv,errorbuf);
             exit(1);
@@ -417,18 +417,17 @@ static void* APR_THREAD_FUNC threaded_bridge_supervisor (apr_thread_t *thd, void
 
                     rv = create_worker_thread (&((apr_thread_t **)mpm->workers)[i]);
                     if (rv != APR_SUCCESS) {
-                        char errorbuf[512];
+                        char errorbuf[RIVET_MSG_BUFFER_SIZE];
 
                         /* we shouldn't ever be in the condition of not being able to start a new thread
                          * Whatever is the reason we log a message and terminate the whole process
                          */
 
-                        apr_strerror(rv,errorbuf,200);
+                        apr_strerror(rv,errorbuf,RIVET_MSG_BUFFER_SIZE);
                         ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, 
                             "Error starting request_processor thread (%d) rv=%d:%s",i,rv,errorbuf);
 
                         exit(1);
-
                     }
                     
                     break;
@@ -553,9 +552,9 @@ void Worker_MPM_ChildInit (apr_pool_t* pool, server_rec* server)
                             threaded_bridge_supervisor, server, module_globals->pool);
 
     if (rv != APR_SUCCESS) {
-        char    errorbuf[512];
+        char errorbuf[RIVET_MSG_BUFFER_SIZE];
 
-        apr_strerror(rv, errorbuf,200);
+        apr_strerror(rv, errorbuf,RIVET_MSG_BUFFER_SIZE);
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, server, 
                      MODNAME "Error starting supervisor thread rv=%d:%s\n",rv,errorbuf);
         exit(1);


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


[tcl-rivet] 03/05: assuring in any way a definition of C99 boolean datatype (bool)

Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch quattuor
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit d2f783f0417a8653182da6f6f2c596f8bfaee0b7
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Wed Jan 16 22:28:36 2019 +0100

    assuring in any way a definition of C99 boolean datatype (bool)
---
 src/mod_rivet_ng/mod_rivet.c | 5 ++---
 src/mod_rivet_ng/mod_rivet.h | 4 ++++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/mod_rivet_ng/mod_rivet.c b/src/mod_rivet_ng/mod_rivet.c
index 0c2dd75..f23f7ad 100644
--- a/src/mod_rivet_ng/mod_rivet.c
+++ b/src/mod_rivet_ng/mod_rivet.c
@@ -50,7 +50,6 @@
 #include <unistd.h>
 #endif /* RIVET_HAVE_UNISTD_H */
 
-#include "rivet_types.h"
 #include "mod_rivet.h"
 #include "apache_config.h"
 
@@ -107,6 +106,7 @@ Rivet_SeekMPMBridge (apr_pool_t* pool,server_rec* server)
     char*   mpm_worker_bridge  = "rivet_worker_mpm.so";
     char*   mpm_bridge_path;
     int     ap_mpm_result;
+
     rivet_server_conf* rsc = RIVET_SERVER_CONF( server->module_config );
 
     /* With the env variable RIVET_MPM_BRIDGE we have the chance to tell mod_rivet 
@@ -134,7 +134,7 @@ Rivet_SeekMPMBridge (apr_pool_t* pool,server_rec* server)
             mpm_bridge_path = apr_pstrdup(pool,rsc->mpm_bridge);
         }
         else
-        {   
+        {
             ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, server, 
                          MODNAME ": MPM bridge %s not found", rsc->mpm_bridge); 
             exit(1);   
@@ -168,7 +168,6 @@ Rivet_SeekMPMBridge (apr_pool_t* pool,server_rec* server)
             mpm_bridge_path = apr_pstrdup(pool,mpm_worker_bridge);
         }
         mpm_bridge_path = apr_pstrcat(pool,RIVET_DIR,"/mpm/",mpm_bridge_path,NULL);
-
     }
     return mpm_bridge_path;
 }
diff --git a/src/mod_rivet_ng/mod_rivet.h b/src/mod_rivet_ng/mod_rivet.h
index 8f8c476..b4c2a4c 100644
--- a/src/mod_rivet_ng/mod_rivet.h
+++ b/src/mod_rivet_ng/mod_rivet.h
@@ -35,6 +35,8 @@
 #include <rivet_config.h>
 #endif
 
+#include "rivet_types.h"
+
 /*
  * Petasis 16 Dec 2018: This causes the symbol to be exported also from MPMs...
 
@@ -183,6 +185,7 @@ typedef apr_status_t            (RivetBridge_Finalize)      (void*);
 typedef rivet_thread_interp*    (RivetBridge_Master_Interp) (void);
 typedef int                     (RivetBridge_Exit_Handler)  (int);
 typedef rivet_thread_interp*    (RivetBridge_Thread_Interp) (rivet_thread_private*,rivet_server_conf *,rivet_thread_interp*);
+typedef bool                    RivetBridge_InheritsInterps;
 
 typedef struct _mpm_bridge_table {
     RivetBridge_ServerInit    *server_init;
@@ -191,6 +194,7 @@ typedef struct _mpm_bridge_table {
     RivetBridge_Finalize      *child_finalize;
     RivetBridge_Exit_Handler  *exit_handler;
     RivetBridge_Thread_Interp *thread_interp;
+    RivetBridge_InheritsInterps inherits_interps;
 } rivet_bridge_table;
 
 /* we need also a place where to store globals with module wide scope */


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


[tcl-rivet] 04/05: Add error message buffer size definition

Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch quattuor
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit 1831e68d543f94a7282ab1673ac4ea80e0f6516a
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Mon Jan 21 11:04:36 2019 +0100

    Add error message buffer size definition
---
 ChangeLog   | 14 +++++++++-----
 src/rivet.h |  1 +
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 85d6976..2bfa08b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-21 Massimo Manghi <mx...@apache.org>
+	* src/rivet.h: Add error message buffer size definition (was still hardcoded
+	here and there)
+
 2019-01-14 Massimo Manghi <mx...@apache.org>
 	* src/mod_rivet_ng/rivetCore.c: add experimental ::rivet::thread_id
 	command
@@ -9,14 +13,14 @@
 	abating complexity 
 
 2019-01-05 Massimo Manghi <mx...@apache.org>
-    * doc/: merging from 3.1 fixes to various broken docbook elements
-    and new entities to external resources' URLs
+	* doc/: merging from 3.1 fixes to various broken docbook elements
+	 and new entities to external resources' URLs
 
 2018-12-24 Georgios Petasis <pe...@apache.org>
-    * README.md: Added badges also for the GitHub fork at:
-    https://github.com/petasis/tcl-rivet.
+	* README.md: Added badges also for the GitHub fork at:
+	https://github.com/petasis/tcl-rivet.
 
-    * .appveyor.yml: Enhancements to not rely on hard-coded paths.
+	* .appveyor.yml: Enhancements to not rely on hard-coded paths.
 
 2018-12-23 Massimo Manghi <mx...@apache.org>
     * cmake/CMakeLists.txt: starting with rivet 3 we need Tcl > 8.6.1
diff --git a/src/rivet.h b/src/rivet.h
index aec2faa..6572647 100644
--- a/src/rivet.h
+++ b/src/rivet.h
@@ -40,6 +40,7 @@ typedef int rivet_req_ctype;
 #define RIVET_NS                "::rivet"
 #define RIVET_TCL_PACKAGE       "rivet"
 #define RIVETLIB_TCL_PACKAGE    "rivetlib"
+#define RIVET_MSG_BUFFER_SIZE   512
 
 /* Macros to access and check thread private data */
 


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


[tcl-rivet] 02/05: new flag for bridges designed for fork capable MPMs

Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch quattuor
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit d581f4bfc645ce04633155836135024023df5c5c
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Wed Jan 16 22:26:53 2019 +0100

    new flag for bridges designed for fork capable MPMs
---
 src/mod_rivet_ng/rivet_lazy_mpm.c    |  3 ++-
 src/mod_rivet_ng/rivet_prefork_mpm.c |  4 +++-
 src/mod_rivet_ng/rivet_types.h       | 21 +++++++++++++++++++--
 src/mod_rivet_ng/rivet_worker_mpm.c  |  1 +
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/mod_rivet_ng/rivet_lazy_mpm.c b/src/mod_rivet_ng/rivet_lazy_mpm.c
index a573fdb..c579e98 100644
--- a/src/mod_rivet_ng/rivet_lazy_mpm.c
+++ b/src/mod_rivet_ng/rivet_lazy_mpm.c
@@ -527,5 +527,6 @@ RIVET_MPM_BRIDGE {
     Lazy_MPM_Request,
     Lazy_MPM_Finalize,
     Lazy_MPM_ExitHandler,
-    Lazy_MPM_Interp
+    Lazy_MPM_Interp,
+    false
 };
diff --git a/src/mod_rivet_ng/rivet_prefork_mpm.c b/src/mod_rivet_ng/rivet_prefork_mpm.c
index ad39d31..1eeaba1 100644
--- a/src/mod_rivet_ng/rivet_prefork_mpm.c
+++ b/src/mod_rivet_ng/rivet_prefork_mpm.c
@@ -327,6 +327,8 @@ RIVET_MPM_BRIDGE {
     Prefork_Bridge_Request,
     Prefork_Bridge_Finalize,
     Prefork_Bridge_ExitHandler,
-    Prefork_Bridge_Interp
+    Prefork_Bridge_Interp,
+    Prefork_MPM_Interp,
+    true
 };
 
diff --git a/src/mod_rivet_ng/rivet_types.h b/src/mod_rivet_ng/rivet_types.h
index 8f261b0..04e060b 100644
--- a/src/mod_rivet_ng/rivet_types.h
+++ b/src/mod_rivet_ng/rivet_types.h
@@ -27,10 +27,27 @@
 #include <httpd.h>
 #include <tcl.h>
 
+/* Definition suggested in
+ *
+ * https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Particular-Headers.html 
+ *
+ * in order to have a portable definition of the 'bool' data type
+ */
+
 #ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
+# include <stdbool.h>
 #else
-typedef enum {false=0, true=1} bool;
+# ifndef HAVE__BOOL
+#  ifdef __cplusplus
+typedef bool _Bool;
+#  else
+#   define _Bool signed char
+#  endif
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
 #endif
 
 typedef struct _ApacheRequest   ApacheRequest;
diff --git a/src/mod_rivet_ng/rivet_worker_mpm.c b/src/mod_rivet_ng/rivet_worker_mpm.c
index f3d9f04..5992d20 100644
--- a/src/mod_rivet_ng/rivet_worker_mpm.c
+++ b/src/mod_rivet_ng/rivet_worker_mpm.c
@@ -789,4 +789,5 @@ RIVET_MPM_BRIDGE {
     Worker_MPM_Finalize,
     Worker_MPM_ExitHandler,
     Worker_MPM_Interp
+    false,
 };


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