You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2017/10/31 07:17:04 UTC
svn commit: r1813852 - in /tcl/rivet/trunk: ./ cmake/ doc/ doc/xml-2/
doc/xml/ rivet/ rivet/packages/dio/ rivet/packages/form/
rivet/packages/formbroker/ src/librivet/ src/mod_rivet_ng/ src/parser/
Author: mxmanghi
Date: Tue Oct 31 07:17:04 2017
New Revision: 1813852
URL: http://svn.apache.org/viewvc?rev=1813852&view=rev
Log:
* merging branch cmake back into trunk
Added:
tcl/rivet/trunk/cmake/
- copied from r1813659, tcl/rivet/branches/cmake/cmake/
Modified:
tcl/rivet/trunk/ (props changed)
tcl/rivet/trunk/ChangeLog
tcl/rivet/trunk/Makefile.in
tcl/rivet/trunk/doc/ (props changed)
tcl/rivet/trunk/doc/xml-2/form.xml
tcl/rivet/trunk/doc/xml/formbroker.xml
tcl/rivet/trunk/doc/xml/intro.xml
tcl/rivet/trunk/rivet/packages/dio/dio.tcl
tcl/rivet/trunk/rivet/packages/form/form2.tcl
tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl
tcl/rivet/trunk/rivet/pkgIndex.tcl
tcl/rivet/trunk/src/librivet/rivetCrypt.c
tcl/rivet/trunk/src/librivet/rivetList.c
tcl/rivet/trunk/src/librivet/rivetPkgInit.c
tcl/rivet/trunk/src/librivet/rivetWWW.c
tcl/rivet/trunk/src/mod_rivet_ng/TclWebapache.c
tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.c
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_cache.c
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c
tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c
tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.h
tcl/rivet/trunk/src/mod_rivet_ng/rivet_lazy_mpm.c
tcl/rivet/trunk/src/mod_rivet_ng/rivet_prefork_mpm.c
tcl/rivet/trunk/src/mod_rivet_ng/rivet_worker_mpm.c
tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c
tcl/rivet/trunk/src/parser/parserPkgInit.c
tcl/rivet/trunk/src/parser/rivetParser.c
Propchange: tcl/rivet/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 31 07:17:04 2017
@@ -1,4 +1,5 @@
/tcl/rivet/branches/2_0:939332-1027850
+/tcl/rivet/branches/cmake:1803881-1813659
/tcl/rivet/branches/master-interp:1062190-1065801
/tcl/rivet/branches/modular:1486173-1588076
/tcl/rivet/branches/neh:1069501-1076014
Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Tue Oct 31 07:17:04 2017
@@ -1,3 +1,6 @@
+2017-10-31 Massimo Manghi <mx...@apache.org>
+ * merging branch cmake back into trunk
+
2017-10-28 Massimo Manghi <mx...@apache.org>
* docs/xml/cmake.xml: draft manual page for cmake build system
@@ -12,12 +15,14 @@
* doc/: add new cmake.xml file, further manual developments
2017-10-12 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/mod_rivet.c: add preprocessor test on
+ variable declaration for the WIN32 build
+ * src/librivet/rivetWWW.c: fixed subtle buffer overflow
+ mistakenly assuming snprintf printed a byte less than
* doc/xml/processing.xml,command.xml: further elaboration of the
Rivet 3.0 manual. Update ::rivet::redirect manual entry
* tcl/rivet-tcl/redirect.tcl: now handling generic boolean arguments
or any integer > 0 (as for the HTTP status codes)
- * src/librivet/rivetWWW.c: fixed subtle buffer overflow
- with sprintfn
2017-09-17 Massimo Manghi <mx...@apache.org>
* doc/xml/examples.xml: moved into final directory
@@ -38,10 +43,162 @@
characters. The method has been changed the have an uniform
way to handle this
+2017-08-12 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/mod_rivet.c: moving to
+ Rivet_RunServerInit the call to the bridge specific
+ server initialization script. Confining compilation
+ of the code checking AP_PARENT_PID to Windows
+ systems
+
+2017-08-10 Georgios Petasis <pe...@apache.org>
+ * cmake/CMakeLists.txt: Modified also variable CMAKE_PREFIX_PATH, as
+ TCL_ROOT and TclStub_ROOT are specific to CMake 3.9.0, and will be
+ removed. See https://gitlab.kitware.com/cmake/cmake/issues/17158.
+
+2017-08-11 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/mod_rivet.c: add check on
+ environment variable AP_PARENT_PID to prevent
+ server Tcl init script from running in winnt
+ controlled child processes (as per Apache HTTP
+ server documentation)
+
+2017-08-10 Georgios Petasis <pe...@apache.org>
+ * src\mod_rivet_ng\apache_config.c:
+ * src\mod_rivet_ng\mod_rivet.c:
+ * src\mod_rivet_ng\mod_rivet_common.c:
+ * src\mod_rivet_ng\mod_rivet_generator.c:
+ * src\mod_rivet_ng\rivet_lazy_mpm.c:
+ * src\mod_rivet_ng\worker_prefork_common.c: Locally declared symbol
+ rivet_module as extern (DLLIMPORT).
+
+ * branches\cmake\src\mod_rivet_ng\mod_rivet.h: Symbol rivet_module
+ removed from header file.
+
+ * branches\cmake\src\mod_rivet_ng\mod_rivet_common.c: Used ckalloc() instead
+ of apr_pcalloc() for variable globals, in Rivet_PerInterpInit().
+
+ * cmake\README.cmake:
+ * cmake\CMakeLists.txt: Added support for picking a Tcl installed at a
+ non-standard location. Updated README.cmake with an example. Also disabled
+ the switch to export all symbols from mod_rivet.so
+ (WINDOWS_EXPORT_ALL_SYMBOLS).
+
+ * src\mod_rivet_ng\mod_rivet_common.c:
+ * src\mod_rivet_ng\rivetCore.c: Fixes in DLLEXPORT.
+
2017-08-07 Massimo Manghi <mx...@apache.org>
* src/mod_rivet_ng/mod_rivet.c: Rivet_ServerInit is now implementing
the recommended mechanism to avoid the double load of external
modules
+
+2017-08-05 Georgios Petasis <pe...@apache.org>
+ * cmake\CMakeLists.txt: rivetparser/rivetlib shared libraries now have the
+ prefix "lib" under all platforms.
+
+ * cmake\cmake_extra_modules\rivet_config.h.cmake: RIVET_RIVET_CORE or
+ RIVET_CORE? Added also support for RIVET_CORE, but disabled, as it causes
+ compilation errors (in C preprosessor, two strings are compared, which is
+ not supported).
+
+ * rivet\pkgIndex.tcl: Dropped ".so" in favour of "info sharedlibextension".
+
+ * src\librivet\rivetCrypt.c:
+ * src\librivet\rivetList.c:
+ * src\librivet\rivetPkgInit.c:
+ * src\librivet\rivetWWW.c: Definition of EXTERN and exported symbols through
+ DLLEXPORT.
+
+ * src\mod_rivet_ng\mod_rivet.c:
+ * src\mod_rivet_ng\mod_rivet_cache.c:
+ * src\mod_rivet_ng\mod_rivet_common.c:
+ * src\mod_rivet_ng\mod_rivet_generator.c:
+ * src\mod_rivet_ng\rivetCore.c:
+ * src\mod_rivet_ng\rivetCore.h:
+ * src\parser\parserPkgInit.c: Definition of EXTERN and exported symbols
+ through DLLEXPORT.
+
+2017-08-05 Georgios Petasis <pe...@apache.org>
+ * src\mod_rivet_ng\rivet_lazy_mpm.c:
+ * src\mod_rivet_ng\rivet_prefork_mpm.c:
+ * src\mod_rivet_ng\rivet_worker_mpm.c: Added DLLEXPORT for the symbol
+ defined with RIVET_MPM_BRIDGE macro.
+
+ * cmake\CMakeLists.txt: Exported all symbols for mod_rivet.so under Windows,
+ to copy the behaviour in UNIX systems (where all symbols are exported from
+ shared libraries).
+
+ * cmake\cmake_extra_modules\checks.cmake:
+ * cmake\cmake_extra_modules\config.h.cmake:
+ * cmake\cmake_extra_modules\rivet_config.h.cmake: Under VC11, round()
+ has not been implemented. Added checks in CMake build, for detecting
+ round()'s absence.
+
+ * src\mod_rivet_ng\rivetCore.c:
+ * src\mod_rivet_ng\rivet_lazy_mpm.c:
+ * src\mod_rivet_ng\rivet_prefork_mpm.c:
+ * src\mod_rivet_ng\rivet_worker_mpm.c:
+ * src\mod_rivet_ng\worker_prefork_common.c:
+ * src\parser\parserPkgInit.c: Changes for avoiding link error under Windows
+ (mostly) related to importing exported symbols from mod_rivet.so.
+
+2017-08-05 Georgios Petasis <pe...@apache.org>
+ * src/mod_rivet_ng/mod_rivet_common.c: Reordered header files, so
+ <unistd.h> (and its check) to come after "mod_rivet.h" that includes
+ "rivet_config.h".
+
+2017-08-04 Georgios Petasis <pe...@apache.org>
+ * cmake\CMakeLists.txt:
+ * cmake\cmake_extra_modules\FindAPR.cmake:
+ * src\mod_rivet_ng\TclWebapache.c:
+ * src\mod_rivet_ng\mod_rivet.c:
+ * src\mod_rivet_ng\mod_rivet.h:
+ * src\mod_rivet_ng\mod_rivet_cache.c:
+ * src\mod_rivet_ng\mod_rivet_common.c:
+ * src\mod_rivet_ng\mod_rivet_generator.c:
+ * src\mod_rivet_ng\rivetCore.c:
+ * src\parser\rivetParser.c: Changes for fixing compilation errors under
+ Windows.
+
+2017-08-04 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/rivetCore.c: changes demanded by windows compiler
+ * rivet/pkgIndex.tcl: recreated with a up to date list of packages
+
+2017-08-04 Georgios Petasis <pe...@apache.org>
+ * cmake\CMakeLists.txt: Various changes for better support build under
+ Windows.
+
+ * cmake\README.cmake: Added a section for building under Windows.
+
+ * cmake\cmake_extra_modules\FindAPACHE.cmake: Enhanced customisability.
+ The user can guide detection with variables APACHE_INCLUDE_DIR_HINTS,
+ APACHE_MODULE_DIR_HINTS, APACHE_LIB_DIR_HINTS, APACHE_ROOT.
+
+ * cmake\cmake_extra_modules\FindAPR.cmake: Enhanced customisability.
+ The user can guide detection with variables APR_INCLUDE_DIR_HINTS,
+ APACHE_INCLUDE_DIR_HINTS, APACHE_ROOT, APR_LIBRARY_HINTS,
+ APRUTIL_INCLUDE_DIR_HINTS, APRUTIL_LIBRARY_HINTS.
+
+2017-08-03 Georgios Petasis <pe...@apache.org>
+ * CMake build system: Removed "lib" prefix from some libraris.
+
+2017-08-03 Georgios Petasis <pe...@apache.org>
+ * CMake build system: Added support for installing Rivet. Added more
+ checks for various definitions in config.h/rivet_config.h.
+
+2017-08-03 Georgios Petasis <pe...@apache.org>
+ * CMake build system: Added missing source files, enabled as default
+ the build of shared libraries, added needed link libraries. Also
+ extended build system for all Rivet libraries (librivetlib.so,
+ librivetparser.so, librivet_worker_mpm.so, librivet_prefork_mpm.so,
+ librivet_lazy_mpm.so), and checked their linked libraries and missing
+ symbols with their versions when build with autoconf.
+
+2017-08-02 Massimo Manghi <mx...@apache.org>
+ * Changed references in cmake/CMakeList.txt to build with
+ code in src/mod_rivet_ng.
+
+2017-08-02 Georgios Petasis <pe...@apache.org>
+ * Created a new branch (cmake) for the CMake build system.
2017-07-24 Massimo Manghi <mx...@apache.org>
* xml/rivet.xml.in: reflects rivet.xml having been moved to doc/xml
Modified: tcl/rivet/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/Makefile.in?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/Makefile.in (original)
+++ tcl/rivet/trunk/Makefile.in Tue Oct 31 07:17:04 2017
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -669,7 +669,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
@@ -695,7 +695,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@@ -713,7 +713,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -723,7 +723,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
Propchange: tcl/rivet/trunk/doc/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 31 07:17:04 2017
@@ -1,4 +1,5 @@
/tcl/rivet/branches/2_0/doc:939332-1027850
+/tcl/rivet/branches/cmake/doc:1803881-1813659
/tcl/rivet/branches/master-interp/doc:1062190-1065801
/tcl/rivet/branches/modular/doc:1486173-1588076
/tcl/rivet/branches/rivet-namespace/doc:1065843-1211714
Modified: tcl/rivet/trunk/doc/xml-2/form.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml-2/form.xml?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml-2/form.xml (original)
+++ tcl/rivet/trunk/doc/xml-2/form.xml Tue Oct 31 07:17:04 2017
@@ -504,7 +504,7 @@ myform destroy</programlisting>
<arg>args</arg>
</cmdsynopsis>
<para>
- hidden input element: typically embedded in a form in order to
+ hidden input element: typicall embedded in a form in order to
pass status variables.
</para>
</listitem>
@@ -514,44 +514,6 @@ myform destroy</programlisting>
<refsect2>
<variablelist>
<varlistentry>
- <listitem>
- <cmdsynopsis>
- <arg choice="plain">text</arg>
- <arg>name</arg>
- <arg>args</arg>
- </cmdsynopsis>
- <para>
- basic text input element
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2>
- <variablelist>
- <varlistentry>
- <listitem>
- <cmdsynopsis>
- <arg choice="plain">textarea</arg>
- <arg>name</arg>
- <arg>args</arg>
- </cmdsynopsis>
- <para>
- textarea input element. As such this element
- can be customized with the attributes <arg>rows</arg> and
- <arg>columns</arg>
- <programlisting>form textarea a_text_area -rows 20 -cols 80</programlisting>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
-
- <refsect2>
- <variablelist>
- <varlistentry>
<listitem>
<cmdsynopsis>
<arg choice="plain">submit</arg>
Modified: tcl/rivet/trunk/doc/xml/formbroker.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/formbroker.xml?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/formbroker.xml (original)
+++ tcl/rivet/trunk/doc/xml/formbroker.xml Tue Oct 31 07:17:04 2017
@@ -48,8 +48,9 @@
descriptors passed to <command>create</command>. Each descriptor
is a list of parameter or parameter-value pairs whose order has as only requirement
to begin with the <command>{variable_name variable_type}</command> pair.
- A formbroker object handles natively integer, unsigned, string, boolean and email data types,
- but new types can be defined along with their validating procedure.
+ A formbroker object handles natively integer, unsigned, string, boolean and email data types.
+ The programmer can defined new data type and provide in the descriptor a
+ reference to a validating procedure for that type.
</para>
<para>
The optional <arg>-quoting quoting_procedure</arg> switch assigns a procedure to
Modified: tcl/rivet/trunk/doc/xml/intro.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/intro.xml?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/intro.xml (original)
+++ tcl/rivet/trunk/doc/xml/intro.xml Tue Oct 31 07:17:04 2017
@@ -32,10 +32,8 @@
Rivet &version; ships with a major rewriting of mod_rivet, the Apache HTTP
Websever module at the core of Rivet. With this version of the module
we attained full support of different MPM (Multiprocessing Modules) for
- the Apache framework (previous version of mod_rivet only supported
- the prefork MPM), we provide an alternate build system based on
- CMake and we support also Apache for Windows for both the 32 bit and 64 bit versions
- of MS Windows.
+ the Apache framework, whereas previous version of mod_rivet only supported
+ the prefork MPM.
</para>
<title>Rivet - MPM Bridge</title>
<para>
@@ -70,7 +68,7 @@
<para>
Rivet &version; supports a new <link linkend="request">request processing scheme</link>
- entirely based on Tcl. By default rivet &version; provides compatiblity with the
+ entirely based on Tcl. By default rivet &version; provide compatiblity with the
version 2.x scheme to handle a request but this can be entirely overridden by
the developer replacing the central request handling procedure. See the
<link linkend="request">request processing</link> page for further reading
Modified: tcl/rivet/trunk/rivet/packages/dio/dio.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/dio/dio.tcl?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/dio/dio.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/dio/dio.tcl Tue Oct 31 07:17:04 2017
@@ -233,24 +233,18 @@ proc handle {interface args} {
# together.
#
protected method build_key_where_clause {myKeyfield myKey} {
-
- # rewritten from scratch abandoning
- # the former approach that treated single
- # element keys differently (anche missing the
- # correct handling of single element lists) and
- # also generating a clean WHERE clause
- #
- # mxmanghi 18/08/2017
-
- set keyvalue_conditions {}
-
- while {([llength $myKeyfield] > 0) && ([llength $myKey] > 0)} {
- set myKeyfield [lassign $myKeyfield field]
- set myKey [lassign $myKey key]
- lappend keyvalue_conditions "$field = [makeDBFieldValue $table $field $key]"
+ ## If we're not using multiple keyfields, just return a simple
+ ## where clause.
+ if {[llength $myKeyfield] < 2} {
+ return " WHERE $myKeyfield = [makeDBFieldValue $table $myKeyfield $myKey]"
}
- return [format " WHERE %s;" [join $keyvalue_conditions " AND "]]
+ # multiple fields, construct it as a where-and
+ set req " WHERE 1 = 1"
+ foreach field $myKeyfield key $myKey {
+ append req " AND $field = [makeDBFieldValue $table $field $key]"
+ }
+ return $req
}
##
Modified: tcl/rivet/trunk/rivet/packages/form/form2.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/form/form2.tcl?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/form/form2.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/form/form2.tcl Tue Oct 31 07:17:04 2017
@@ -26,10 +26,8 @@ package provide form 2.1
constructor {args} {
# set the form method to be a post and the action to be
# a refetching of the current page
- set arguments(method) POST
- if {[catch {set arguments(action) [::rivet::env DOCUMENT_URI]}]} {
- set arguments(action) ""
- }
+ set arguments(method) post
+ set arguments(action) [::rivet::env DOCUMENT_URI]
# use $this for the type for form-global stuff like form arguments
import_data form $this arguments $args
@@ -122,7 +120,7 @@ package provide form 2.1
foreach arg [lsort [array names data]] {
append string " $arg=\"$data($arg)\""
}
- return [string trimleft $string]
+ return $string
}
#
Modified: tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl Tue Oct 31 07:17:04 2017
@@ -134,7 +134,9 @@ namespace eval FormBroker {
set valid FB_OK
dict with var_d {
if {$bounds > 0} {
- if {$constrain} {
+ if {($nonempty == 1) && ($var == "")} {
+ set valid FB_EMPTY_STRING
+ } elseif {$constrain} {
set var [string range $var 0 $bounds-1]
} elseif {[string length $var] > $bounds} {
set valid FB_STRING_TOO_LONG
@@ -703,6 +705,7 @@ namespace eval FormBroker {
constrain 0 \
validator [namespace current]::validate_string \
force_quote 0 \
+ nonempty 0 \
field_validation FB_OK]
dict with form_definitions $form_name $field_name {
@@ -750,6 +753,13 @@ namespace eval FormBroker {
dict set form_definitions $form_name $field_name default $default
}
+ nonempty {
+
+ # this flag forces the formbroker to
+ # signal empty strings as form data errors
+
+ set nonemtpy 1
+ }
constrain {
set constrain 1
}
Modified: tcl/rivet/trunk/rivet/pkgIndex.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/pkgIndex.tcl?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/pkgIndex.tcl (original)
+++ tcl/rivet/trunk/rivet/pkgIndex.tcl Tue Oct 31 07:17:04 2017
@@ -8,14 +8,13 @@
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
+package ifneeded AsciiGlyphs 0.1 [list source [file join $dir packages/asciiglyphs/asciiglyphs.tcl]]
package ifneeded Calendar 1.2 [list source [file join $dir packages/calendar/calendar.tcl]]
package ifneeded DIO 1.1 [list source [file join $dir packages/dio/dio.tcl]]
package ifneeded DIODisplay 1.0 [list source [file join $dir packages/dio/diodisplay.tcl]]
-package ifneeded Dtcl 1.0 [list source [file join $dir packages/dtcl/dtcl.tcl]]
-package ifneeded Rivet 2.3 [list source [file join $dir init.tcl]]
+package ifneeded Rivet 3.0 [list source [file join $dir init.tcl]]
package ifneeded RivetEntities 1.0 [list source [file join $dir packages/entities/entities.tcl]]
package ifneeded Session 1.0 [list source [file join $dir packages/session/session-class.tcl]]
-package ifneeded commserver 0.1 [list source [file join $dir packages/commserver/commserver.tcl]]
package ifneeded dio_Mysql 0.2 [list source [file join $dir packages/dio/dio_Mysql.tcl]]
package ifneeded dio_Oracle 0.1 [list source [file join $dir packages/dio/dio_Oracle.tcl]]
package ifneeded dio_Postgresql 0.1 [list source [file join $dir packages/dio/dio_Postgresql.tcl]]
@@ -23,10 +22,8 @@ package ifneeded dio_Sqlite 0.1 [list so
package ifneeded dio_Tdbc 0.1 [list source [file join $dir packages/dio/dio_Tdbc.tcl]]
package ifneeded form 1.0 [list source [file join $dir packages/form/form.tcl]]
package ifneeded form 2.1 [list source [file join $dir packages/form/form2.tcl]]
-package ifneeded ncgi 1.0 [list source [file join $dir packages/rivet_ncgi/rivet_ncgi.tcl]]
-package ifneeded rivetlib 2.3.0 [list load [file join $dir librivetlib.so]]
-package ifneeded rivetparser 0.2 [list load [file join $dir librivetparser.so]]
-package ifneeded simpledb 0.1 [list source [file join $dir packages/simpledb/simpledb.tcl]]
+package ifneeded formbroker 1.0 [list source [file join $dir packages/formbroker/formbroker.tcl]]
+package ifneeded rivetlib 3.0.0 [list load [file join $dir librivetlib[info sharedlibextension]]]
+package ifneeded rivetparser 0.2 [list load [file join $dir librivetparser[info sharedlibextension]]]
package ifneeded tclrivet 0.1 [list source [file join $dir packages/tclrivet/tclrivet.tcl]]
package ifneeded tclrivetparser 0.1 [list source [file join $dir packages/tclrivet/tclrivetparser.tcl]]
-package ifneeded formbroker 1.0 [list source [file join $dir packages/formbroker/formbroker.tcl]]
Modified: tcl/rivet/trunk/src/librivet/rivetCrypt.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/librivet/rivetCrypt.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/librivet/rivetCrypt.c (original)
+++ tcl/rivet/trunk/src/librivet/rivetCrypt.c Tue Oct 31 07:17:04 2017
@@ -24,6 +24,12 @@
#include <tcl.h>
#include <string.h>
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "rivet.h"
#include "ap_config.h"
Modified: tcl/rivet/trunk/src/librivet/rivetList.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/librivet/rivetList.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/librivet/rivetList.c (original)
+++ tcl/rivet/trunk/src/librivet/rivetList.c Tue Oct 31 07:17:04 2017
@@ -26,6 +26,12 @@
#include <tcl.h>
#include <string.h>
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "rivet.h"
static Tcl_ObjCmdProc Rivet_LremoveObjCmd;
Modified: tcl/rivet/trunk/src/librivet/rivetPkgInit.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/librivet/rivetPkgInit.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/librivet/rivetPkgInit.c (original)
+++ tcl/rivet/trunk/src/librivet/rivetPkgInit.c Tue Oct 31 07:17:04 2017
@@ -23,6 +23,12 @@
#endif
#include <tcl.h>
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "rivet.h"
#include "mod_rivet.h"
@@ -87,7 +93,7 @@ Rivet_GetNamespace( Tcl_Interp* interp)
*-----------------------------------------------------------------------------
*/
-int
+DLLEXPORT int
Rivetlib_Init( Tcl_Interp *interp )
{
@@ -119,7 +125,7 @@ Rivetlib_Init( Tcl_Interp *interp )
*-----------------------------------------------------------------------------
*/
-int
+DLLEXPORT int
Rivetlib_SafeInit( Tcl_Interp *interp )
{
Modified: tcl/rivet/trunk/src/librivet/rivetWWW.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/librivet/rivetWWW.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/librivet/rivetWWW.c (original)
+++ tcl/rivet/trunk/src/librivet/rivetWWW.c Tue Oct 31 07:17:04 2017
@@ -26,6 +26,12 @@
#include <tcl.h>
#include <ctype.h>
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "rivet.h"
#ifdef WIN32
Modified: tcl/rivet/trunk/src/mod_rivet_ng/TclWebapache.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/TclWebapache.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/TclWebapache.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/TclWebapache.c Tue Oct 31 07:17:04 2017
@@ -29,7 +29,9 @@
#include <tcl.h>
#include <sys/types.h>
+#ifndef WIN32
#include <pwd.h>
+#endif /* WIN32 */
#include <httpd.h>
#include <http_request.h>
Modified: tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c Tue Oct 31 07:17:04 2017
@@ -37,6 +37,7 @@
#include "apache_config.h"
#include "rivet.h"
+extern module rivet_module;
extern mod_rivet_globals* module_globals;
/*
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.c Tue Oct 31 07:17:04 2017
@@ -48,18 +48,28 @@
#include <tcl.h>
/* as long as we need to emulate ap_chdir_file we need to include unistd.h */
+#ifdef RIVET_HAVE_UNISTD_H
#include <unistd.h>
+#endif /* RIVET_HAVE_UNISTD_H */
#include "rivet_types.h"
#include "mod_rivet.h"
#include "apache_config.h"
+
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "rivet.h"
#include "mod_rivet_common.h"
#include "mod_rivet_generator.h"
+module AP_MODULE_DECLARE_DATA rivet_module;
extern Tcl_ChannelType RivetChan;
-apr_threadkey_t* rivet_thread_key = NULL;
-mod_rivet_globals* module_globals = NULL;
+DLLEXPORT apr_threadkey_t* rivet_thread_key = NULL;
+DLLEXPORT mod_rivet_globals* module_globals = NULL;
#define ERRORBUF_SZ 256
#define TCL_HANDLER_FILE RIVET_DIR"/default_request_handler.tcl"
@@ -208,6 +218,9 @@ int Rivet_Exit_Handler(int code)
static int
Rivet_RunServerInit (apr_pool_t *pPool, apr_pool_t *pLog, apr_pool_t *pTemp, server_rec *s)
{
+#ifdef WIN32
+ char* parent_pid_var = NULL;
+#endif
rivet_server_conf* rsc = RIVET_SERVER_CONF( s->module_config );
FILEDEBUGINFO;
@@ -217,10 +230,39 @@ Rivet_RunServerInit (apr_pool_t *pPool,
module_globals->server_interp = Rivet_NewVHostInterp(pPool,s); /* root interpreter */
/* We initialize the interpreter and we won't register a channel with it because
- * we couldn't send data to the stdout anyway */
+ * we couldn't send data to the stdout anyway
+ */
Rivet_PerInterpInit(module_globals->server_interp,NULL,s,pPool);
+ /* This code is to be included only if we are building for the
+ * Windows family of OS. The winnt MPM runs the post_config
+ * hooks after it has spawned a child process but we don't want
+ * to run the Tcl server initialization script again. We
+ * detect we are running in the a child process checking
+ * the environment variable AP_PARENT_PID
+ * (https://wiki.apache.org/httpd/ModuleLife)
+ */
+
+ #ifdef WIN32
+
+ /* if the environment variable AP_PARENT_PID is set
+ * we know we are in a child process of the winnt MPM
+ */
+
+ apr_env_get(&parent_pid_var,"AP_PARENT_PID",pTemp);
+ if (parent_pid_var != NULL)
+ {
+ ap_log_error(APLOG_MARK,APLOG_INFO,0,s,
+ "AP_PARENT_PID found: not running the Tcl server script in winnt MPM child process");
+ return OK;
+ } else {
+ ap_log_error(APLOG_MARK,APLOG_INFO,0,s,
+ "AP_PARENT_PID undefined, we proceed with server initialization");
+ }
+
+ #endif
+
/* We don't create the cache here: it would make sense for prefork MPM
* but threaded MPM bridges have their pool of threads. Each of them
* will by now have their own cache
@@ -247,6 +289,10 @@ Rivet_RunServerInit (apr_pool_t *pPool,
Tcl_DecrRefCount(server_init);
}
+ /* bridge specific server init script */
+
+ RIVET_MPM_BRIDGE_CALL(mpm_server_init,pPool,pLog,pTemp,s);
+
return OK;
}
@@ -286,8 +332,8 @@ Rivet_ServerInit (apr_pool_t *pPool, apr
"first post_config run: not initializing Tcl stuff");
return OK; /* This would be the first time through */
- }
-
+ }
+
/* Everything revolves around this structure: module_globals */
/* the module global structure is allocated and the MPM bridge name established */
@@ -335,13 +381,11 @@ Rivet_ServerInit (apr_pool_t *pPool, apr
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, server,
MODNAME " Error loading MPM manager: %s",
apr_dso_error(dso_handle,errorbuf,ERRORBUF_SZ));
- exit(1);
+ exit(1);
}
Rivet_RunServerInit(pPool,pLog,pTemp,server);
- RIVET_MPM_BRIDGE_CALL(mpm_server_init,pPool,pLog,pTemp,server);
-
return OK;
}
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h Tue Oct 31 07:17:04 2017
@@ -83,7 +83,10 @@
* you need to make the appropriate modinficationus to Rivet_CopyConfig,
* Rivet_CreateConfig, Rivet_MergeConfig and so on. */
+/*
+ * Petasis 10 Aug 2017: This causes the symbol to be exported also from MPMs...
module AP_MODULE_DECLARE_DATA rivet_module;
+ */
typedef struct _rivet_server_conf {
@@ -235,12 +238,18 @@ typedef struct _rivet_interp_globals {
rivet_server_conf *Rivet_GetConf(request_rec *r);
+/*
+ * Petasis, 04/08/2017: I think the following is wrong, as both "functions" are
+ * defined through preprocessor definitions in http_config.h. At least under
+ * windows, they do not exist as functions in libhttpd.lib.
+ *
#ifdef ap_get_module_config
#undef ap_get_module_config
#endif
#ifdef ap_set_module_config
#undef ap_set_module_config
#endif
+*/
#define RIVET_SERVER_CONF(module) (rivet_server_conf *)ap_get_module_config(module, &rivet_module)
#define RIVET_NEW_CONF(p) (rivet_server_conf *)apr_pcalloc(p, sizeof(rivet_server_conf))
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_cache.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_cache.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_cache.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_cache.c Tue Oct 31 07:17:04 2017
@@ -23,6 +23,13 @@
#include <apr_strings.h>
#include "mod_rivet.h"
+
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN DLLEXPORT
+#endif /* EXTERN */
#include "mod_rivet_cache.h"
extern mod_rivet_globals* module_globals;
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c Tue Oct 31 07:17:04 2017
@@ -27,24 +27,38 @@
#include <apr_strings.h>
#include <apr_env.h>
#include <ap_mpm.h>
-/* as long as we need to emulate ap_chdir_file we need to include unistd.h */
-#include <unistd.h>
-
#include <apr_file_io.h>
#include <apr_file_info.h>
#include "mod_rivet.h"
-#include "mod_rivet_cache.h"
#include "rivetChannel.h"
-#include "mod_rivet_common.h"
#include "TclWeb.h"
#include "rivetParser.h"
#include "rivet.h"
#include "apache_config.h"
+#include <mpm_common.h>
+
+/* as long as we need to emulate ap_chdir_file we need to include unistd.h */
+#ifdef RIVET_HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* RIVET_HAVE_UNISTD_H */
+#ifdef WIN32
+#include <direct.h> // provides POSIX _chdir
+#endif /* WIN32 */
+
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN DLLEXPORT
+#endif /* EXTERN */
#include "rivetCore.h"
+#include "mod_rivet_common.h"
+#include "mod_rivet_cache.h"
extern apr_threadkey_t* rivet_thread_key;
extern mod_rivet_globals* module_globals;
+extern module rivet_module;
/*
* -- Rivet_ReadFile
@@ -199,7 +213,7 @@ void Rivet_PerInterpInit(rivet_thread_in
/* Set up interpreter associated data */
- globals = apr_pcalloc (p, sizeof(rivet_interp_globals));
+ globals = ckalloc(sizeof(rivet_interp_globals));
Tcl_SetAssocData (interp,"rivet",NULL,globals);
/*
@@ -289,7 +303,6 @@ void Rivet_PerInterpInit(rivet_thread_in
rivet_thread_interp* Rivet_NewVHostInterp(apr_pool_t *pool,server_rec* server)
{
- extern int ap_max_requests_per_child;
rivet_thread_interp* interp_obj = apr_pcalloc(pool,sizeof(rivet_thread_interp));
rivet_server_conf* rsc;
@@ -750,11 +763,19 @@ int Rivet_chdir_file (const char *file)
x = strrchr(file, '/');
if (x == NULL) {
+#ifdef WIN32
+ chdir_retval = _chdir(file);
+#else
chdir_retval = chdir(file);
+#endif
} else if (x - file < sizeof(chdir_buf) - 1) {
memcpy(chdir_buf, file, x - file);
chdir_buf[x - file] = '\0';
+#ifdef WIN32
+ chdir_retval = _chdir(chdir_buf);
+#else
chdir_retval = chdir(chdir_buf);
+#endif
}
return chdir_retval;
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c Tue Oct 31 07:17:04 2017
@@ -26,15 +26,23 @@
#include <apr_strings.h>
#include "mod_rivet.h"
-#include "mod_rivet_common.h"
-#include "mod_rivet_cache.h"
#include "rivetParser.h"
#include "rivetCore.h"
#include "apache_config.h"
#include "TclWeb.h"
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
+#include "mod_rivet_common.h"
+#include "mod_rivet_cache.h"
+
extern mod_rivet_globals* module_globals;
extern apr_threadkey_t* rivet_thread_key;
+extern module rivet_module;
/*
@@ -104,7 +112,7 @@ Rivet_ReleaseScripts (running_scripts* s
#define USE_APACHE_RSC
-int
+DLLEXPORT int
Rivet_SendContent(rivet_thread_private *private,request_rec* r)
{
int errstatus;
Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c Tue Oct 31 07:17:04 2017
@@ -44,14 +44,20 @@
#include <apr_errno.h>
#include <apr_strings.h>
-#include "mod_rivet_generator.h"
#include "apache_request.h"
#include "mod_rivet.h"
-#include "mod_rivet_cache.h"
#include "rivet.h"
#include "TclWeb.h"
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "rivetParser.h"
+#include "mod_rivet_generator.h"
+#include "mod_rivet_cache.h"
#define ENV_ARRAY_NAME "::request::env"
#define HEADERS_ARRAY_NAME "::request::headers"
@@ -1541,6 +1547,7 @@ TCL_CMD_HEADER( Rivet_InspectCmd )
if (STRNEQU(cmd_arg,"script"))
{
+ Tcl_Obj* cmd;
if (private != NULL)
{
@@ -1551,12 +1558,12 @@ TCL_CMD_HEADER( Rivet_InspectCmd )
}
}
- Tcl_Obj* cmd = Tcl_NewStringObj("info script",-1);
+ cmd = Tcl_NewStringObj("info script",-1);
Tcl_IncrRefCount(cmd);
status = Tcl_EvalObjEx(interp,cmd,TCL_EVAL_DIRECT);
- Tcl_DecrRefCount(cmd);
-
+ Tcl_DecrRefCount(cmd);
+
}
else if (STRNEQU(cmd_arg,"-all"))
{
@@ -1597,9 +1604,11 @@ TCL_CMD_HEADER( Rivet_InspectCmd )
}
else if (STRNEQU(cmd_arg,"exit"))
{
+ Tcl_Obj* exit_flag;
+
CHECK_REQUEST_REC(private,"::rivet::inspect")
/* thread exit status flag */
- Tcl_Obj* exit_flag = Tcl_NewIntObj(private->thread_exit);
+ exit_flag = Tcl_NewIntObj(private->thread_exit);
Tcl_IncrRefCount(exit_flag);
Tcl_SetObjResult(interp,exit_flag);
@@ -1916,7 +1925,7 @@ TCL_CMD_HEADER( Rivet_UrlScript )
*-----------------------------------------------------------------------------
*/
-int
+DLLEXPORT int
Rivet_InitCore(Tcl_Interp *interp,rivet_thread_private* private)
{
rivet_server_conf* server_conf;
Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.h
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.h?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.h (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.h Tue Oct 31 07:17:04 2017
@@ -23,6 +23,6 @@
#ifndef __rivetcore_h__
#define __rivetcore_h__
-int Rivet_InitCore(Tcl_Interp *interp,rivet_thread_private* private);
+EXTERN int Rivet_InitCore(Tcl_Interp *interp,rivet_thread_private* private);
#endif
Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivet_lazy_mpm.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivet_lazy_mpm.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivet_lazy_mpm.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivet_lazy_mpm.c Tue Oct 31 07:17:04 2017
@@ -36,8 +36,9 @@
#include "rivetChannel.h"
#include "apache_config.h"
-extern mod_rivet_globals* module_globals;
-extern apr_threadkey_t* rivet_thread_key;
+extern DLLIMPORT mod_rivet_globals* module_globals;
+extern DLLIMPORT apr_threadkey_t* rivet_thread_key;
+extern DLLIMPORT module rivet_module;
enum
{
@@ -401,6 +402,7 @@ int Lazy_MPM_ExitHandler(int code)
return TCL_OK;
}
+DLLEXPORT
RIVET_MPM_BRIDGE {
NULL,
Lazy_MPM_ChildInit,
Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivet_prefork_mpm.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivet_prefork_mpm.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivet_prefork_mpm.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivet_prefork_mpm.c Tue Oct 31 07:17:04 2017
@@ -33,8 +33,8 @@
#include "rivetCore.h"
#include "worker_prefork_common.h"
-extern mod_rivet_globals* module_globals;
-extern apr_threadkey_t* rivet_thread_key;
+extern DLLIMPORT mod_rivet_globals* module_globals;
+extern DLLIMPORT apr_threadkey_t* rivet_thread_key;
rivet_thread_private* Rivet_VirtualHostsInterps (rivet_thread_private* private);
@@ -182,6 +182,7 @@ rivet_thread_interp* Prefork_MPM_Interp(
return private->ext->interps[conf->idx];
}
+DLLEXPORT
RIVET_MPM_BRIDGE {
NULL,
Prefork_MPM_ChildInit,
Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivet_worker_mpm.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivet_worker_mpm.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivet_worker_mpm.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivet_worker_mpm.c Tue Oct 31 07:17:04 2017
@@ -49,11 +49,16 @@
#define HTTP_REQUESTS_PROC(request_proc_call) request_proc_call;
#endif
-extern mod_rivet_globals* module_globals;
-extern apr_threadkey_t* rivet_thread_key;
+extern DLLIMPORT mod_rivet_globals* module_globals;
+extern DLLIMPORT apr_threadkey_t* rivet_thread_key;
apr_threadkey_t* handler_thread_key;
+#ifdef RIVET_NO_HAVE_ROUND
+int round(double d) { return (int)(d + 0.5); }
+#endif /* RIVET_NO_HAVE_ROUND */
+
+
rivet_thread_private* Rivet_VirtualHostsInterps (rivet_thread_private* private);
typedef struct mpm_bridge_status {
@@ -748,6 +753,7 @@ rivet_thread_interp* Worker_MPM_Interp(r
return private->ext->interps[conf->idx];
}
+DLLEXPORT
RIVET_MPM_BRIDGE {
NULL,
Worker_MPM_ChildInit,
Modified: tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c Tue Oct 31 07:17:04 2017
@@ -24,12 +24,19 @@
#include <httpd.h>
#include <apr_strings.h>
#include "mod_rivet.h"
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "mod_rivet_common.h"
#include "mod_rivet_cache.h"
#include "worker_prefork_common.h"
-extern mod_rivet_globals* module_globals;
-extern apr_threadkey_t* rivet_thread_key;
+extern DLLIMPORT mod_rivet_globals* module_globals;
+extern DLLIMPORT apr_threadkey_t* rivet_thread_key;
+extern DLLIMPORT module rivet_module;
extern rivet_thread_interp* MPM_MasterInterp(server_rec* s);
Modified: tcl/rivet/trunk/src/parser/parserPkgInit.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/parser/parserPkgInit.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/parser/parserPkgInit.c (original)
+++ tcl/rivet/trunk/src/parser/parserPkgInit.c Tue Oct 31 07:17:04 2017
@@ -33,6 +33,12 @@
#include <apr_file_io.h>
#include <tcl.h>
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "rivet.h"
#include "rivetParser.h"
@@ -127,7 +133,7 @@ Parse_RivetData(ClientData clientData, T
/* Package init for standalone parser package. */
-EXTERN int
+DLLEXPORT int
Rivetparser_Init( Tcl_Interp *interp )
{
#ifdef USE_TCL_STUBS
@@ -144,7 +150,7 @@ Rivetparser_Init( Tcl_Interp *interp )
return Tcl_PkgProvide( interp, "rivetparser", "0.2" );
}
-EXTERN int
+DLLEXPORT int
Rivetparser_SafeInit( Tcl_Interp *interp )
{
/* rivet::parserivet is DEFINITELY unsafe -- it takes a filename,
Modified: tcl/rivet/trunk/src/parser/rivetParser.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/parser/rivetParser.c?rev=1813852&r1=1813851&r2=1813852&view=diff
==============================================================================
--- tcl/rivet/trunk/src/parser/rivetParser.c (original)
+++ tcl/rivet/trunk/src/parser/rivetParser.c Tue Oct 31 07:17:04 2017
@@ -30,6 +30,13 @@
#include <string.h>
#include <tcl.h>
+
+/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
+ * no need to keep this extern... */
+#ifdef EXTERN
+# undef EXTERN
+# define EXTERN
+#endif /* EXTERN */
#include "rivetParser.h"
int Rivet_Parser(Tcl_Obj *outbuf, Tcl_Obj *inbuf);
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org