diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | Tachometer.c | 3 | ||||
-rw-r--r-- | bsd-base64.c | 6 | ||||
-rw-r--r-- | bsd-base64.h | 2 | ||||
-rw-r--r-- | cgps.c | 2 | ||||
-rw-r--r-- | cgpxlogger.c | 1 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | dgnss.c | 1 | ||||
-rw-r--r-- | dgpsip.c | 6 | ||||
-rw-r--r-- | display.c | 3 | ||||
-rw-r--r-- | driver_proto.c | 3 | ||||
-rw-r--r-- | drivers.c | 6 | ||||
-rw-r--r-- | evermore.c | 3 | ||||
-rw-r--r-- | garmin.c | 3 | ||||
-rw-r--r-- | garminctl.c | 6 | ||||
-rw-r--r-- | geoid.c | 2 | ||||
-rw-r--r-- | gps.h | 1 | ||||
-rw-r--r-- | gpsd.c | 9 | ||||
-rw-r--r-- | gpsd.h | 1 | ||||
-rw-r--r-- | gpsd_dbus.c | 3 | ||||
-rw-r--r-- | gpsd_dbus.h | 4 | ||||
-rw-r--r-- | gpsflash.c | 2 | ||||
-rw-r--r-- | gpspipe.c | 4 | ||||
-rw-r--r-- | gpsutils.c | 2 | ||||
-rw-r--r-- | gpxlogger.c | 3 | ||||
-rw-r--r-- | isgps.c | 2 | ||||
-rw-r--r-- | italk.c | 3 | ||||
-rw-r--r-- | itraxctl.c | 1 | ||||
-rw-r--r-- | libgps.c | 3 | ||||
-rw-r--r-- | libgpsd_core.c | 8 | ||||
-rw-r--r-- | libgpsmm.h | 2 | ||||
-rw-r--r-- | netlib.c | 7 | ||||
-rw-r--r-- | nmea_parse.c | 2 | ||||
-rw-r--r-- | ntpshm.c | 1 | ||||
-rw-r--r-- | ntrip.c | 7 | ||||
-rw-r--r-- | packet.c | 4 | ||||
-rw-r--r-- | packet_test.c | 4 | ||||
-rw-r--r-- | report.c | 2 | ||||
-rw-r--r-- | rtcm.c | 2 | ||||
-rw-r--r-- | rtcmdecode.c | 2 | ||||
-rw-r--r-- | serial.c | 3 | ||||
-rw-r--r-- | sirf.c | 3 | ||||
-rw-r--r-- | sirfflash.c | 2 | ||||
-rw-r--r-- | sirfmon.c | 3 | ||||
-rw-r--r-- | srecord.c | 2 | ||||
-rw-r--r-- | subframe.c | 2 | ||||
-rw-r--r-- | truenorth.c | 2 | ||||
-rw-r--r-- | tsip.c | 2 | ||||
-rw-r--r-- | xgps.c | 3 | ||||
-rw-r--r-- | xgpsspeed.c | 3 | ||||
-rw-r--r-- | zodiac.c | 2 |
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, @@ -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, @@ -7,6 +7,7 @@ #include <unistd.h> #include <errno.h> +#include "gpsd_config.h" #include "gpsd.h" #define DGNSS_PROTO_DGPSIP "dgpsip://" @@ -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 */ @@ -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) @@ -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; @@ -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) @@ -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 */ @@ -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) @@ -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> @@ -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 @@ -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); @@ -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" @@ -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" @@ -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; @@ -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 @@ -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) @@ -28,6 +28,7 @@ #include <string.h> #include <termios.h> #include <unistd.h> +#include "gpsd_config.h" #include "gpsd.h" #include "italk.h" @@ -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) @@ -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 { @@ -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" @@ -11,6 +11,7 @@ #include <stdlib.h> #include <math.h> +#include "gpsd_config.h" #include "gpsd.h" #ifdef NTPSHM_ENABLE @@ -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" @@ -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; @@ -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, ... ) @@ -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; @@ -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> @@ -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" @@ -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 @@ -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" /* @@ -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 @@ -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" @@ -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" @@ -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 |