summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--Tachometer.c3
-rw-r--r--bsd-base64.c6
-rw-r--r--bsd-base64.h2
-rw-r--r--cgps.c2
-rw-r--r--cgpxlogger.c1
-rw-r--r--configure.ac2
-rw-r--r--dgnss.c1
-rw-r--r--dgpsip.c6
-rw-r--r--display.c3
-rw-r--r--driver_proto.c3
-rw-r--r--drivers.c6
-rw-r--r--evermore.c3
-rw-r--r--garmin.c3
-rw-r--r--garminctl.c6
-rw-r--r--geoid.c2
-rw-r--r--gps.h1
-rw-r--r--gpsd.c9
-rw-r--r--gpsd.h1
-rw-r--r--gpsd_dbus.c3
-rw-r--r--gpsd_dbus.h4
-rw-r--r--gpsflash.c2
-rw-r--r--gpspipe.c4
-rw-r--r--gpsutils.c2
-rw-r--r--gpxlogger.c3
-rw-r--r--isgps.c2
-rw-r--r--italk.c3
-rw-r--r--itraxctl.c1
-rw-r--r--libgps.c3
-rw-r--r--libgpsd_core.c8
-rw-r--r--libgpsmm.h2
-rw-r--r--netlib.c7
-rw-r--r--nmea_parse.c2
-rw-r--r--ntpshm.c1
-rw-r--r--ntrip.c7
-rw-r--r--packet.c4
-rw-r--r--packet_test.c4
-rw-r--r--report.c2
-rw-r--r--rtcm.c2
-rw-r--r--rtcmdecode.c2
-rw-r--r--serial.c3
-rw-r--r--sirf.c3
-rw-r--r--sirfflash.c2
-rw-r--r--sirfmon.c3
-rw-r--r--srecord.c2
-rw-r--r--subframe.c2
-rw-r--r--truenorth.c2
-rw-r--r--tsip.c2
-rw-r--r--xgps.c3
-rw-r--r--xgpsspeed.c3
-rw-r--r--zodiac.c2
51 files changed, 105 insertions, 52 deletions
diff --git a/Makefile.am b/Makefile.am
index 3795b551..b01be71c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -241,7 +241,7 @@ srec.5: srec.xml
gpsflash.1: gpsflash.xml
-$(XMLTO) man gpsflash.xml
-include_HEADERS = gps.h gpsd.h libgpsmm.h rtcm.h
+include_HEADERS = gps.h gpsd.h libgpsmm.h rtcm.h gpsd_config.h
EXTRA_DIST = \
autogen.sh \
diff --git a/Tachometer.c b/Tachometer.c
index cfb9c17e..decca2e8 100644
--- a/Tachometer.c
+++ b/Tachometer.c
@@ -14,11 +14,12 @@
*
* Send any comments, bug reports, etc. to shutoh@isl.yamaha.JUNET
*/
+#include <sys/types.h>
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#include <TachometerP.h>
#include <math.h>
-#include "config.h" /* must define UNUSED */
+#include "gpsd_config.h" /* must define UNUSED */
#define D2R 0.0174532925199432957692369076848861271 /* radians = pi/180 */
diff --git a/bsd-base64.c b/bsd-base64.c
index 7cb5da44..768bb6bb 100644
--- a/bsd-base64.c
+++ b/bsd-base64.c
@@ -43,9 +43,6 @@
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
-#include <stdlib.h>
-#include "config.h"
-
#if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)
#include <sys/types.h>
@@ -56,9 +53,10 @@
#include <ctype.h>
#include <stdio.h>
-
+#include <stdlib.h>
#include <string.h>
+#include "gpsd_config.h"
#include "bsd-base64.h"
#define Assert(Cond) if (!(Cond)) abort()
diff --git a/bsd-base64.h b/bsd-base64.h
index e7476848..a0d8db78 100644
--- a/bsd-base64.h
+++ b/bsd-base64.h
@@ -2,8 +2,6 @@
#ifndef _BSD_BASE64_H
#define _BSD_BASE64_H
-#include "config.h"
-
#ifndef HAVE___B64_NTOP
# ifndef HAVE_B64_NTOP
int b64_ntop(u_char const *src, size_t srclength, char *target,
diff --git a/cgps.c b/cgps.c
index d2115aab..7c7932aa 100644
--- a/cgps.c
+++ b/cgps.c
@@ -36,7 +36,7 @@
#include <ncurses.h>
#include <signal.h>
-#include "config.h"
+#include "gpsd_config.h"
#include "gps.h"
/* Macro for declaring function arguments unused. */
diff --git a/cgpxlogger.c b/cgpxlogger.c
index 2395270a..f19b8973 100644
--- a/cgpxlogger.c
+++ b/cgpxlogger.c
@@ -31,6 +31,7 @@
#include <string.h>
#include <unistd.h>
+#include "gpsd_config.h"
#include "gps.h"
#define BS 512
diff --git a/configure.ac b/configure.ac
index ccf11b82..ff155373 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl $Id$
AC_INIT
AM_INIT_AUTOMAKE(gpsd, 2.34)
AC_PREFIX_PROGRAM(gcc)
-AM_CONFIG_HEADER(config.h)
+AM_CONFIG_HEADER(gpsd_config.h)
AC_LANG([C])
AC_ARG_ENABLE(python,
diff --git a/dgnss.c b/dgnss.c
index bf078f94..fdbf1ff3 100644
--- a/dgnss.c
+++ b/dgnss.c
@@ -7,6 +7,7 @@
#include <unistd.h>
#include <errno.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#define DGNSS_PROTO_DGPSIP "dgpsip://"
diff --git a/dgpsip.c b/dgpsip.c
index a4174420..95a98191 100644
--- a/dgpsip.c
+++ b/dgpsip.c
@@ -1,15 +1,17 @@
/* $Id$ */
/* dgpsip.c -- gather and dispatch DGPS data from DGPSIP servers */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <netdb.h>
-#include <sys/socket.h>
-#include <sys/time.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include "gpsd_config.h"
#include "gpsd.h"
/*@ -branchstate */
diff --git a/display.c b/display.c
index e4c8a354..0eef6b70 100644
--- a/display.c
+++ b/display.c
@@ -1,9 +1,10 @@
/* $Id$ */
+#include <sys/types.h>
#include <stdio.h>
#include <math.h>
+#include "gpsd_config.h"
#include "gps.h"
-#include "config.h"
#include "display.h"
#define RM 20
diff --git a/driver_proto.c b/driver_proto.c
index e89a2e99..fdb14a6a 100644
--- a/driver_proto.c
+++ b/driver_proto.c
@@ -3,6 +3,7 @@
* A prototype driver. Doesn't run, doesn't even compile.
*/
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -10,9 +11,9 @@
#include <ctype.h>
#include <unistd.h>
#include <time.h>
-#include <sys/types.h>
#include <stdio.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#if defined(PROTO_ENABLE) && defined(BINARY_ENABLE)
diff --git a/drivers.c b/drivers.c
index 573a4222..bcd7d458 100644
--- a/drivers.c
+++ b/drivers.c
@@ -1,14 +1,16 @@
/* $Id$ */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <math.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
#include <stdarg.h>
+#include "gpsd_config.h"
#include "gpsd.h"
extern struct gps_type_t zodiac_binary;
diff --git a/evermore.c b/evermore.c
index b285da50..79092f0a 100644
--- a/evermore.c
+++ b/evermore.c
@@ -117,6 +117,7 @@
*
*/
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -124,9 +125,9 @@
#include <ctype.h>
#include <unistd.h>
#include <time.h>
-#include <sys/types.h>
#include <stdio.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#if defined(EVERMORE_ENABLE) && defined(BINARY_ENABLE)
diff --git a/garmin.c b/garmin.c
index ae85a4f1..bcdd5628 100644
--- a/garmin.c
+++ b/garmin.c
@@ -41,6 +41,7 @@
*/
#define __USE_POSIX199309 1
+#include <sys/types.h>
#include <time.h> // for nanosleep()
#include <stdio.h>
@@ -52,6 +53,7 @@
#include <errno.h>
#include <inttypes.h>
+#include "gpsd_config.h"
#if defined (HAVE_SYS_SELECT_H)
#include <sys/select.h>
#endif
@@ -60,7 +62,6 @@
#include <strings.h>
#endif
-#include "config.h"
#include "gpsd.h"
#include "gps.h"
diff --git a/garminctl.c b/garminctl.c
index 841b1d16..6f193796 100644
--- a/garminctl.c
+++ b/garminctl.c
@@ -5,9 +5,9 @@
*/
#define __USE_POSIX199309 1
+#include <sys/types.h>
#include <time.h> // for nanosleep()
-#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <fcntl.h>
@@ -20,7 +20,7 @@
#include <termios.h>
#include <unistd.h>
#include <stdbool.h>
-#include "config.h"
+#include "gpsd_config.h"
/* gross - globals */
static struct termios ttyset;
@@ -35,7 +35,7 @@ static void logit(int , char *, ...);
static void nmea_add_checksum(char *);
static int nmea_send(int , const char *, ... );
#ifndef HAVE_STRLCAT
-static size_t strlcat(char *dst, const char *src, size_t size);
+size_t strlcat(char *dst, const char *src, size_t size);
#endif
/* how many characters to look at when trying to find baud rate lock */
diff --git a/geoid.c b/geoid.c
index c125e4e9..6b6ab94b 100644
--- a/geoid.c
+++ b/geoid.c
@@ -6,7 +6,9 @@
* ECEF conversion by Rob Janssen.
*/
+#include <sys/types.h>
#include <math.h>
+#include "gpsd_config.h"
#include "gpsd.h"
static double bilinear(double x1, double y1, double x2, double y2, double x, double y, double z11, double z12, double z21, double z22)
diff --git a/gps.h b/gps.h
index 49640e5c..a47c63b5 100644
--- a/gps.h
+++ b/gps.h
@@ -10,7 +10,6 @@ extern "C" {
#include <sys/types.h>
#include <sys/time.h>
-#include "config.h"
#include <stdbool.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
diff --git a/gpsd.c b/gpsd.c
index 8d690f0d..8c097af0 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1,4 +1,8 @@
/* $Id$ */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <netinet/in.h>
#include <unistd.h>
#include <stdlib.h>
#include <syslog.h>
@@ -11,15 +15,12 @@
#include <stdarg.h>
#include <setjmp.h>
#include <stdio.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/in.h>
#include <assert.h>
#include <pwd.h>
#include <stdbool.h>
#include <math.h>
-#include "config.h"
+#include "gpsd_config.h"
#if defined (HAVE_PATH_H)
#include <paths.h>
#else
diff --git a/gpsd.h b/gpsd.h
index f229b3e9..647fd86f 100644
--- a/gpsd.h
+++ b/gpsd.h
@@ -7,7 +7,6 @@
#include <stdbool.h>
#include <stdio.h>
#include <termios.h>
-#include "config.h"
#include "gps.h"
/* Some internal capabilities depend on which drivers we're compiling. */
diff --git a/gpsd_dbus.c b/gpsd_dbus.c
index 45d1537d..526ddd08 100644
--- a/gpsd_dbus.c
+++ b/gpsd_dbus.c
@@ -1,6 +1,7 @@
/* $Id$ */
+#include <sys/types.h>
#include <stdio.h>
-#include <config.h>
+#include "gpsd_config.h"
#ifdef DBUS_ENABLE
#include <gpsd_dbus.h>
diff --git a/gpsd_dbus.h b/gpsd_dbus.h
index 90875a63..e1fdaaf0 100644
--- a/gpsd_dbus.h
+++ b/gpsd_dbus.h
@@ -1,5 +1,5 @@
/* $Id$ */
-#include <config.h>
+#include "gpsd_config.h"
#if DBUS_ENABLE==1
#ifndef _gpsd_dbus_h_
@@ -7,7 +7,7 @@
//#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus.h>
-#include <gpsd.h>
+#include "gpsd.h"
int initialize_dbus_connection (void);
void send_dbus_fix (struct gps_device_t* channel);
diff --git a/gpsflash.c b/gpsflash.c
index c8cb447f..ef602213 100644
--- a/gpsflash.c
+++ b/gpsflash.c
@@ -4,7 +4,9 @@
*
* Copyright (c) 2005 Chris Kuethe <chris.kuethe@gmail.com>
*/
+#include <sys/types.h>
#include <stdarg.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#include "gpsflash.h"
diff --git a/gpspipe.c b/gpspipe.c
index f8456227..4996a6a3 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -26,15 +26,17 @@
*
*/
+#include <sys/types.h>
+#include <sys/socket.h>
#include <errno.h>
#include <stdio.h>
-#include <sys/socket.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <termios.h>
+#include "gpsd_config.h"
#include "gpsd.h"
diff --git a/gpsutils.c b/gpsutils.c
index 75872e4e..8782c0a4 100644
--- a/gpsutils.c
+++ b/gpsutils.c
@@ -1,5 +1,6 @@
/* $Id$ */
/* gpsutils.c -- code shared between low-level and high-level interfaces */
+#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -8,6 +9,7 @@
#include <stdarg.h>
#include <time.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#define MONTHSPERYEAR 12 /* months per calendar year */
diff --git a/gpxlogger.c b/gpxlogger.c
index fbc48d50..31c2d2b3 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -1,4 +1,5 @@
/* $Id$ */
+#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#include <syslog.h>
@@ -12,7 +13,7 @@
#include <dbus/dbus-glib.h>
#include <glib/gprintf.h>
-#include "config.h"
+#include "gpsd_config.h"
DBusConnection* connection;
diff --git a/isgps.c b/isgps.c
index e69192fe..11ffebbf 100644
--- a/isgps.c
+++ b/isgps.c
@@ -55,11 +55,13 @@ necessary) reassembled into a struct rtcm_t.
*****************************************************************************/
+#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#ifdef BINARY_ENABLE
diff --git a/italk.c b/italk.c
index daf08ea5..2c943c94 100644
--- a/italk.c
+++ b/italk.c
@@ -2,6 +2,7 @@
/*
* Driver for the iTalk binary protocol used by FasTrax
*/
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -9,9 +10,9 @@
#include <ctype.h>
#include <unistd.h>
#include <time.h>
-#include <sys/types.h>
#include <stdio.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#if defined(ITALK_ENABLE) && defined(BINARY_ENABLE)
diff --git a/itraxctl.c b/itraxctl.c
index 87e4e5e1..c79dcc6b 100644
--- a/itraxctl.c
+++ b/itraxctl.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <termios.h>
#include <unistd.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#include "italk.h"
diff --git a/libgps.c b/libgps.c
index e94d39b2..4169b570 100644
--- a/libgps.c
+++ b/libgps.c
@@ -1,16 +1,17 @@
/* $Id$ */
/* libgps.c -- client interface library for the gpsd daemon */
+#include <sys/time.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <sys/time.h>
#ifndef S_SPLINT_S
#include <pthread.h> /* pacifies OpenBSD's compiler */
#endif
#include <math.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#ifdef S_SPLINT_S
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 17e0b870..b1c87e44 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -1,17 +1,19 @@
/* $Id$ */
/* libgpsd_core.c -- direct access to GPSes on serial or USB devices. */
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <netdb.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/time.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#if defined(PPS_ENABLE) && defined(TIOCMIWAIT)
diff --git a/libgpsmm.h b/libgpsmm.h
index c0476863..f9bb3a83 100644
--- a/libgpsmm.h
+++ b/libgpsmm.h
@@ -9,6 +9,8 @@
#ifndef _GPSMM_H_
#define _GPSMM_H_
+#include <sys/types.h>
+#include "gpsd_config.h"
#include "gps.h" //the C library we are going to wrap
class gpsmm {
diff --git a/netlib.c b/netlib.c
index 712e99fa..b5f23c24 100644
--- a/netlib.c
+++ b/netlib.c
@@ -1,13 +1,14 @@
/* $Id$ */
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#if !defined (INADDR_NONE)
diff --git a/nmea_parse.c b/nmea_parse.c
index b4965fce..fb1af620 100644
--- a/nmea_parse.c
+++ b/nmea_parse.c
@@ -1,4 +1,5 @@
/* $Id$ */
+#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -8,6 +9,7 @@
#include <ctype.h>
#include <time.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#include "timebase.h"
diff --git a/ntpshm.c b/ntpshm.c
index 2d1bb4c5..939436bc 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -11,6 +11,7 @@
#include <stdlib.h>
#include <math.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#ifdef NTPSHM_ENABLE
diff --git a/ntrip.c b/ntrip.c
index 671c0a40..56be7a9d 100644
--- a/ntrip.c
+++ b/ntrip.c
@@ -1,16 +1,17 @@
/* $Id$ */
/* ntrip.c -- gather and dispatch DGNSS data from Ntrip broadcasters */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <netdb.h>
-#include <sys/socket.h>
-#include <sys/time.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
-#include "config.h"
+#include "gpsd_config.h"
#ifdef NTRIP_ENABLE
#include "gpsd.h"
diff --git a/packet.c b/packet.c
index 53b9b279..c9c106fa 100644
--- a/packet.c
+++ b/packet.c
@@ -24,13 +24,13 @@ connected to the Garmin kernel driver. But we need to be able to tell the
others apart and distinguish them from baud barf.
***************************************************************************/
+#include <sys/types.h>
#include <ctype.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include <sys/types.h>
-#include "config.h"
+#include "gpsd_config.h"
#include "gpsd.h"
/*
diff --git a/packet_test.c b/packet_test.c
index 70ec1020..81d97d2f 100644
--- a/packet_test.c
+++ b/packet_test.c
@@ -1,14 +1,14 @@
/* $Id$ */
+#include <sys/types.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include <sys/types.h>
#include <stdarg.h>
#include <getopt.h>
-#include "config.h"
+#include "gpsd_config.h"
#include "gpsd.h"
static int verbose = 0;
diff --git a/report.c b/report.c
index 9518af34..59b8c382 100644
--- a/report.c
+++ b/report.c
@@ -1,6 +1,8 @@
/* $Id$ */
+#include <sys/types.h>
#include <stdio.h>
#include <stdarg.h>
+#include "gpsd_config.h"
#include "gpsd.h"
void gpsd_report(int errlevel UNUSED, const char *fmt, ... )
diff --git a/rtcm.c b/rtcm.c
index ad639db0..7f949291 100644
--- a/rtcm.c
+++ b/rtcm.c
@@ -48,6 +48,7 @@ Starlink's website.
*****************************************************************************/
+#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -55,6 +56,7 @@ Starlink's website.
#include <stdio.h>
#include <math.h> /* for round() */
+#include "gpsd_config.h"
#include "gpsd.h"
#include "rtcm.h"
diff --git a/rtcmdecode.c b/rtcmdecode.c
index 71a7bdbe..1c9fd14d 100644
--- a/rtcmdecode.c
+++ b/rtcmdecode.c
@@ -1,4 +1,5 @@
/* $Id$ */
+#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -8,6 +9,7 @@
#include <stdbool.h>
#include <ctype.h>
+#include "gpsd_config.h"
#include "gpsd.h"
static int verbose = ISGPS_ERRLEVEL_BASE;
diff --git a/serial.c b/serial.c
index 319d2a10..e867fec3 100644
--- a/serial.c
+++ b/serial.c
@@ -1,10 +1,11 @@
/* $Id$ */
+#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
-#include "config.h"
+#include "gpsd_config.h"
#if defined(HAVE_SYS_MODEM_H)
#include <sys/modem.h>
diff --git a/sirf.c b/sirf.c
index be92dd99..6baacd94 100644
--- a/sirf.c
+++ b/sirf.c
@@ -25,6 +25,7 @@
* 7, 28, 29 and 30 will give you the same information."
*/
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -32,9 +33,9 @@
#include <ctype.h>
#include <unistd.h>
#include <time.h>
-#include <sys/types.h>
#include <stdio.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#include "bits.h"
#if defined(SIRF_ENABLE) && defined(BINARY_ENABLE)
diff --git a/sirfflash.c b/sirfflash.c
index 060b91c5..87321e0b 100644
--- a/sirfflash.c
+++ b/sirfflash.c
@@ -47,6 +47,8 @@
* Copyright (c) 2005 Chris Kuethe <chris.kuethe@gmail.com>
*/
+#include <sys/types.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#include "gpsflash.h"
diff --git a/sirfmon.c b/sirfmon.c
index e2c842cc..4026c17e 100644
--- a/sirfmon.c
+++ b/sirfmon.c
@@ -23,6 +23,7 @@
* sirfmon is intended to be an independent sanity check on SiRF decoding,
* so it deliberately doesn't use much of the library.
*/
+#include <sys/types.h>
#include <stdio.h>
#include <curses.h>
#include <stdlib.h>
@@ -40,7 +41,7 @@
#include <stdarg.h>
#include <stdbool.h>
-#include "config.h"
+#include "gpsd_config.h"
#include "gps.h" /* for DEFAULT_GPSD_PORT; brings in PI as well */
#define PUT_ORIGIN -4
diff --git a/srecord.c b/srecord.c
index 62aa054a..8557aa54 100644
--- a/srecord.c
+++ b/srecord.c
@@ -14,9 +14,11 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
#include <stdio.h>
#include <string.h>
+#include "gpsd_config.h"
#include "gpsd.h"
/*
diff --git a/subframe.c b/subframe.c
index 435b34b0..c912d734 100644
--- a/subframe.c
+++ b/subframe.c
@@ -1,5 +1,7 @@
/* $Id$ */
/* subframe.c -- interpret satellite subframe data. */
+#include <sys/types.h>
+#include "gpsd_config.h"
#include "gpsd.h"
/*@ -usedef @*/
diff --git a/truenorth.c b/truenorth.c
index 167920d4..19de0ecb 100644
--- a/truenorth.c
+++ b/truenorth.c
@@ -10,6 +10,8 @@
* This is useful to supplement the heading provided by another GPS
* unit. A GPS heading is unreliable at slow speed or no speed.
*/
+#include <sys/types.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#ifdef TNT_ENABLE
diff --git a/tsip.c b/tsip.c
index 9351698f..6ca2107f 100644
--- a/tsip.c
+++ b/tsip.c
@@ -3,10 +3,12 @@
* Handle the Trimble TSIP packet format
* by Rob Janssen, PE1CHL.
*/
+#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#include "bits.h"
diff --git a/xgps.c b/xgps.c
index bdba116b..c0f61dc4 100644
--- a/xgps.c
+++ b/xgps.c
@@ -1,4 +1,5 @@
/* $Id$ */
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -18,7 +19,7 @@
#include <Xm/Protocols.h>
#include <X11/Shell.h>
-#include "config.h"
+#include "gpsd_config.h"
#include "gps.h"
#include "display.h"
diff --git a/xgpsspeed.c b/xgpsspeed.c
index 7e22af56..ad94a79e 100644
--- a/xgpsspeed.c
+++ b/xgpsspeed.c
@@ -2,6 +2,7 @@
/* GPS speedometer as a wrapper around an Athena widget Tachometer
* - Derrick J Brashear <shadow@dementia.org>
*/
+#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
@@ -14,7 +15,7 @@
#include <Xm/XmStrDefs.h>
#include <Tachometer.h>
-#include "config.h"
+#include "gpsd_config.h"
#include "gps.h"
#include "xgpsspeed.icon"
diff --git a/zodiac.c b/zodiac.c
index 611a93a7..0e265cef 100644
--- a/zodiac.c
+++ b/zodiac.c
@@ -2,11 +2,13 @@
/*
* Handle the Rockwell binary packet format supported by the old Zodiac chipset
*/
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
+#include "gpsd_config.h"
#include "gpsd.h"
#define LITTLE_ENDIAN_PROTOCOL