Permalink
Browse files

Fix compilation and warning problems when disabling libxml2 and/or OGR

  • Loading branch information...
rouault committed Nov 6, 2013
1 parent 68be3a0 commit 6a5935d49bd557f56a01aa27a442187692c48f60
Showing with 22 additions and 9 deletions.
  1. +5 −1 CMakeLists.txt
  2. +5 −0 mapowscommon.h
  3. +2 −2 mapwcs11.c
  4. +4 −0 mapwfs.c
  5. +1 −1 mapwfs11.c
  6. +5 −5 mapwfs20.c
View
@@ -677,10 +677,14 @@ if( USE_WCS_SVR AND NOT USE_LIBXML2 )
message(WARNING "WCS 1.1 and 2.0 require libxml2 support but it was not found. WCS 1.1 and 2.0 will not be supported by this build")
endif( USE_WCS_SVR AND NOT USE_LIBXML2 )
if( USE_WFS_SVR AND NOT USE_LIBXML2 )
message(WARNING "WFS 1.1 requires libxml2 support but it was not found. WFS 1.1 will not be supported by this build")
message(WARNING "WFS 1.1 and 2.0 require libxml2 support but it was not found. WFS 1.1 and 2.0 will not be supported by this build")
endif( USE_WFS_SVR AND NOT USE_LIBXML2 )
if(WITH_SOS)
if(NOT USE_OGR)
report_dependency_error(WITH_SOS OGR)
endif(NOT USE_OGR)
if(USE_PROJ AND USE_LIBXML2)
set(USE_SOS_SVR 1)
else(USE_PROJ AND USE_LIBXML2)
View
@@ -35,6 +35,8 @@
#include<libxml/parser.h>
#include<libxml/tree.h>
#endif
/* W3C namespaces */
#define MS_OWSCOMMON_W3C_XLINK_NAMESPACE_URI "http://www.w3.org/1999/xlink"
@@ -133,6 +135,9 @@
#define MS_DEFAULT_NAMESPACE_PREFIX "ms"
#define MS_DEFAULT_NAMESPACE_URI "http://mapserver.gis.umn.edu/mapserver"
#ifdef USE_LIBXML2
/* function prototypes */
View
@@ -1349,7 +1349,7 @@ int msWCSDescribeCoverage11(mapObj *map, wcsParamsObj *params,
{
msSetError( MS_WCSERR,
"WCS 1.1 request made, but mapserver requires libxml2 for WCS 1.1 services and this is not configured.",
"msWCSDescribeCoverage11()", "NoApplicableCode" );
"msWCSDescribeCoverage11()" );
return msWCSException11(map, "mapserv", "NoApplicableCode", params->version);
}
@@ -1360,7 +1360,7 @@ int msWCSGetCapabilities11(mapObj *map, wcsParamsObj *params,
{
msSetError( MS_WCSERR,
"WCS 1.1 request made, but mapserver requires libxml2 for WCS 1.1 services and this is not configured.",
"msWCSGetCapabilities11()", "NoApplicableCode" );
"msWCSGetCapabilities11()" );
return msWCSException11(map, "mapserv", "NoApplicableCode", params->version);
}
View
@@ -4139,6 +4139,7 @@ void msWFSFreeParamsObj(wfsParamsObj *wfsparams)
}
}
#ifdef USE_WFS_SVR
/************************************************************************/
/* msWFSGetDefaultVersion */
/************************************************************************/
@@ -4441,6 +4442,9 @@ static void msWFSSimplifyPropertyNameAndFilter(wfsParamsObj *wfsparams)
}
}
#endif /* USE_WFS_SVR */
/************************************************************************/
/* msWFSParseRequest */
/* */
View
@@ -487,7 +487,7 @@ int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params,
{
msSetError( MS_WFSERR,
"WFS 1.1 request made, but mapserver requires libxml2 for WFS 1.1 services and this is not configured.",
"msWFSGetCapabilities11()", "NoApplicableCode" );
"msWFSGetCapabilities11()" );
return msWFSException11(map, "mapserv", "NoApplicableCode", params->pszVersion);
}
View
@@ -1315,7 +1315,7 @@ int msWFSGetCapabilities20(mapObj *map, wfsParamsObj *params,
{
msSetError( MS_WFSERR,
"WFS 2.0 request made, but mapserver requires libxml2 for WFS 2.0 services and this is not configured.",
"msWFSGetCapabilities20()", "NoApplicableCode" );
"msWFSGetCapabilities20()" );
return msWFSException11(map, "mapserv", "NoApplicableCode", params->pszVersion);
}
@@ -1325,7 +1325,7 @@ int msWFSListStoredQueries20(mapObj *map, wfsParamsObj *params,
{
msSetError( MS_WFSERR,
"WFS 2.0 request made, but mapserver requires libxml2 for WFS 2.0 services and this is not configured.",
"msWFSListStoredQueries20()", "NoApplicableCode" );
"msWFSListStoredQueries20()");
return msWFSException11(map, "mapserv", "NoApplicableCode", params->pszVersion);
}
@@ -1335,19 +1335,19 @@ int msWFSDescribeStoredQueries20(mapObj *map, wfsParamsObj *params,
{
msSetError( MS_WFSERR,
"WFS 2.0 request made, but mapserver requires libxml2 for WFS 2.0 services and this is not configured.",
"msWFSDescribeStoredQueries20()", "NoApplicableCode" );
"msWFSDescribeStoredQueries20()" );
return msWFSException11(map, "mapserv", "NoApplicableCode", params->pszVersion);
}
char* msWFSGetResolvedStoredQuery20(mapObj *map,
wfsParamsObj *wfsparams,
wfsParamsObj *params,
const char* id,
hashTableObj* hashTable)
{
msSetError( MS_WFSERR,
"WFS 2.0 request made, but mapserver requires libxml2 for WFS 2.0 services and this is not configured.",
"msWFSGetResolvedStoredQuery20()", "NoApplicableCode" );
"msWFSGetResolvedStoredQuery20()" );
msWFSException11(map, "mapserv", "NoApplicableCode", params->pszVersion);
return NULL;

0 comments on commit 6a5935d

Please sign in to comment.