[Marble-commits] KDE/kdeedu/marble/src/plugins/positionprovider/gpsd
Jens-Michael Hoffmann
jensmh at gmx.de
Thu Mar 4 16:27:58 CET 2010
SVN commit 1098876 by jmhoffmann:
Improve detection of gpsd API.
Even if API major is bumped, it does not mean that this code won't build. So
simply use >=.
Patch contributed by Modestas Vainius <modax at debian.org>.
CCMAIL: modax at debian.org
M +2 -2 GpsdConnection.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp #1098875:1098876
@@ -20,7 +20,7 @@
{
gps_data_t* data = m_gpsd.open();
if ( data ) {
-#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION == 3 || GPSD_API_MAJOR_VERSION == 4 ) && defined( WATCH_ENABLE )
+#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( WATCH_ENABLE )
m_gpsd.stream( WATCH_ENABLE );
#endif
connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) );
@@ -32,7 +32,7 @@
void GpsdConnection::update()
{
gps_data_t* data = 0;
-#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION == 3 || GPSD_API_MAJOR_VERSION == 4 ) && defined( POLICY_SET )
+#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( POLICY_SET )
while ((data = m_gpsd.poll()) && !(data->set & POLICY_SET)) {
data = m_gpsd.poll();
}
More information about the Marble-commits
mailing list