Skip to content

Commit

Permalink
An attempt to fix compilation problems with new GRASS CVS.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6894 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Apr 17, 2007
1 parent 4ec4165 commit d2d4b23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/providers/grass/qgsgrass.cpp
Expand Up @@ -348,6 +348,10 @@ QString QgsGrass::mGisrc;
QString QgsGrass::mTmp;

int QgsGrass::error_routine ( char *msg, int fatal) {
return error_routine((const char*) msg, fatal);
}

int QgsGrass::error_routine ( const char *msg, int fatal) {
std::cerr << "error_routine (fatal = " << fatal << "): " << msg << std::endl;

if ( fatal ) error = FATAL;
Expand Down
5 changes: 5 additions & 0 deletions src/providers/grass/qgsgrass.h
Expand Up @@ -163,6 +163,11 @@ class QgsGrass {
static GERROR error; // static, because used in constructor
static QString error_message;

// G_set_error_routine has two versions of the function's first argument it expects:
// - char* msg - older version
// - const char* msg - in CVS from 04/2007
// this way compiler chooses suitable call
static int error_routine ( const char *msg, int fatal); // static because pointer to this function is set later
static int error_routine ( char *msg, int fatal); // static because pointer to this function is set later

// Current mapset lock file path
Expand Down

0 comments on commit d2d4b23

Please sign in to comment.