From 8e0d51dc0f47b79c941b0cfbf7e4cb648dd4728f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 14 Dec 2010 11:15:31 -0500 Subject: Still more simplification of configuration and header handling. --- driver_garmin.c | 4 ---- gpsd.h-tail | 8 -------- gpsmon.c | 5 ----- gpsmon.h | 7 +++++++ monitor_italk.c | 8 -------- monitor_nmea.c | 10 +--------- monitor_oncore.c | 8 -------- monitor_proto.c | 14 +++----------- monitor_sirf.c | 10 +--------- monitor_superstar2.c | 8 -------- monitor_tnt.c | 8 -------- monitor_ubx.c | 8 -------- packet.c | 10 +--------- serial.c | 2 -- 14 files changed, 13 insertions(+), 97 deletions(-) diff --git a/driver_garmin.c b/driver_garmin.c index 8ec73c29..76a40037 100644 --- a/driver_garmin.c +++ b/driver_garmin.c @@ -112,10 +112,6 @@ #error "don't know how to convert little endian to host order" #endif -#if defined(HAVE_STRINGS_H) -#include -#endif - #if defined(HAVE_LIBUSB) #include #endif diff --git a/gpsd.h-tail b/gpsd.h-tail index 90faa6b8..cb638258 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -199,14 +199,6 @@ struct aivdm_context_t { struct gps_device_t; -#if defined (HAVE_SYS_TERMIOS_H) -#include -#else -#if defined (HAVE_TERMIOS_H) -#include -#endif -#endif - #define MODE_NMEA 0 #define MODE_BINARY 1 diff --git a/gpsmon.c b/gpsmon.c index 95fd8b16..3ae51416 100644 --- a/gpsmon.c +++ b/gpsmon.c @@ -24,11 +24,6 @@ #ifdef HAVE_BLUEZ #include #endif -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" #include "gpsdclient.h" #include "gpsmon.h" diff --git a/gpsmon.h b/gpsmon.h index cccaefbb..a7485088 100644 --- a/gpsmon.h +++ b/gpsmon.h @@ -8,6 +8,13 @@ #ifndef _GPSD_GPSMON_H_ #define _GPSD_GPSMON_H_ +#include "gpsd_config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#include +#endif /* HAVE_NCURSES_H */ + #define COMMAND_TERMINATE -1 #define COMMAND_MATCH 1 #define COMMAND_UNKNOWN 0 diff --git a/monitor_italk.c b/monitor_italk.c index 49f84a06..478bd723 100644 --- a/monitor_italk.c +++ b/monitor_italk.c @@ -8,15 +8,7 @@ #include #endif /* S_SPLINT_S */ -#include "gpsd_config.h" - -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" - #include "bits.h" #include "gpsmon.h" diff --git a/monitor_nmea.c b/monitor_nmea.c index c6c63932..bb2a4a40 100644 --- a/monitor_nmea.c +++ b/monitor_nmea.c @@ -8,20 +8,12 @@ */ #include #include +#include #ifndef S_SPLINT_S #include #endif /* S_SPLINT_S */ -#include - -#include "gpsd_config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" - #include "gpsmon.h" #include "gpsdclient.h" diff --git a/monitor_oncore.c b/monitor_oncore.c index 6b135839..e030d1e5 100644 --- a/monitor_oncore.c +++ b/monitor_oncore.c @@ -11,15 +11,7 @@ #endif /* S_SPLINT_S */ #include -#include "gpsd_config.h" - -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" - #include "bits.h" #include "gpsmon.h" diff --git a/monitor_proto.c b/monitor_proto.c index 6afb2021..009486d0 100644 --- a/monitor_proto.c +++ b/monitor_proto.c @@ -9,22 +9,14 @@ #include #include #include -#ifndef S_SPLINT_S -#include -#endif /* S_SPLINT_S */ #include #include #include +#ifndef S_SPLINT_S +#include +#endif /* S_SPLINT_S */ -#include "gpsd_config.h" - -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" - #include "bits.h" #include "gpsmon.h" diff --git a/monitor_sirf.c b/monitor_sirf.c index 77468b10..b25ffa91 100644 --- a/monitor_sirf.c +++ b/monitor_sirf.c @@ -8,20 +8,12 @@ #include #include #include +#include #ifndef S_SPLINT_S #include #endif /* S_SPLINT_S */ -#include - -#include "gpsd_config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" - #include "bits.h" #include "gpsmon.h" diff --git a/monitor_superstar2.c b/monitor_superstar2.c index 91576380..ade795c2 100644 --- a/monitor_superstar2.c +++ b/monitor_superstar2.c @@ -6,15 +6,7 @@ #include #endif /* S_SPLINT_S */ -#include "gpsd_config.h" - -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" - #include "bits.h" #include "gpsmon.h" diff --git a/monitor_tnt.c b/monitor_tnt.c index 6732db9c..890644d8 100644 --- a/monitor_tnt.c +++ b/monitor_tnt.c @@ -8,15 +8,7 @@ #include #endif /* S_SPLINT_S */ -#include "gpsd_config.h" - -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" - #include "gpsmon.h" #ifdef TNT_ENABLE diff --git a/monitor_ubx.c b/monitor_ubx.c index f5839f74..7fd74439 100644 --- a/monitor_ubx.c +++ b/monitor_ubx.c @@ -7,15 +7,7 @@ #include #endif /* S_SPLINT_S */ -#include "gpsd_config.h" - -#ifdef HAVE_NCURSES_H -#include -#else -#include -#endif /* HAVE_NCURSES_H */ #include "gpsd.h" - #include "bits.h" #include "gpsmon.h" diff --git a/packet.c b/packet.c index 4837d072..4992662e 100644 --- a/packet.c +++ b/packet.c @@ -28,20 +28,12 @@ PERMISSIONS ***************************************************************************/ #include -#include "gpsd_config.h" #include -#ifndef S_SPLINT_S -#include -#endif /* S_SPLINT_S */ #include #include #ifndef S_SPLINT_S -#ifdef HAVE_NETINET_IN_H -#include /* for htons() */ -#endif /* HAVE_NETNET_IN_H */ -#ifdef HAVE_ARPA_INET_H #include /* for htons() */ -#endif /* HAVE_ARPA_INET_H */ +#include #endif /* S_SPLINT_S */ #include "bits.h" diff --git a/serial.c b/serial.c index 9ff5ebe9..68bef324 100644 --- a/serial.c +++ b/serial.c @@ -15,9 +15,7 @@ #include "gpsd_config.h" #ifdef HAVE_BLUEZ #ifndef S_SPLINT_S -#if HAVE_SYS_SOCKET_H #include -#endif /* HAVE_SYS_SOCKET_H */ #endif /* S_SPLINT_S */ #include #include -- cgit v1.2.1