summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--drivers.c4
-rw-r--r--garmin.c2
-rw-r--r--gpsd.h2
-rw-r--r--gpsutils.c1
-rw-r--r--libgpsd_core.c1
-rw-r--r--nmea_parse.c2
-rw-r--r--test/garmin-geko201.log2
-rw-r--r--test/garmin25lp.log2
-rw-r--r--test/garmin38.log2
-rw-r--r--test/holux.log2
-rw-r--r--tsip.c1
-rw-r--r--zodiac.c3
13 files changed, 10 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 3ce744fc..715f7300 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,7 @@ AC_C_BIGENDIAN
AC_FUNC_ALLOCA
if eval "test x$GCC = xyes"; then
- CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -W"
+ CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -W -D_GNU_SOURCE"
dnl -Wcast-qual
fi
diff --git a/drivers.c b/drivers.c
index 1667151f..d54f066e 100644
--- a/drivers.c
+++ b/drivers.c
@@ -51,9 +51,9 @@ static gps_mask_t nmea_parse_input(struct gps_device_t *session)
return 0;
}
-static size_t nmea_write_rtcm(struct gps_device_t *session, char *buf, size_t rtcmbytes)
+static ssize_t nmea_write_rtcm(struct gps_device_t *session, char *buf, size_t rtcmbytes)
{
- return (size_t)write(session->gpsdata.gps_fd, buf, rtcmbytes);
+ return write(session->gpsdata.gps_fd, buf, rtcmbytes);
}
static void nmea_initializer(struct gps_device_t *session)
diff --git a/garmin.c b/garmin.c
index 00c3ff46..a261cfc6 100644
--- a/garmin.c
+++ b/garmin.c
@@ -40,10 +40,8 @@
#include <stdio.h>
#include <stdlib.h>
-#define __USE_ISOC99 1 /* needed to get round() from math.h */
#include <math.h>
-#define __USE_GNU
#include <string.h>
#include <unistd.h>
#include <errno.h>
diff --git a/gpsd.h b/gpsd.h
index 8a904e69..bb2924c3 100644
--- a/gpsd.h
+++ b/gpsd.h
@@ -54,7 +54,7 @@ struct gps_type_t {
/*@null@*/void (*initializer)(struct gps_device_t *session);
/*@null@*/int (*get_packet)(struct gps_device_t *session, size_t waiting);
/*@null@*/gps_mask_t (*parse_packet)(struct gps_device_t *session);
- /*@null@*/size_t (*rtcm_writer)(struct gps_device_t *session, char *rtcmbuf, size_t rtcmbytes);
+ /*@null@*/ssize_t (*rtcm_writer)(struct gps_device_t *session, char *rtcmbuf, size_t rtcmbytes);
/*@null@*/bool (*speed_switcher)(struct gps_device_t *session, speed_t speed);
/*@null@*/void (*mode_switcher)(struct gps_device_t *session, int mode);
/*@null@*/void (*wrapup)(struct gps_device_t *session);
diff --git a/gpsutils.c b/gpsutils.c
index 3a8b02aa..b03c6387 100644
--- a/gpsutils.c
+++ b/gpsutils.c
@@ -5,7 +5,6 @@
#include <math.h>
#include <string.h>
#include <stdarg.h>
-#define __USE_XOPEN
#include <time.h>
#include "gpsd.h"
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 560a333b..9f6c9e1f 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -11,7 +11,6 @@
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h> /* for FIONREAD on BSD systems */
#endif
-#define __USE_GNU
#include <string.h>
#if defined(PPS_ENABLE) && defined(TIOCMIWAIT)
#include <pthread.h>
diff --git a/nmea_parse.c b/nmea_parse.c
index e464d99b..35c4a933 100644
--- a/nmea_parse.c
+++ b/nmea_parse.c
@@ -58,7 +58,7 @@ static void do_lat_lon(char *field[], struct gps_data_t *out)
* Timestamps always look like hhmmss.ss, with the trailing .ss part
* optional. RMC has a date field, in the format ddmmyy. ZDA has
* separate fields for day/month/year, with a 4-digit year. This
- * means that for RMC we must supply a century and for GGA and GGL we
+ * means that for RMC we must supply a century and for GGA and GLL we
* must supply a century, year, and day. We get the missing data from
* a previous RMC or ZDA; century in RMC is supplied by the host
* machine's clock time if there has been no previous RMC.
diff --git a/test/garmin-geko201.log b/test/garmin-geko201.log
index 3c7ac2de..7b9f2b21 100644
--- a/test/garmin-geko201.log
+++ b/test/garmin-geko201.log
@@ -1,6 +1,6 @@
# Name: Garmin Geko 201
# Cycle-time: 1-second
-# Start-of-cycle: GPRMC?
+# Start-of-cycle: GPRMC
# Pause-noted: Y
# Well-behaved: ?
# Submitted-by: "Jose Luis Domingo Lopez" <gps@24x7linux.com>
diff --git a/test/garmin25lp.log b/test/garmin25lp.log
index e7d37495..bc2e924f 100644
--- a/test/garmin25lp.log
+++ b/test/garmin25lp.log
@@ -1,6 +1,6 @@
# Name: Garmin 25LP
# Cycle-time: 1-second
-# Start-of-cycle: ?
+# Start-of-cycle: GPRMC
# Pause-noted: ?
# Well-behaved: Y
# Submitted-by: Daniele Giangrazi <daniele.giangrazi@elital.net>
diff --git a/test/garmin38.log b/test/garmin38.log
index a17fb6dd..1e4086ee 100644
--- a/test/garmin38.log
+++ b/test/garmin38.log
@@ -1,6 +1,6 @@
# Name: Garmin 38
# Cycle-time: 1-second
-# Start-of-cycle: ?
+# Start-of-cycle: GPRMC
# Pause-noted: N
# Well-behaved: Y
# Submitted-by: "Pascal F. Martin" <pascal.martin@cox.net>
diff --git a/test/holux.log b/test/holux.log
index 4d79844c..4d27b877 100644
--- a/test/holux.log
+++ b/test/holux.log
@@ -1,6 +1,6 @@
# Name: Holux GM-210
# Cycle-time: 1-second
-# Start-of-cycle: ?
+# Start-of-cycle: GPGGA
# Pause-noted: ?
# Well-behaved: N
# Submitted-by: "Patrick L. McGillan" <pmcgillan@pateri.com>
diff --git a/tsip.c b/tsip.c
index 0874173e..04c5e19d 100644
--- a/tsip.c
+++ b/tsip.c
@@ -6,7 +6,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#define __USE_ISOC99 1 /* needed to get log2() from math.h */
#include <math.h>
#include "gpsd.h"
#include "bits.h"
diff --git a/zodiac.c b/zodiac.c
index 2404935c..44573d59 100644
--- a/zodiac.c
+++ b/zodiac.c
@@ -5,7 +5,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#define __USE_ISOC99 1 /* needed to get log2() from math.h */
#include <math.h>
#include "gpsd.h"
#include "bits.h"
@@ -118,7 +117,7 @@ static void send_rtcm(struct gps_device_t *session,
zodiac_spew(session, 1351, data, n+1);
}
-static size_t zodiac_send_rtcm(struct gps_device_t *session,
+static ssize_t zodiac_send_rtcm(struct gps_device_t *session,
char *rtcmbuf, size_t rtcmbytes)
{
size_t len;