Hello.

A few words about the latest version of Naviserver on Windows.

Current Makefile.win32 worked fine (32-bit with Tcl 8.6).

Some minor fixes were required in the source code (attached
naviserver-win32.diff):
    * include\Makefile.win32 - fix syntax error when NAVISERVER is
      defined (expression without quotes),
    * nsd\Makefile - move file dependencies below Makefile.build
      include, nmake only creates first dependency,
    * nsd\nswin32.c - nsconf.config should be renamed to
      nfconf.configFile in accordance with the nsd.h change,
    * tests\all.tcl - add 'encoding system utf-8' at the beginning to
      for satisfy encoding.test on non-utf8 consoles,
    * tests\http.test (http-5.3b,http-9.1) - replace 'curl --data
      $string' by 'curl --data @- << $string' to preserve utf-8 data.

Also, I have included zlib from the tcl 8.6 source tree. See attached
nsd-Makefile.win32 - small hack to the source tree, simply save as
nsd\Makefile.win32 and rebuild nsd/libnsd. Note hardcoded path to zlib
sources.

The test suite completed with the following result (ns_proxy.test
skipped)

all.tcl:        Total   1542    Passed  1496
Skipped 28      Failed  18 Sourced 69 Test Files.

Thanks for the great job!

Regards
Oleg.
diff --git a/include/Makefile.win32 b/include/Makefile.win32
index 1000d22..95ca3b3 100644
--- a/include/Makefile.win32
+++ b/include/Makefile.win32
@@ -65,7 +65,7 @@
 #
 
 !ifdef NAVISERVER
-!  if ("" == "$(NAVISERVER)" || "..\naviserver" == $(NAVISERVER))
+!  if ("" == "$(NAVISERVER)" || "..\naviserver" == "$(NAVISERVER)")
 !    message Warning: Ignoring bogus value for NAVISERVER install dir:  $(NAVISERVER)
 !    undef NAVISERVER
 !  endif
diff --git a/nsd/Makefile b/nsd/Makefile
index 652ff9c..a7104e0 100644
--- a/nsd/Makefile
+++ b/nsd/Makefile
@@ -27,10 +27,6 @@
 # version of this file under either the License or the GPL.
 #
 #
-dhparams.h:
-	openssl dhparam -C -2 -noout 512 >> dhparams.h
-	openssl dhparam -C -2 -noout 1024 >> dhparams.h
-	openssl dhparam -C -2 -noout 2048 >> dhparams.h
 
 # IMPORTANT: Do NOT use the exact same base file name for both nsd.exe
 # an nsd.dll.  If you do, NaviServer runs just fine, but the nsd.pdb
@@ -44,8 +40,6 @@ PGM	= nsd
 PGMOBJS	= main.o
 HDRS	= nsd.h
 
-tls.o: dhparams.h nsopenssl.h
-
 LIBOBJS = adpcmds.o adpeval.o adpparse.o adprequest.o auth.o binder.o \
 	  cache.o callbacks.o cls.o compress.o config.o conn.o connio.o \
 	  cookies.o connchan.o \
@@ -64,5 +58,12 @@ LIBOBJS = adpcmds.o adpeval.o adpparse.o adprequest.o auth.o binder.o \
 
 include ../include/Makefile.build
 
+tls.o: dhparams.h nsopenssl.h
+
+dhparams.h:
+	openssl dhparam -C -2 -noout 512 >> dhparams.h
+	openssl dhparam -C -2 -noout 1024 >> dhparams.h
+	openssl dhparam -C -2 -noout 2048 >> dhparams.h
+
 install-init:
 	$(INSTALL_DATA) init.tcl $(DESTDIR)$(INSTBIN)
diff --git a/nsd/nswin32.c b/nsd/nswin32.c
index ebf768d..16ffe04 100644
--- a/nsd/nswin32.c
+++ b/nsd/nswin32.c
@@ -358,8 +358,8 @@ NsInstallService(char *service)
     char       nsd[PATH_MAX], config[PATH_MAX];
     Ns_DString name, cmd;
 
-    if (_fullpath(config, nsconf.config, sizeof(config)) == NULL) {
-        Ns_Log(Error, "nswin32: invalid config path '%s'", nsconf.config);
+    if (_fullpath(config, nsconf.configFile, sizeof(config)) == NULL) {
+        Ns_Log(Error, "nswin32: invalid config path '%s'", nsconf.configFile);
     } else if (GetModuleFileName(NULL, nsd, sizeof(nsd)) == 0u) {
         Ns_Log(Error, "nswin32: failed to find nsd.exe: '%s'", SysErrMsg());
     } else {
diff --git a/tests/all.tcl b/tests/all.tcl
index 03c5be7..9a10d29 100755
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -40,6 +40,7 @@
 # Make sure, the testfile runs with an expected locale
 #
 set env(LANG) en_US.UTF-8
+encoding system utf-8
 
 package require Tcl 8.5
 package require tcltest 2.2
diff --git a/tests/http.test b/tests/http.test
index f6ea6b6..303fad2 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -664,7 +664,7 @@ test http-5.3b {
     }
 } -body {
     set string "Testing <äöüß☀>"
-    exec curl -g -s --data $string [ns_config test listenurl]/post 2> /dev/null
+    exec curl -g -s --data @- [ns_config test listenurl]/post << $string 2> /dev/null
 } -cleanup {
     ns_unregister_op POST /post
     unset -nocomplain r
@@ -1622,7 +1622,7 @@ test http-9.1 {
     }
 } -body {
     set string "Testing <äöüß☀>"
-    exec curl -H "Expect: 100-continue" --data $string [ns_config test listenurl]/post 2> /dev/null
+    exec curl -H "Expect: 100-continue" --data @- [ns_config test listenurl]/post << $string 2> /dev/null
 } -cleanup {
     ns_unregister_op POST /post
 } -result {utf-8 <application/x-www-form-urlencoded> AÄATesting <äöüß☀>ZÜZ}

Attachment: nsd-Makefile.win32
Description: Binary data

_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to