Index: trunk/zoo-project/zoo-kernel/caching.c
===================================================================
--- trunk/zoo-project/zoo-kernel/caching.c	(revision 917)
+++ trunk/zoo-project/zoo-kernel/caching.c	(revision 921)
@@ -759,5 +759,5 @@
   
   char ltmp1[256];
-  sprintf(ltmp1,"%ld",fsize);
+  sprintf(ltmp1,"%lld",fsize);
   addToMap(*content,"size",ltmp1);
   if(cached==NULL){
Index: trunk/zoo-project/zoo-kernel/mimetypes.h
===================================================================
--- trunk/zoo-project/zoo-kernel/mimetypes.h	(revision 917)
+++ trunk/zoo-project/zoo-kernel/mimetypes.h	(revision 921)
@@ -839,5 +839,5 @@
 
 static int isGeographic(const char* mimeType){
-  char* imageMimeType[4]={
+  const char* imageMimeType[4]={
     "image/tiff",
     "image/png",
@@ -845,5 +845,5 @@
     "application/vnd.google-earth.kmz"
   };
-  char* vectorMimeType[5]={
+  const char* vectorMimeType[5]={
     "text/xml",
     "application/json",
Index: trunk/zoo-project/zoo-kernel/response_print.c
===================================================================
--- trunk/zoo-project/zoo-kernel/response_print.c	(revision 917)
+++ trunk/zoo-project/zoo-kernel/response_print.c	(revision 921)
@@ -24,8 +24,7 @@
 
 #include "service.h"
+#include "service_internal.h"
+#include "server_internal.h"
 #include "response_print.h"
-#include "request_parser.h"
-#include "server_internal.h"
-#include "service_internal.h"
 #ifdef USE_MS
 #include "service_internal_ms.h"
@@ -35,11 +34,4 @@
 #ifdef USE_CALLBACK
 #include "service_callback.h"
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE -1
 #endif
 
Index: trunk/zoo-project/zoo-kernel/response_print.h
===================================================================
--- trunk/zoo-project/zoo-kernel/response_print.h	(revision 917)
+++ trunk/zoo-project/zoo-kernel/response_print.h	(revision 921)
@@ -64,4 +64,5 @@
 #include <sys/stat.h>
 #include <sys/types.h>
+//#include "cgic.h"
 #ifndef WIN32
 #include <sys/ipc.h>
@@ -83,5 +84,4 @@
 #include <locale.h> // knut: this appears to be a non-standard header file that has been removed in newer versions of glibc; it may be sufficient to include <locale.h> (see above) 
 #endif
-#include "ulinet.h"
 
 #include "service.h"
@@ -96,6 +96,4 @@
 #include <libxml/xpath.h>
 
-#include "cgic.h"
-
 #ifdef __cplusplus
 extern "C" {
@@ -173,5 +171,5 @@
    * Definitions of root node for response depending on the request and the WPS version
    */
-  static const char root_nodes[2][4][20]={
+  static const char* root_nodes[2][4]={
     {"ProcessOfferings","ProcessDescriptions","ExecuteResponse",NULL},
     {"Contents","ProcessOfferings","Result",NULL}
Index: trunk/zoo-project/zoo-kernel/server_internal.c
===================================================================
--- trunk/zoo-project/zoo-kernel/server_internal.c	(revision 917)
+++ trunk/zoo-project/zoo-kernel/server_internal.c	(revision 921)
@@ -738,5 +738,5 @@
 	   * content map.
 	   */
-	  char* keys[4]={
+	  const char* keys[4]={
 	    "minOccurs",
 	    "maxOccurs",
Index: trunk/zoo-project/zoo-kernel/server_internal.h
===================================================================
--- trunk/zoo-project/zoo-kernel/server_internal.h	(revision 917)
+++ trunk/zoo-project/zoo-kernel/server_internal.h	(revision 921)
@@ -29,7 +29,5 @@
 #ifndef IMPORTSERVICE
 #define IMPORTSERVICE "include" // default name of [include] block in main.cfg
-#endif
 
-#include "ulinet.h"
 #include "service.h"
 #include <openssl/sha.h>
@@ -79,2 +77,4 @@
 }
 #endif
+
+#endif
Index: trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal.c	(revision 917)
+++ trunk/zoo-project/zoo-kernel/service_internal.c	(revision 921)
@@ -874,8 +874,8 @@
     VSILFILE * fichier=VSIFOpenL(dataSource,"rb");
     VSIStatBufL file_status;
-    VSIStatL(dataSource, &file_status);
-    if(fichier==NULL){
+    int res=VSIStatL(dataSource, &file_status);
+    if(fichier==NULL || res<0){
       char tmp[1024];
-      sprintf(tmp,"Failed to open file %s for reading purpose. File seems empty %lld.",
+      sprintf(tmp,"Failed to open file %s for reading purpose. File seems empty %ld.",
 	      dataSource,file_status.st_size);
       setMapInMaps(conf,"lenv","message",tmp);
Index: trunk/zoo-project/zoo-kernel/service_internal_ms.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 917)
+++ trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 921)
@@ -860,5 +860,5 @@
       char extent[1024];
       memset(&extent,0,1024);
-      sprintf(extent,"%d,%d,%d,%d",oExt.MinX, oExt.MinY, oExt.MaxX, oExt.MaxY);
+      sprintf(extent,"%f,%f,%f,%f",oExt.MinX, oExt.MinY, oExt.MaxX, oExt.MaxY);
       setMapArray(output->content,"boundingbox",imyIndex,extent);
     }
@@ -1090,5 +1090,5 @@
       char extent[1024];
       memset(&extent,0,1024);
-      sprintf(extent,"%d,%d,%d,%d",minX,minY,maxX,maxY);
+      sprintf(extent,"%f,%f,%f,%f",minX,minY,maxX,maxY);
       setMapArray(output->content,"boundingbox",imyIndex,extent);
     }
Index: trunk/zoo-project/zoo-kernel/service_internal_ms.h
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_ms.h	(revision 917)
+++ trunk/zoo-project/zoo-kernel/service_internal_ms.h	(revision 921)
@@ -26,5 +26,4 @@
 
 #include <sys/stat.h>
-#include "service_internal.h"
 #include "service.h"
 #include "cpl_conv.h"
@@ -33,5 +32,4 @@
 #include "gdal.h"
 #include "ogr_srs_api.h"
-#include "ulinet.h"
 #ifdef WIN32
 #include <unistd.h>
Index: trunk/zoo-project/zoo-kernel/service_internal_python.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_python.c	(revision 917)
+++ trunk/zoo-project/zoo-kernel/service_internal_python.c	(revision 921)
@@ -151,7 +151,7 @@
 
 #ifdef WIN32
-  char* os_pathsep = ";";
+  const char* os_pathsep = ";";
 #else
-  char* os_pathsep = ":";
+  const char* os_pathsep = ":";
 #endif
 
Index: trunk/zoo-project/zoo-kernel/sqlapi.c
===================================================================
--- trunk/zoo-project/zoo-kernel/sqlapi.c	(revision 917)
+++ trunk/zoo-project/zoo-kernel/sqlapi.c	(revision 921)
@@ -58,5 +58,5 @@
  * @return the OGR connection string
  */
-char* _createInitString(maps* conf,const char* key){
+const char* _createInitString(maps* conf,const char* key){
   char* res=NULL;
   char keywords[6][14]={
Index: trunk/zoo-project/zoo-kernel/sqlapi.h
===================================================================
--- trunk/zoo-project/zoo-kernel/sqlapi.h	(revision 917)
+++ trunk/zoo-project/zoo-kernel/sqlapi.h	(revision 921)
@@ -53,5 +53,5 @@
   
 #ifdef META_DB
-  ZOO_DLL_EXPORT char* _createInitString(maps*,const char*);
+  ZOO_DLL_EXPORT const char* _createInitString(maps*,const char*);
   ZOO_DLL_EXPORT int _init_sql(maps*,const char*);
   ZOO_DLL_EXPORT OGRLayer *fetchSql(maps*,int,const char*);
Index: trunk/zoo-project/zoo-kernel/ulinet.h
===================================================================
--- trunk/zoo-project/zoo-kernel/ulinet.h	(revision 917)
+++ trunk/zoo-project/zoo-kernel/ulinet.h	(revision 921)
@@ -24,6 +24,7 @@
 
 #ifndef _ULINET_H
-#define _ULINET_H
+#define _ULINET_H 1
 
+#include "fcgi_stdio.h"
 #include <stdlib.h>
 #include <fcntl.h>
Index: trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 917)
+++ trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 921)
@@ -45,4 +45,8 @@
 #endif
 
+#ifdef USE_PYTHON
+#include "service_internal_python.h"
+#endif
+
 #include "cgic.h"
 
@@ -72,8 +76,4 @@
 #ifdef META_DB
 #include "meta_sql.h"
-#endif
-
-#ifdef USE_PYTHON
-#include "service_internal_python.h"
 #endif
 
