Index: trunk/zoo-project/zoo-kernel/nmake.opt
===================================================================
--- trunk/zoo-project/zoo-kernel/nmake.opt	(revision 756)
+++ trunk/zoo-project/zoo-kernel/nmake.opt	(revision 757)
@@ -11,18 +11,27 @@
 #PHP_LIB=$(PHP_DIR)\Release_TS\php5embed.lib
 
-!IF DEFINED(MS_DIR)
-MS_BASE=$(MS_DIR)
-!INCLUDE $(MS_DIR)\nmake.opt
-!ENDIF
+#!IF DEFINED(MS_DIR)
+#MS_BASE=$(MS_DIR)
+#!INCLUDE $(MS_DIR)\nmake.opt
+#!ENDIF
 
 !IFDEF JS_DIR
-JS_CFLAGS=-DXP_WIN -DUSE_JS -I$(JS_DIR)
+JS_CFLAGS=-DXP_WIN -DUSE_JS -I$(JS_DIR) -I$(JS_DIR)/dist/include
 JS_LDFLAGS=$(JS_DIR)/mozjs185-1.0.lib
 JS_FILE=service_internal_js.obj
 !ENDIF
 
+!IFDEF JS_CFG
+#!INCLUDE $(JS_CFG)
+#JS_CFLAGS=-DXP_WIN -DUSE_JS $(JS_CONFIG_CFLAGS)
+#JS_LDFLAGS=$(JS_CONFIG_LDFLAGS)
+JS_CFLAGS=-DXP_WIN -DUSE_JS -include c:/mozilla-build/msys/local/include/mozjs-24/js/RequiredDefines.h -Ic:/mozilla-build/msys/local/include/mozjs-24 -IC:/mozilla-build/msys/local/include
+JS_LDFLAGS=c:/mozilla-build/msys/local/lib/mozjs-24.lib  kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib 
+JS_FILE=service_internal_js.obj
+!ENDIF
+
 !IFDEF MS_DIR
-MS_CFLAGS=-DUSE_MS -I$(MS_DIR)
-MS_LDFLAGS=$(MS_DIR)/mapserver_i.lib
+MS_CFLAGS=-DUSE_MS -DHAVE_STRCASECMP -DHAVE_STRNCASECMP -I$(MS_DIR)/include
+MS_LDFLAGS=$(MS_DIR)/lib/mapserver_i.lib
 MS_FILE=service_internal_ms.obj
 !ENDIF
Index: trunk/zoo-project/zoo-kernel/service.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service.c	(revision 756)
+++ trunk/zoo-project/zoo-kernel/service.c	(revision 757)
@@ -25,5 +25,6 @@
 #include "service.h"
 
