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 pe...@apache.org on 2017/08/07 14:36:24 UTC
svn commit: r1804342 - in /tcl/rivet/branches/cmake: ./ cmake/
cmake/cmake_extra_modules/ rivet/ src/librivet/ src/mod_rivet_ng/ src/parser/
Author: petasis
Date: Mon Aug 7 14:36:24 2017
New Revision: 1804342
URL: http://svn.apache.org/viewvc?rev=1804342&view=rev
Log:
Various fixes for compilation under Windows with CMake
Modified:
tcl/rivet/branches/cmake/ChangeLog
tcl/rivet/branches/cmake/cmake/CMakeLists.txt
tcl/rivet/branches/cmake/cmake/cmake_extra_modules/rivet_config.h.cmake
tcl/rivet/branches/cmake/rivet/pkgIndex.tcl
tcl/rivet/branches/cmake/src/librivet/rivetCrypt.c
tcl/rivet/branches/cmake/src/librivet/rivetList.c
tcl/rivet/branches/cmake/src/librivet/rivetPkgInit.c
tcl/rivet/branches/cmake/src/librivet/rivetWWW.c
tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c
tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_cache.c
tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_common.c
tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_generator.c
tcl/rivet/branches/cmake/src/mod_rivet_ng/rivetCore.c
tcl/rivet/branches/cmake/src/mod_rivet_ng/rivetCore.h
tcl/rivet/branches/cmake/src/parser/parserPkgInit.c
Modified: tcl/rivet/branches/cmake/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/ChangeLog?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/ChangeLog (original)
+++ tcl/rivet/branches/cmake/ChangeLog Mon Aug 7 14:36:24 2017
@@ -1,4 +1,30 @@
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
@@ -45,41 +71,41 @@
* 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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/branches/cmake/cmake/CMakeLists.txt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/cmake/CMakeLists.txt?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/cmake/CMakeLists.txt (original)
+++ tcl/rivet/branches/cmake/cmake/CMakeLists.txt Mon Aug 7 14:36:24 2017
@@ -108,7 +108,6 @@ set(mod_rivet_sources
${RIVET_SRC_DIR}/${RIVET_CORE}/mod_rivet_cache.c
${RIVET_SRC_DIR}/${RIVET_CORE}/mod_rivet_common.c
${RIVET_SRC_DIR}/${RIVET_CORE}/mod_rivet_generator.c
- ${RIVET_SRC_DIR}/parser/rivetParser.c
)
# Add build targets...
@@ -130,6 +129,8 @@ SET_TARGET_PROPERTIES(mod_rivet
SET_TARGET_PROPERTIES(rivet_worker_mpm PROPERTIES PREFIX "" SUFFIX ".so")
SET_TARGET_PROPERTIES(rivet_prefork_mpm PROPERTIES PREFIX "" SUFFIX ".so")
SET_TARGET_PROPERTIES(rivet_lazy_mpm PROPERTIES PREFIX "" SUFFIX ".so")
+SET_TARGET_PROPERTIES(rivetparser PROPERTIES PREFIX "lib")
+SET_TARGET_PROPERTIES(rivetlib PROPERTIES PREFIX "lib")
# Definitions...
# ===========================================================================
Modified: tcl/rivet/branches/cmake/cmake/cmake_extra_modules/rivet_config.h.cmake
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/cmake/cmake_extra_modules/rivet_config.h.cmake?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/cmake/cmake_extra_modules/rivet_config.h.cmake (original)
+++ tcl/rivet/branches/cmake/cmake/cmake_extra_modules/rivet_config.h.cmake Mon Aug 7 14:36:24 2017
@@ -266,6 +266,9 @@
#ifndef RIVET_RIVET_CORE
#define RIVET_RIVET_CORE "@RIVET_CORE@"
#endif
+#ifndef RIVET_CORE
+/*#define RIVET_CORE "@RIVET_CORE@"*/
+#endif
/* Separate Channels for virtual hosts */
#ifndef RIVET_SEPARATE_CHANNELS
Modified: tcl/rivet/branches/cmake/rivet/pkgIndex.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/rivet/pkgIndex.tcl?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/rivet/pkgIndex.tcl (original)
+++ tcl/rivet/branches/cmake/rivet/pkgIndex.tcl Mon Aug 7 14:36:24 2017
@@ -23,7 +23,7 @@ package ifneeded dio_Tdbc 0.1 [list sour
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 formbroker 1.0 [list source [file join $dir packages/formbroker/formbroker.tcl]]
-package ifneeded rivetlib 3.0.0 [list load [file join $dir librivetlib.so]]
-package ifneeded rivetparser 0.2 [list load [file join $dir librivetparser.so]]
+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]]
Modified: tcl/rivet/branches/cmake/src/librivet/rivetCrypt.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/librivet/rivetCrypt.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/librivet/rivetCrypt.c (original)
+++ tcl/rivet/branches/cmake/src/librivet/rivetCrypt.c Mon Aug 7 14:36:24 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/branches/cmake/src/librivet/rivetList.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/librivet/rivetList.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/librivet/rivetList.c (original)
+++ tcl/rivet/branches/cmake/src/librivet/rivetList.c Mon Aug 7 14:36:24 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/branches/cmake/src/librivet/rivetPkgInit.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/librivet/rivetPkgInit.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/librivet/rivetPkgInit.c (original)
+++ tcl/rivet/branches/cmake/src/librivet/rivetPkgInit.c Mon Aug 7 14:36:24 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 )
{
#if RIVET_NAMESPACE_EXPORT == 1
@@ -126,7 +132,7 @@ Rivetlib_Init( Tcl_Interp *interp )
*-----------------------------------------------------------------------------
*/
-int
+DLLEXPORT int
Rivetlib_SafeInit( Tcl_Interp *interp )
{
#if RIVET_NAMESPACE_EXPORT == 1
Modified: tcl/rivet/branches/cmake/src/librivet/rivetWWW.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/librivet/rivetWWW.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/librivet/rivetWWW.c (original)
+++ tcl/rivet/branches/cmake/src/librivet/rivetWWW.c Mon Aug 7 14:36:24 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/branches/cmake/src/mod_rivet_ng/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c (original)
+++ tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c Mon Aug 7 14:36:24 2017
@@ -55,7 +55,6 @@
#include "rivet_types.h"
#include "mod_rivet.h"
#include "apache_config.h"
-#include "rivet.h"
/* Function prototypes are defined with EXTERN. Since we are in the same DLL,
* no need to keep this extern... */
@@ -63,12 +62,13 @@
# undef EXTERN
# define EXTERN
#endif /* EXTERN */
+#include "rivet.h"
#include "mod_rivet_common.h"
#include "mod_rivet_generator.h"
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"
Modified: tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_cache.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_cache.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_cache.c (original)
+++ tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_cache.c Mon Aug 7 14:36:24 2017
@@ -28,7 +28,7 @@
* no need to keep this extern... */
#ifdef EXTERN
# undef EXTERN
-# define EXTERN
+# define EXTERN DLLEXPORT
#endif /* EXTERN */
#include "mod_rivet_cache.h"
Modified: tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_common.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_common.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_common.c (original)
+++ tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_common.c Mon Aug 7 14:36:24 2017
@@ -36,7 +36,6 @@
#include "rivetParser.h"
#include "rivet.h"
#include "apache_config.h"
-#include "rivetCore.h"
#include <mpm_common.h>
/* as long as we need to emulate ap_chdir_file we need to include unistd.h */
@@ -51,8 +50,9 @@
* no need to keep this extern... */
#ifdef EXTERN
# undef EXTERN
-# define EXTERN
+# define EXTERN DLLEXPORT
#endif /* EXTERN */
+#include "rivetCore.h"
#include "mod_rivet_common.h"
#include "mod_rivet_cache.h"
@@ -151,6 +151,7 @@ Rivet_CreateTclInterp (server_rec* s)
*---------------------------------------------------------------------
*/
+DLLEXPORT
running_scripts* Rivet_RunningScripts ( apr_pool_t* pool,
running_scripts* scripts,
rivet_server_conf* rivet_conf )
Modified: tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_generator.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_generator.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_generator.c (original)
+++ tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet_generator.c Mon Aug 7 14:36:24 2017
@@ -111,7 +111,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/branches/cmake/src/mod_rivet_ng/rivetCore.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/mod_rivet_ng/rivetCore.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/mod_rivet_ng/rivetCore.c (original)
+++ tcl/rivet/branches/cmake/src/mod_rivet_ng/rivetCore.c Mon Aug 7 14:36:24 2017
@@ -55,9 +55,11 @@
# undef EXTERN
# define EXTERN
#endif /* EXTERN */
-#include "mod_rivet_cache.h"
#include "rivetParser.h"
#include "mod_rivet_generator.h"
+#undef EXTERN
+#define EXTERN DLLEXPORT
+#include "mod_rivet_cache.h"
#define ENV_ARRAY_NAME "::request::env"
#define HEADERS_ARRAY_NAME "::request::headers"
@@ -1925,7 +1927,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/branches/cmake/src/mod_rivet_ng/rivetCore.h
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/mod_rivet_ng/rivetCore.h?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/mod_rivet_ng/rivetCore.h (original)
+++ tcl/rivet/branches/cmake/src/mod_rivet_ng/rivetCore.h Mon Aug 7 14:36:24 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/branches/cmake/src/parser/parserPkgInit.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/parser/parserPkgInit.c?rev=1804342&r1=1804341&r2=1804342&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/parser/parserPkgInit.c (original)
+++ tcl/rivet/branches/cmake/src/parser/parserPkgInit.c Mon Aug 7 14:36:24 2017
@@ -33,13 +33,13 @@
#include <apr_file_io.h>
#include <tcl.h>
-#include "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 "rivet.h"
#include "rivetParser.h"
/*
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org