summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver_nmea2000.c1
-rw-r--r--gpsd.h-tail14
-rw-r--r--libgps.h17
-rw-r--r--test_libgps.c3
4 files changed, 20 insertions, 15 deletions
diff --git a/driver_nmea2000.c b/driver_nmea2000.c
index 76da0002..6f938e00 100644
--- a/driver_nmea2000.c
+++ b/driver_nmea2000.c
@@ -19,6 +19,7 @@
#include <sys/ioctl.h>
#include "gpsd.h"
+#include "libgps.h"
#if defined(NMEA2000_ENABLE)
#include "driver_nmea2000.h"
#include "bits.h"
diff --git a/gpsd.h-tail b/gpsd.h-tail
index c51cda98..6af997ae 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -931,20 +931,6 @@ extern bool ais_binary_decode(const struct gpsd_errout_t *errout,
const unsigned char *, size_t,
struct ais_type24_queue_t *);
-/* debugging apparatus for the client library */
-#ifdef CLIENTDEBUG_ENABLE
-#define LIBGPS_DEBUG
-#endif /* CLIENTDEBUG_ENABLE */
-#ifdef LIBGPS_DEBUG
-#define DEBUG_CALLS 1 /* shallowest debug level */
-#define DEBUG_JSON 5 /* minimum level for verbose JSON debugging */
-# define libgps_debug_trace(args) (void) libgps_trace args
-extern int libgps_debuglevel;
-extern void libgps_dump_state(struct gps_data_t *);
-#else
-# define libgps_debug_trace(args) do { } while (0)
-#endif /* LIBGPS_DEBUG */
-
void gpsd_labeled_report(const int, const int,
const char *, const char *, va_list);
void gpsd_vlog(const struct gpsd_errout_t *,
diff --git a/libgps.h b/libgps.h
index 92649130..70d4b7d3 100644
--- a/libgps.h
+++ b/libgps.h
@@ -10,6 +10,8 @@
#define SHM_PSEUDO_FD -1
#define DBUS_PSEUDO_FD -2
+#include "gps.h"
+#include "gpsd_config.h"
#include "compiler.h"
#ifdef __cplusplus
@@ -38,6 +40,21 @@ extern int gps_dbus_mainloop(struct gps_data_t *, int,
extern int json_ais_read(const char *, char *, size_t, struct ais_t *,
const char **);
+
+/* debugging apparatus for the client library */
+#ifdef CLIENTDEBUG_ENABLE
+#define LIBGPS_DEBUG
+#endif /* CLIENTDEBUG_ENABLE */
+#ifdef LIBGPS_DEBUG
+#define DEBUG_CALLS 1 /* shallowest debug level */
+#define DEBUG_JSON 5 /* minimum level for verbose JSON debugging */
+# define libgps_debug_trace(args) (void) libgps_trace args
+extern int libgps_debuglevel;
+extern void libgps_dump_state(struct gps_data_t *);
+#else
+# define libgps_debug_trace(args) do { } while (0)
+#endif /* LIBGPS_DEBUG */
+
#ifdef __cplusplus
}
#endif
diff --git a/test_libgps.c b/test_libgps.c
index 97ad107f..1102c35d 100644
--- a/test_libgps.c
+++ b/test_libgps.c
@@ -12,7 +12,8 @@
#define LIBGPS_DEBUG
-#include "gpsd.h"
+#include "gps.h"
+#include "libgps.h"
#include "gpsdclient.h"
#include <unistd.h>