-#ifdef _MSC_VER
+
+#if defined(_MSC_VER) && _MSC_VER < 1800
 #include <stdarg.h>
 /**
Index: trunk/zoo-project/zoo-kernel/service.h
===================================================================
--- trunk/zoo-project/zoo-kernel/service.h	(revision 756)
+++ trunk/zoo-project/zoo-kernel/service.h	(revision 757)
@@ -35,9 +35,8 @@
 
 #ifdef WIN32
-#ifndef USE_MS
 #define strncasecmp _strnicmp
 #define strcasecmp _stricmp
-//#else
-//#define snprintf sprintf_s
+#if defined(_MSC_VER) && _MSC_VER < 1900
+#define snprintf _snprintf
 #endif
 #define zStrdup _strdup
@@ -324,9 +323,9 @@
   ZOO_DLL_EXPORT void mapsToCharXXX(maps*,char***);
   ZOO_DLL_EXPORT void charxxxToMaps(char***,maps**);
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && _MSC_VER < 1800
   // snprintf for Visual Studio compiler;
   // it is also used by services (e.g., GetStatus), therefore exported to shared library
   ZOO_DLL_EXPORT int snprintf(char *buffer, size_t n, const char *format, ...);
-#endif  
+#endif
 #ifdef __cplusplus
 }
Index: trunk/zoo-project/zoo-services/gdal/contour/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/gdal/contour/makefile.vc	(revision 756)
+++ trunk/zoo-project/zoo-services/gdal/contour/makefile.vc	(revision 757)
@@ -2,19 +2,5 @@
 !INCLUDE $(ZOOK_DIR)nmake.opt
 
-FILES=$(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj 
-!IFDEF JS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
-!ENDIF
-!IFDEF JDK_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JAVA_FILE)
-!ENDIF
-!IFDEF PY_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(PY_FILE)
-!ENDIF
-!IF DEFINED(MS_DIR)
-MS_BASE=$(MS_DIR)
-!INCLUDE $(MS_DIR)\nmake.opt
-FILES=$(FILES) $(ZOOK_DIR)$(MS_FILE)
-!ENDIF
+FILES=$(ZOOK_DIR)/libzoo_service.lib
 
 cgi-env/contour_service.zo: service.c
Index: trunk/zoo-project/zoo-services/gdal/dem/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/gdal/dem/makefile.vc	(revision 756)
+++ trunk/zoo-project/zoo-services/gdal/dem/makefile.vc	(revision 757)
@@ -2,17 +2,5 @@
 !INCLUDE $(ZOOK_DIR)nmake.opt
 
-FILES=$(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj 
-!IFDEF JS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
-!ENDIF
-!IFDEF JDK_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JAVA_FILE)
-!ENDIF
-!IFDEF PY_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(PY_FILE)
-!ENDIF
-!IFDEF MS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(MS_FILE)
-!ENDIF
+FILES=$(ZOOK_DIR)/libzoo_service.lib
 
 cgi-env/dem_service.zo: service.c
Index: trunk/zoo-project/zoo-services/gdal/profile/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/gdal/profile/makefile.vc	(revision 756)
+++ trunk/zoo-project/zoo-services/gdal/profile/makefile.vc	(revision 757)
@@ -2,17 +2,5 @@
 !INCLUDE $(ZOOK_DIR)/nmake.opt
 
-FILES=$(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj 
-!IFDEF JS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
-!ENDIF
-!IFDEF JDK_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JAVA_FILE)
-!ENDIF
-!IFDEF PY_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(PY_FILE)
-!ENDIF
-!IFDEF MS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(MS_FILE)
-!ENDIF
+FILES=$(ZOOK_DIR)/libzoo_service.lib
 
 cgi-env/profile_service.zo: service.c
@@ -21,3 +9,3 @@
 
 clean:
-	erase cgi-env\gdal_service.*
+	erase cgi-env\profile_service.*
Index: trunk/zoo-project/zoo-services/gdal/translate/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/gdal/translate/makefile.vc	(revision 756)
+++ trunk/zoo-project/zoo-services/gdal/translate/makefile.vc	(revision 757)
@@ -2,17 +2,5 @@
 !INCLUDE $(ZOOK_DIR)/nmake.opt
 
-FILES=$(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj 
-!IFDEF JS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
-!ENDIF
-!IFDEF JDK_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JAVA_FILE)
-!ENDIF
-!IFDEF PY_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(PY_FILE)
-!ENDIF
-!IFDEF MS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(MS_FILE)
-!ENDIF
+FILES=$(ZOOK_DIR)/libzoo_service.lib
 
 cgi-env/translate_service.zo: service.c
Index: trunk/zoo-project/zoo-services/gdal/warp/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/gdal/warp/makefile.vc	(revision 756)
+++ trunk/zoo-project/zoo-services/gdal/warp/makefile.vc	(revision 757)
@@ -2,17 +2,5 @@
 !INCLUDE $(ZOOK_DIR)/nmake.opt
 
-FILES=$(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj 
-!IFDEF JS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
-!ENDIF
-!IFDEF JDK_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JAVA_FILE)
-!ENDIF
-!IFDEF PY_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(PY_FILE)
-!ENDIF
-!IFDEF MS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(MS_FILE)
-!ENDIF
+FILES=$(ZOOK_DIR)/libzoo_service.lib
 
 cgi-env/warp_service.zo: service.c
Index: trunk/zoo-project/zoo-services/ogr/base-vect-ops/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/ogr/base-vect-ops/makefile.vc	(revision 756)
+++ trunk/zoo-project/zoo-services/ogr/base-vect-ops/makefile.vc	(revision 757)
@@ -2,24 +2,11 @@
 !INCLUDE $(ZOOK_DIR)/nmake.opt
 
-FILES=$(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj 
-!IFDEF JS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
-!ENDIF
-!IFDEF JDK_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(JAVA_FILE)
-!ENDIF
-!IFDEF PY_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(PY_FILE)
-!ENDIF
-!IFDEF MS_DIR
-FILES=$(FILES) $(ZOOK_DIR)$(MS_FILE)
-!ENDIF
+FILES=$(ZOOK_DIR)/libzoo_service.lib
 
 cgi-env/ogr_service.zo: service.c
 	$(CPP)  /D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DZOO_SERVICE -I$(GDAL_DIR)/frmts/ $(CFLAGS) /c service.c
-	link /dll /out:cgi-env/ogr_service.zo  $(FILES) ./service.obj $(LDFLAGS) $(GEOS_DIR)/src/geos_c_i.lib /FORCE:MULTIPLE
+	link /dll /out:cgi-env/ogr_service.zo  ./service.obj $(FILES) $(LDFLAGS) $(GEOS_DIR)/lib/geos_c.lib /FORCE:MULTIPLE
 
 clean:
 	erase cgi-env\ogr_service.*
 
-#	link /dll /out:cgi-env/ogr_service.zo ../../../zoo-kernel/service_internal.obj ./service.obj -L$(TOOLS)/lib/libssl32.dll.a $(GEODIR)/lib/libxml2.lib $(GEODIR)/lib/gdal_i.lib $(GEODIR)/lib/geos_c_i.lib $(TPATH)/lib/libeay32.dll.a $(TPATH)/lib/libcrypto.a $(TPATH)/lib/libssl32.dll.a $(LIBINTL_CPATH)/lib/libintl.lib 
Index: trunk/zoo-project/zoo-services/ogr/ogr2ogr/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/ogr/ogr2ogr/makefile.vc	(revision 756)
+++ trunk/zoo-project/zoo-services/ogr/ogr2ogr/makefile.vc	(revision 757)
@@ -1,4 +1,7 @@
-GEODIR=c:/OSGeo4W/
-TOOLS=c:/Users/djay/GeoLabs/tools/
+TROOT= $(ZOOK_DIR)
+!INCLUDE $(ZOOK_DIR)/nmake.opt
+
+FILES=$(ZOOK_DIR)/libzoo_service.lib
+
 CFLAGS=-I$(GEODIR)/include -I$(TOOLS)/include -I../../../zoo-kernel/ -I./ -DGDAL_1_5_0 -DZOO_SERVICE -DLINUX_FREE_ISSUE -DDEBUG
 CPP=cl /TP 
@@ -6,6 +9,6 @@
 cgi-env/ogr2ogr_service.zo: service.c
 	$(CPP) $(CFLAGS) /c service.c
-	link /dll /out:cgi-env/ogr2ogr_service.zo ../../../zoo-kernel/service_internal.obj ./service.obj -L$(TOOLS)/lib/libssl32.dll.a $(GEODIR)/lib/libxml2.lib $(GEODIR)/lib/gdal_i.lib $(TOOLS)/lib/libeay32.dll.a $(TOOLS)/lib/libcrypto.a $(TOOLS)/lib/libssl32.dll.a 
+	link /dll /out:cgi-env/ogr2ogr_service.zo ./service.obj  $(FILES) $(LDFLAGS)
 
 clean:
-	rm -f cgi-env/ogr_service.zso
+	rm -f cgi-env/ogr2ogr_service.zso
Index: trunk/zoo-project/zoo-services/utils/registry/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/utils/registry/makefile.vc	(revision 756)
+++ trunk/zoo-project/zoo-services/utils/registry/makefile.vc	(revision 757)
@@ -2,5 +2,6 @@
 !INCLUDE $(ZOOK_DIR)/nmake.opt
 
-FILES=$(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj
+FILES=$(ZOOK_DIR)/libzoo_service.lib $(ZOOK_DIR)/server_internal.obj $(ZOOK_DIR)/response_print.obj $(ZOOK_DIR)/lex.cr.obj $(ZOOK_DIR)/lex.sr.obj $(ZOOK_DIR)/service_conf.tab.obj $(ZOOK_DIR)/service_conf.tab.obj $(ZOOK_DIR)/main_conf_read.tab.obj
+
 !IFDEF JS_DIR
 FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
