Skip to content

Commit 435b944

Browse files
author
jef
committedNov 5, 2007

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed
 

‎src/plugins/geoprocessing/qgspggeoprocessing.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,37 +440,37 @@ void QgsPgGeoprocessing::unload()
440440
* of the plugin class
441441
*/
442442
// Class factory to return a new instance of the plugin class
443-
extern "C" QgisPlugin * classFactory(QgisInterface * qI)
443+
QGISEXTERN QgisPlugin * classFactory(QgisInterface * qI)
444444
{
445445
return new QgsPgGeoprocessing(qI);
446446
}
447447

448448
// Return the name of the plugin
449-
extern "C" QString name()
449+
QGISEXTERN QString name()
450450
{
451451
return name_;
452452
}
453453

454454
// Return the description
455-
extern "C" QString description()
455+
QGISEXTERN QString description()
456456
{
457457
return description_;
458458
}
459459

460460
// Return the type (either UI or MapLayer plugin)
461-
extern "C" int type()
461+
QGISEXTERN int type()
462462
{
463463
return type_;
464464
}
465465

466466
// Return the version number for the plugin
467-
extern "C" QString version()
467+
QGISEXTERN QString version()
468468
{
469469
return version_;
470470
}
471471

472472
// Delete ourself
473-
extern "C" void unload(QgisPlugin * p)
473+
QGISEXTERN void unload(QgisPlugin * p)
474474
{
475475
delete p;
476476
}

‎src/plugins/grass/qgsgrassplugin.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -826,38 +826,38 @@ void QgsGrassPlugin::unload()
826826
* of the plugin class
827827
*/
828828
// Class factory to return a new instance of the plugin class
829-
extern "C" QgisPlugin * classFactory(QgisInterface * theQgisInterfacePointer)
829+
QGISEXTERN QgisPlugin * classFactory(QgisInterface * theQgisInterfacePointer)
830830
{
831831
return new QgsGrassPlugin(theQgisInterfacePointer);
832832
}
833833

834834
// Return the name of the plugin - note that we do not user class members as
835835
// the class may not yet be insantiated when this method is called.
836-
extern "C" QString name()
836+
QGISEXTERN QString name()
837837
{
838838
return QObject::tr("GRASS");
839839
}
840840

841841
// Return the description
842-
extern "C" QString description()
842+
QGISEXTERN QString description()
843843
{
844844
return QObject::tr("GRASS layer");
845845
}
846846

847847
// Return the type (either UI or MapLayer plugin)
848-
extern "C" int type()
848+
QGISEXTERN int type()
849849
{
850850
return QgisPlugin::UI;
851851
}
852852

853853
// Return the version number for the plugin
854-
extern "C" QString version()
854+
QGISEXTERN QString version()
855855
{
856856
return pluginVersion;
857857
}
858858

859859
// Delete ourself
860-
extern "C" void unload(QgisPlugin * thePluginPointer)
860+
QGISEXTERN void unload(QgisPlugin * thePluginPointer)
861861
{
862862
delete thePluginPointer;
863863
}

‎src/providers/grass/provider.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@
2727
#include "qgsfield.h"
2828
#include "qgsrect.h"
2929

30+
#ifdef _MSC_VER
31+
// enables prototype in GRASS headers
32+
#define __STDC__ 1
33+
#endif
34+
3035
extern "C" {
3136
#include <grass/gis.h>
3237
#include <grass/dbmi.h>
3338
#include <grass/Vect.h>
3439
}
3540

41+
#ifdef _MSC_VER
42+
#undef __STDC__
43+
#endif
44+
3645
#include "qgsgrass.h"
3746
#include "qgsgrassprovider.h"
3847

‎src/providers/grass/qgsgrassprovider.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,22 @@
3636
#include "qgsrect.h"
3737
#include "qgsspatialrefsys.h"
3838

39+
#ifdef _MSC_VER
40+
// enable grass prototypes
41+
#define __STDC__ 1
42+
#endif
43+
3944
extern "C" {
4045
#include <grass/gprojects.h>
4146
#include <grass/gis.h>
4247
#include <grass/dbmi.h>
4348
#include <grass/Vect.h>
4449
}
4550

51+
#ifdef _MSC_VER
52+
#undef __STDC__
53+
#endif
54+
4655
#include "qgsgrass.h"
4756
#include "qgsgrassprovider.h"
4857

0 commit comments

Comments
 (0)
Please sign in to comment.