summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-08-24 15:10:39 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-08-24 15:10:39 -0400
commit1d24b649febb8115cec4b35e1108a0556b755732 (patch)
treec7bd741b02c7f360044b1c0b616f15add6d02d5e
parent5e73bff6263416ac797dce5efd78fc075d0c4832 (diff)
downloadgpsd-1d24b649febb8115cec4b35e1108a0556b755732.tar.gz
Fix problems with reconfigure=no and netfeed=no builds.
-rw-r--r--NEWS3
-rw-r--r--driver_oncore.c2
-rw-r--r--driver_sirf.c2
-rw-r--r--driver_superstar2.c6
-rw-r--r--gpsd.c2
-rw-r--r--gpsmon.c9
-rw-r--r--libgpsd_core.c2
7 files changed, 18 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 9bcec03b..5356d40b 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,8 @@
in the build recipe. Under Linux, gpsd will refrain from opening
serial or USB devices that another process has open, avoiding potential
problems with class FF USB devices opened by other programs. Parallelized
- builds now work.
+ builds now work. Small but fatal problems with reconfigure=no and netfeed=no
+ builds have been fixed.
* Fri Aug 19 2011 Eric S. Raymond <esr@snark.thyrsus.com> - 3.0
POLL subobject name changes: fixes -> tpv, skyview -> sky.
diff --git a/driver_oncore.c b/driver_oncore.c
index 42e4d91e..6ccb0738 100644
--- a/driver_oncore.c
+++ b/driver_oncore.c
@@ -55,8 +55,10 @@ static gps_mask_t oncore_msg_firmware(struct gps_device_t *, unsigned char *,
*/
static ssize_t oncore_control_send(struct gps_device_t *, char *, size_t);
static void oncore_event_hook(struct gps_device_t *, event_t);
+#ifdef RECONFIGURE_ENABLE
static bool oncore_set_speed(struct gps_device_t *, speed_t, char, int);
static void oncore_set_mode(struct gps_device_t *, int);
+#endif /* RECONFIGURE_ENABLE */
/*
* Decode the navigation solution message
diff --git a/driver_sirf.c b/driver_sirf.c
index 600e2f11..2c180614 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -398,8 +398,10 @@ static gps_mask_t sirf_msg_swversion(struct gps_device_t *session,
fv = atof((const char *)cp);
if (fv < 231) {
session->driver.sirf.driverstate |= SIRF_LT_231;
+#ifdef RECONFIGURE_ENABLE
if (fv > 200)
sirfbin_mode(session, 0);
+#endif /* RECONFIGURE_ENABLE */
} else if (fv < 232) {
session->driver.sirf.driverstate |= SIRF_EQ_231;
} else {
diff --git a/driver_superstar2.c b/driver_superstar2.c
index d7fa099b..ef14b34d 100644
--- a/driver_superstar2.c
+++ b/driver_superstar2.c
@@ -39,9 +39,11 @@ static gps_mask_t superstar2_msg_ephemeris(struct gps_device_t *,
*/
static ssize_t superstar2_control_send(struct gps_device_t *, char *, size_t);
static void superstar2_event_hook(struct gps_device_t *, event_t);
+static ssize_t superstar2_write(struct gps_device_t *, char *, size_t);
+#ifdef RECONFIGURE_ENABLE
static bool superstar2_set_speed(struct gps_device_t *, speed_t, char, int);
static void superstar2_set_mode(struct gps_device_t *, int);
-static ssize_t superstar2_write(struct gps_device_t *, char *, size_t);
+#endif /* RECONFIGURE_ENABLE */
/*
@@ -521,7 +523,6 @@ static bool superstar2_set_speed(struct gps_device_t *session,
return (superstar2_write(session, (char *)speed_msg, 7) == 7);
}
}
-#endif /* RECONFIGURE_ENABLE */
static void superstar2_set_mode(struct gps_device_t *session, int mode)
{
@@ -538,6 +539,7 @@ static void superstar2_set_mode(struct gps_device_t *session, int mode)
session->back_to_nmea = false;
}
}
+#endif /* RECONFIGURE_ENABLE */
/* *INDENT-OFF* */
const struct gps_type_t superstar2_binary = {
diff --git a/gpsd.c b/gpsd.c
index 177033c2..db2794aa 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1087,13 +1087,13 @@ static void handle_request(struct subscriber_t *sub,
} else if (strncmp(buf, "DEVICE", 6) == 0
&& (buf[6] == ';' || buf[6] == '=')) {
struct devconfig_t devconf;
- struct gps_device_t *device;
buf += 6;
devconf.path[0] = '\0'; /* initially, no device selection */
if (*buf == ';') {
++buf;
} else {
#ifdef RECONFIGURE_ENABLE
+ struct gps_device_t *device;
/* first, select a device to operate on */
int status = json_device_read(buf + 1, &devconf, &end);
if (end == NULL)
diff --git a/gpsmon.c b/gpsmon.c
index b86e932e..d9b5b3a4 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -287,7 +287,9 @@ static void monitor_dump_send(/*@in@*/ const char *buf, size_t len)
(void)wattrset(packetwin, A_NORMAL);
}
}
+#endif /* defined(CONTROLSEND_ENABLE) || defined(RECONFIGURE_ENABLE) */
+#ifdef RECONFIGURE_ENABLE
static void announce_log(/*@in@*/ const char *str)
{
if (packetwin != NULL) {
@@ -301,7 +303,8 @@ static void announce_log(/*@in@*/ const char *str)
(void)fprintf(logfile, ">>>%s\n", str);
}
}
-#endif /* defined(CONTROLSEND_ENABLE) || defined(RECONFIGURE_ENABLE) */
+#endif /* RECONFIGURE_ENABLE */
+
#ifdef CONTROLSEND_ENABLE
bool monitor_control_send( /*@in@*/ unsigned char *buf, size_t len)
@@ -427,9 +430,9 @@ static void onsig(int sig UNUSED)
int main(int argc, char **argv)
{
-#if defined(CONTROLSEND_ENABLE) || defined(RECONFIGURE_ENABLE)
+#ifdef RECONFIGURE_ENABLE
unsigned int v;
-#endif /* defined(CONTROLSEND_ENABLE) || defined(RECONFIGURE_ENABLE) */
+#endif /* RECONFIGURE_ENABLE */
int option, status, last_type = BAD_PACKET;
ssize_t len;
struct fixsource_t source;
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 9fe3d42a..ff364f2e 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -259,7 +259,7 @@ int gpsd_open(struct gps_device_t *session)
}
#endif /* NETFEED_ENABLE */
#ifdef PASSTHROUGH_ENABLE
- else if (strncmp(session->gpsdata.dev.path, "gpsd://", 7) == 0) {
+ if (strncmp(session->gpsdata.dev.path, "gpsd://", 7) == 0) {
/*@-branchstate -nullpass@*/
char server[GPS_PATH_MAX], *port;
socket_t dsock;