Skip to content
Permalink
Browse files

make 0.11 compile with grass 6.4

git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_11_0@9719 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 29, 2008
1 parent 3e7692c commit 7d9c4ad0fb015eb09da3b42ba5ad2e726fd061f7
Showing with 17 additions and 0 deletions.
  1. +5 −0 src/plugins/grass/qgsgrassplugin.cpp
  2. +12 −0 src/providers/grass/qgsgrassprovider.cpp
@@ -496,7 +496,12 @@ void QgsGrassPlugin::newVector()
return;
}

#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \
( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 )
Vect_build ( &Map );
#else
Vect_build ( &Map, stderr );
#endif
Vect_set_release_support ( &Map );
Vect_close ( &Map );

@@ -46,6 +46,7 @@ extern "C" {
#include <grass/gis.h>
#include <grass/dbmi.h>
#include <grass/Vect.h>
#include <grass/version.h>
}

#ifdef _MSC_VER
@@ -1037,7 +1038,12 @@ int QgsGrassProvider::openMap(QString gisdbase, QString location, QString mapset
if ( level == 1 )
{
QgsGrass::resetError();
#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \
( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 )
Vect_build ( map.map );
#else
Vect_build ( map.map, stderr );
#endif

if ( QgsGrass::getError() == QgsGrass::FATAL ) {
std::cerr << "Cannot build topology: "
@@ -1492,8 +1498,14 @@ bool QgsGrassProvider::closeEdit ( bool newMap )
// TODO: Is it necessary for build/close ?
G__setenv( (char *)"MAPSET", (char *) map->mapset.ascii() );

#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \
( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 )
Vect_build_partial ( map->map, GV_BUILD_NONE);
Vect_build ( map->map );
#else
Vect_build_partial ( map->map, GV_BUILD_NONE, NULL);
Vect_build ( map->map, stderr );
#endif

// If a new map was created close the map and return
if ( newMap )

0 comments on commit 7d9c4ad

Please sign in to comment.
You can’t perform that action at this time.