diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-11-20 03:51:06 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-11-20 03:51:06 +0000 |
commit | 96313a3f6861b1799729e5e788a3d20386554214 (patch) | |
tree | 2fa7901df149e5fa214054920d7024e1d5515c19 | |
parent | e5e05dcd7c1f412b71bc94ae52257eb0a2436687 (diff) | |
download | gpsd-96313a3f6861b1799729e5e788a3d20386554214.tar.gz |
Include the whole config file in gpsd.h.
That is, instead of sectioning out two little config defines and
putting them in. This makes gpsd.h self-copntained (e.g. in case it
gets installed as a library header) and means we can get rid of most
inclusions of it.
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | Tachometer.c | 1 | ||||
-rw-r--r-- | ais_json.c | 1 | ||||
-rw-r--r-- | bits.c | 1 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | driver_aivdm.c | 2 | ||||
-rw-r--r-- | driver_evermore.c | 1 | ||||
-rw-r--r-- | driver_italk.c | 1 | ||||
-rw-r--r-- | driver_navcom.c | 1 | ||||
-rw-r--r-- | driver_nmea.c | 1 | ||||
-rw-r--r-- | driver_oncore.c | 1 | ||||
-rw-r--r-- | driver_proto.c | 1 | ||||
-rw-r--r-- | driver_rtcm2.c | 1 | ||||
-rw-r--r-- | driver_rtcm3.c | 1 | ||||
-rw-r--r-- | driver_sirf.c | 1 | ||||
-rw-r--r-- | driver_superstar2.c | 1 | ||||
-rw-r--r-- | driver_ubx.c | 1 | ||||
-rw-r--r-- | driver_zodiac.c | 1 | ||||
-rw-r--r-- | drivers.c | 1 | ||||
-rw-r--r-- | geoid.c | 1 | ||||
-rw-r--r-- | gpsctl.c | 1 | ||||
-rw-r--r-- | gpsd.c | 1 | ||||
-rw-r--r-- | gpsd.h-head | 1 | ||||
-rw-r--r-- | gpsd.h-tail | 1 | ||||
-rw-r--r-- | gpsd_json.c | 1 | ||||
-rw-r--r-- | gpsd_report.c | 1 | ||||
-rw-r--r-- | gpsdecode.c | 1 | ||||
-rw-r--r-- | gpsmon.c | 1 | ||||
-rw-r--r-- | gpspacket.c | 1 | ||||
-rw-r--r-- | gpspipe.c | 1 | ||||
-rw-r--r-- | gpsutils.c | 1 | ||||
-rw-r--r-- | hex.c | 1 | ||||
-rw-r--r-- | isgps.c | 1 | ||||
-rw-r--r-- | libgps.c | 1 | ||||
-rw-r--r-- | libgps_json.c | 1 | ||||
-rw-r--r-- | libgpsd_core.c | 1 | ||||
-rwxr-xr-x | maskaudit.py | 1 | ||||
-rw-r--r-- | monitor_italk.c | 1 | ||||
-rw-r--r-- | monitor_nmea.c | 1 | ||||
-rw-r--r-- | monitor_oncore.c | 1 | ||||
-rw-r--r-- | monitor_proto.c | 1 | ||||
-rw-r--r-- | monitor_sirf.c | 1 | ||||
-rw-r--r-- | monitor_superstar2.c | 1 | ||||
-rw-r--r-- | monitor_ubx.c | 1 | ||||
-rw-r--r-- | net_dgpsip.c | 2 | ||||
-rw-r--r-- | net_gnss_dispatch.c | 1 | ||||
-rw-r--r-- | net_ntrip.c | 3 | ||||
-rw-r--r-- | netlib.c | 2 | ||||
-rw-r--r-- | ntpshm.c | 1 | ||||
-rw-r--r-- | packet.c | 1 | ||||
-rw-r--r-- | pseudonmea.c | 1 | ||||
-rw-r--r-- | rtcm2_json.c | 1 | ||||
-rw-r--r-- | serial.c | 2 | ||||
-rw-r--r-- | srecord.c | 1 | ||||
-rw-r--r-- | subframe.c | 2 | ||||
-rw-r--r-- | test_geoid.c | 4 | ||||
-rw-r--r-- | test_json.c | 2 | ||||
-rw-r--r-- | test_packet.c | 2 |
58 files changed, 28 insertions, 50 deletions
diff --git a/Makefile.am b/Makefile.am index e3cb2d44..2e72f1c1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -202,8 +202,7 @@ gpsd.h: gpsd.h-head gpsd.h-tail gpsd_config.h rm -f $(srcdir)/gpsd.h echo "/* This file is generated. Do not hand-hack it! */" >gpsd.h cat $(srcdir)/gpsd.h-head >>gpsd.h - grep VERSION gpsd_config.h >>gpsd.h - grep ENABLE gpsd_config.h >>gpsd.h + cat $(srcdir)/gpsd_config.h >>gpsd.h cat $(srcdir)/gpsd.h-tail >>gpsd.h chmod a-w $(srcdir)/gpsd.h @@ -370,7 +369,8 @@ stamp-gps-manpages: gps.xml CLEANFILES += stamp-gps-manpages stamp-gps-manpages.tmp endif -noinst_HEADERS = driver_italk.h driver_rtcm2.h driver_superstar2.h \ +noinst_HEADERS = gpsd_config.h \ + driver_italk.h driver_rtcm2.h driver_superstar2.h \ driver_ubx.h gpsmon.h gpsdclient.h json.h gps_json.h nodist_include_HEADERS = gpsd.h diff --git a/Tachometer.c b/Tachometer.c index 6d8c2622..69ec1340 100644 --- a/Tachometer.c +++ b/Tachometer.c @@ -12,6 +12,7 @@ #include <X11/StringDefs.h> #include <TachometerP.h> #include <math.h> + #include "gpsd_config.h" #include "gps.h" @@ -16,7 +16,6 @@ representations to libgps structures. #include <stdlib.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #include "gps_json.h" @@ -12,7 +12,6 @@ #include "bits.h" #ifdef DEBUG #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #endif /* DEBUG */ diff --git a/configure.ac b/configure.ac index 8e6e561c..13675554 100644 --- a/configure.ac +++ b/configure.ac @@ -250,7 +250,9 @@ size_t strlcat(/*@out@*/char *dst, /*@in@*/const char *src, size_t size); #endif #ifndef HAVE_STRLCPY size_t strlcpy(/*@out@*/char *dst, /*@in@*/const char *src, size_t size); -#endif]) +#endif + +#define GPSD_CONFIG_H]) dnl Check for X libraries ac_x="no" diff --git a/driver_aivdm.c b/driver_aivdm.c index 9437da7e..4f04a8a6 100644 --- a/driver_aivdm.c +++ b/driver_aivdm.c @@ -19,9 +19,7 @@ #include <time.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" - #include "bits.h" /** diff --git a/driver_evermore.c b/driver_evermore.c index 59906171..c39909a0 100644 --- a/driver_evermore.c +++ b/driver_evermore.c @@ -124,7 +124,6 @@ #include <time.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #if defined(EVERMORE_ENABLE) && defined(BINARY_ENABLE) diff --git a/driver_italk.c b/driver_italk.c index 5efc05dc..7533b104 100644 --- a/driver_italk.c +++ b/driver_italk.c @@ -14,7 +14,6 @@ #include <time.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #if defined(ITRAX_ENABLE) && defined(BINARY_ENABLE) diff --git a/driver_navcom.c b/driver_navcom.c index a2909b05..f00ad788 100644 --- a/driver_navcom.c +++ b/driver_navcom.c @@ -41,7 +41,6 @@ #include <sys/types.h> #include <inttypes.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #if defined(NAVCOM_ENABLE) && defined(BINARY_ENABLE) diff --git a/driver_nmea.c b/driver_nmea.c index cf403e86..8f26c832 100644 --- a/driver_nmea.c +++ b/driver_nmea.c @@ -11,7 +11,6 @@ #include <ctype.h> #include <time.h> -#include "gpsd_config.h" #include "gpsd.h" #include "timebase.h" diff --git a/driver_oncore.c b/driver_oncore.c index bf783a73..c869012f 100644 --- a/driver_oncore.c +++ b/driver_oncore.c @@ -12,7 +12,6 @@ #include <time.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #if defined(ONCORE_ENABLE) && defined(BINARY_ENABLE) diff --git a/driver_proto.c b/driver_proto.c index 607226ca..7a781041 100644 --- a/driver_proto.c +++ b/driver_proto.c @@ -47,7 +47,6 @@ #include <time.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #if defined(_PROTO__ENABLE) && defined(BINARY_ENABLE) diff --git a/driver_rtcm2.c b/driver_rtcm2.c index 3c10ae3f..cd224692 100644 --- a/driver_rtcm2.c +++ b/driver_rtcm2.c @@ -60,7 +60,6 @@ Starlink's website. #include <stdio.h> #include <math.h> /* for round() */ -#include "gpsd_config.h" #include "gpsd.h" #include "driver_rtcm2.h" diff --git a/driver_rtcm3.c b/driver_rtcm3.c index ce5415ba..a4f5631b 100644 --- a/driver_rtcm3.c +++ b/driver_rtcm3.c @@ -38,7 +38,6 @@ firmware. #include <arpa/inet.h> /* for ntohl(3) and friends */ #endif /* S_SPLINT_S */ -#include "gpsd_config.h" #include "gpsd.h" #include "bits.h" diff --git a/driver_sirf.c b/driver_sirf.c index 84e742fe..a4eb791d 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -37,7 +37,6 @@ #include <time.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #include "bits.h" #if defined(SIRF_ENABLE) && defined(BINARY_ENABLE) diff --git a/driver_superstar2.c b/driver_superstar2.c index 31e55dc8..f94f8e04 100644 --- a/driver_superstar2.c +++ b/driver_superstar2.c @@ -11,7 +11,6 @@ #include <time.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #if defined(SUPERSTAR2_ENABLE) && defined(BINARY_ENABLE) diff --git a/driver_ubx.c b/driver_ubx.c index b97b6fbb..1ec93911 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -16,7 +16,6 @@ #include <stdio.h> #include <assert.h> -#include "gpsd_config.h" #include "gpsd.h" #if defined(UBX_ENABLE) && defined(BINARY_ENABLE) #include "driver_ubx.h" diff --git a/driver_zodiac.c b/driver_zodiac.c index 3c228624..0ae83761 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -10,7 +10,6 @@ #include <unistd.h> #endif /* S_SPLINT_S */ #include <math.h> -#include "gpsd_config.h" #include "gpsd.h" #include "bits.h" @@ -12,7 +12,6 @@ #include <math.h> #include <stdarg.h> -#include "gpsd_config.h" #include "gpsd.h" #include "bits.h" /* for getbeuw(), to extract big-endiamn words */ @@ -8,7 +8,6 @@ #include <sys/types.h> #include <math.h> -#include "gpsd_config.h" #include "gpsd.h" static double fix_minuz(double d); @@ -16,7 +16,6 @@ #include <assert.h> #include <signal.h> -#include "gpsd_config.h" #include "gpsd.h" static int debuglevel; @@ -27,6 +27,7 @@ #include <math.h> #include "gpsd_config.h" + #if defined (HAVE_PATH_H) #include <paths.h> #else diff --git a/gpsd.h-head b/gpsd.h-head index 9c1b12fe..a915fe96 100644 --- a/gpsd.h-head +++ b/gpsd.h-head @@ -14,4 +14,5 @@ #endif #include "gps.h" +#ifndef GPSD_CONFIG_H /* Feature configuration switches begin here */ diff --git a/gpsd.h-tail b/gpsd.h-tail index 95b2d9f4..a4a7d10c 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -1,4 +1,5 @@ /* Feature configuration switches end here */ +#endif /* GPSD_CONFIG_H */ /* $Id$ */ diff --git a/gpsd_json.c b/gpsd_json.c index 332a2cc6..f37fb4ea 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -15,7 +15,6 @@ representations to gpsd core strctures, and vice_versa. #include <stdio.h> #include <ctype.h> -#include "gpsd_config.h" #include "gpsd.h" #include "gps_json.h" diff --git a/gpsd_report.c b/gpsd_report.c index 59b8c382..c97b00e1 100644 --- a/gpsd_report.c +++ b/gpsd_report.c @@ -2,7 +2,6 @@ #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/gpsdecode.c b/gpsdecode.c index 939bd9e3..64a264f3 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -11,7 +11,6 @@ #include <stdbool.h> #include <ctype.h> -#include "gpsd_config.h" #include "gpsd.h" #include "gps_json.h" @@ -27,6 +27,7 @@ #include <sys/ioctl.h> /* for O_RDWR */ #include "gpsd_config.h" + #ifdef HAVE_NCURSES_H #include <ncurses.h> #else diff --git a/gpspacket.c b/gpspacket.c index 087f6ebc..d6d05fd0 100644 --- a/gpspacket.c +++ b/gpspacket.c @@ -5,7 +5,6 @@ #include <Python.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" static PyObject *ErrorObject = NULL; @@ -36,7 +36,6 @@ #include <fcntl.h> #include <termios.h> #include <assert.h> -#include "gpsd_config.h" #include "gpsd.h" #include "gpsdclient.h" @@ -11,7 +11,6 @@ #include <stdarg.h> #include <time.h> -#include "gpsd_config.h" #include "gpsd.h" #define MONTHSPERYEAR 12 /* months per calendar year */ @@ -7,7 +7,6 @@ #include <math.h> #include <string.h> -#include "gpsd_config.h" #include "gpsd.h" int gpsd_hexdump_level = -1; @@ -64,7 +64,6 @@ You are not expected to understand any of this. #include <string.h> #include <stdbool.h> -#include "gpsd_config.h" #include "gpsd.h" #define MAG_SHIFT 6u @@ -15,7 +15,6 @@ #include <math.h> #include <locale.h> -#include "gpsd_config.h" #include "gpsd.h" #include "gps_json.h" diff --git a/libgps_json.c b/libgps_json.c index 2d519562..af85a4f0 100644 --- a/libgps_json.c +++ b/libgps_json.c @@ -15,7 +15,6 @@ representations to libgps structures. #include <stddef.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #include "gps_json.h" diff --git a/libgpsd_core.c b/libgpsd_core.c index c38f38ee..7a4a9f56 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -17,7 +17,6 @@ #include <errno.h> #include <fcntl.h> -#include "gpsd_config.h" #include "gpsd.h" #if defined(PPS_ENABLE) && defined(TIOCMIWAIT) diff --git a/maskaudit.py b/maskaudit.py index 544ec9e2..380fbe95 100755 --- a/maskaudit.py +++ b/maskaudit.py @@ -66,7 +66,6 @@ if __name__ == '__main__': #include <stdio.h> #include <string.h> -#include \"gpsd_config.h\" /* for strlcat() */ #include \"gpsd.h\" const char *gpsd_maskdump(gps_mask_t set) diff --git a/monitor_italk.c b/monitor_italk.c index f2c3dd63..09d6f996 100644 --- a/monitor_italk.c +++ b/monitor_italk.c @@ -12,6 +12,7 @@ #include <assert.h> #include "gpsd_config.h" + #ifdef HAVE_NCURSES_H #include <ncurses.h> #else diff --git a/monitor_nmea.c b/monitor_nmea.c index b109263f..e7c00735 100644 --- a/monitor_nmea.c +++ b/monitor_nmea.c @@ -18,6 +18,7 @@ #include <assert.h> #include "gpsd_config.h" + #ifdef HAVE_NCURSES_H #include <ncurses.h> #else diff --git a/monitor_oncore.c b/monitor_oncore.c index 5cc5bfec..7000864c 100644 --- a/monitor_oncore.c +++ b/monitor_oncore.c @@ -15,6 +15,7 @@ #include <assert.h> #include "gpsd_config.h" + #ifdef HAVE_NCURSES_H #include <ncurses.h> #else diff --git a/monitor_proto.c b/monitor_proto.c index 1b20da9f..21e43a38 100644 --- a/monitor_proto.c +++ b/monitor_proto.c @@ -15,6 +15,7 @@ #include <assert.h> #include "gpsd_config.h" + #ifdef HAVE_NCURSES_H #include <ncurses.h> #else diff --git a/monitor_sirf.c b/monitor_sirf.c index 4357f4ee..685ee592 100644 --- a/monitor_sirf.c +++ b/monitor_sirf.c @@ -16,6 +16,7 @@ #include <assert.h> #include "gpsd_config.h" + #ifdef HAVE_NCURSES_H #include <ncurses.h> #else diff --git a/monitor_superstar2.c b/monitor_superstar2.c index 50e64ff6..bf9d4ed6 100644 --- a/monitor_superstar2.c +++ b/monitor_superstar2.c @@ -12,6 +12,7 @@ #include <assert.h> #include "gpsd_config.h" + #ifdef HAVE_NCURSES_H #include <ncurses.h> #else diff --git a/monitor_ubx.c b/monitor_ubx.c index 98419c5f..6d32d05e 100644 --- a/monitor_ubx.c +++ b/monitor_ubx.c @@ -12,6 +12,7 @@ #include <assert.h> #include "gpsd_config.h" + #ifdef HAVE_NCURSES_H #include <ncurses.h> #else diff --git a/net_dgpsip.c b/net_dgpsip.c index abf14539..e771e5ec 100644 --- a/net_dgpsip.c +++ b/net_dgpsip.c @@ -15,7 +15,7 @@ #include <string.h> #include <errno.h> #include <fcntl.h> -#include "gpsd_config.h" + #include "gpsd.h" /*@ -branchstate */ diff --git a/net_gnss_dispatch.c b/net_gnss_dispatch.c index 78f58618..c631b4f5 100644 --- a/net_gnss_dispatch.c +++ b/net_gnss_dispatch.c @@ -9,7 +9,6 @@ #include <string.h> #include <errno.h> -#include "gpsd_config.h" #include "gpsd.h" #define NETGNSS_DGPSIP "dgpsip://" diff --git a/net_ntrip.c b/net_ntrip.c index 662b674e..2ccd2537 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -15,9 +15,7 @@ #include <string.h> #include <errno.h> #include <fcntl.h> -#include "gpsd_config.h" -#ifdef NTRIP_ENABLE #include "gpsd.h" #include "bsd-base64.h" @@ -474,4 +472,3 @@ void ntrip_report(struct gps_device_t *session) } } } -#endif /* NTRIP_ENABLE */ @@ -1,6 +1,8 @@ /* $Id$ */ #include <sys/types.h> + #include "gpsd_config.h" + #ifndef S_SPLINT_S #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> @@ -15,7 +15,6 @@ #include <math.h> #include <errno.h> -#include "gpsd_config.h" #include "gpsd.h" #ifdef NTPSHM_ENABLE @@ -37,7 +37,6 @@ others apart and distinguish them from baud barf. #include <arpa/inet.h> /* for htons() */ #endif /* S_SPLINT_S */ -#include "gpsd_config.h" #include "bits.h" #include "gpsd.h" #include "crc24q.h" diff --git a/pseudonmea.c b/pseudonmea.c index fe9b04c6..8c396e17 100644 --- a/pseudonmea.c +++ b/pseudonmea.c @@ -15,7 +15,6 @@ #include <errno.h> #include <fcntl.h> -#include "gpsd_config.h" #include "gpsd.h" /* diff --git a/rtcm2_json.c b/rtcm2_json.c index fac27f29..f10df591 100644 --- a/rtcm2_json.c +++ b/rtcm2_json.c @@ -15,7 +15,6 @@ representations to libgps structures. #include <stddef.h> #include <stdio.h> -#include "gpsd_config.h" #include "gpsd.h" #include "gps_json.h" @@ -13,7 +13,9 @@ #if defined(HAVE_SYS_MODEM_H) #include <sys/modem.h> #endif /* HAVE_SYS_MODEM_H */ + #include "gpsd.h" + /* Workaround for HP-UX 11.23, which is missing CRTSCTS */ #ifndef CRTSCTS # ifdef CNEW_RTSCTS @@ -18,7 +18,6 @@ #include <stdio.h> #include <string.h> -#include "gpsd_config.h" #include "gpsd.h" /* @@ -1,7 +1,7 @@ /* $Id$ */ /* subframe.c -- interpret satellite subframe data. */ #include <sys/types.h> -#include "gpsd_config.h" + #include "gpsd.h" #if 0 diff --git a/test_geoid.c b/test_geoid.c index 5db55019..c3566689 100644 --- a/test_geoid.c +++ b/test_geoid.c @@ -6,11 +6,11 @@ #include <sys/types.h> #include <math.h> -#include "gpsd_config.h" -#include "gpsd.h" #include <stdio.h> #include <stdlib.h> +#include "gpsd.h" + int main(int argc, char **argv) { double lat, lon; diff --git a/test_json.c b/test_json.c index 472b07b7..e34f004a 100644 --- a/test_json.c +++ b/test_json.c @@ -6,7 +6,7 @@ #include <stdlib.h> #include <stddef.h> #include <string.h> -#include "gpsd_config.h" + #include "gpsd.h" #include "gps_json.h" diff --git a/test_packet.c b/test_packet.c index abe7ac1e..30decee6 100644 --- a/test_packet.c +++ b/test_packet.c @@ -8,7 +8,7 @@ #ifndef S_SPLINT_S #include <unistd.h> #endif /* S_SPLINT_S */ -#include "gpsd_config.h" + #include "gpsd.h" static int verbose = 0; |