summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-30 12:32:12 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-30 12:39:26 -0400
commitd9b8758935f902fb0ea77fee09e9627e09462a11 (patch)
treed6dbb060ce2162abe50b6dcada9b23c0a80ad63d /drivers.c
parent7a5a25946be3db4bd8c08d1a5b126f43131144eb (diff)
downloadgpsd-d9b8758935f902fb0ea77fee09e9627e09462a11.tar.gz
Separate ntpd support from chrony support, step 1.
ntp_offset becomes time_offset. There is a new config symbol CHRONY_ENABLE; most time service code is npw controlled by TIMESERVICE_ENABLE. The file ntpshm.c becomes timeexport.c This change is not complete. More disentanglement has to be done inside timeexport.c itself; at the moment enabling one but not both of ntpshm or chrony will probably break its compile. The point of getting this commit out is so Gary will see the new baseline code ASAP. All regression tests pass.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c102
1 files changed, 51 insertions, 51 deletions
diff --git a/drivers.c b/drivers.c
index e55d8790..52d130bf 100644
--- a/drivers.c
+++ b/drivers.c
@@ -101,9 +101,9 @@ const struct gps_type_t unknown = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
@@ -265,9 +265,9 @@ const struct gps_type_t nmea = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
@@ -366,9 +366,9 @@ const struct gps_type_t garmin = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* GARMIN_ENABLE && NMEA_ENABLE */
@@ -428,9 +428,9 @@ const struct gps_type_t ashtech = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* ASHTECH_ENABLE */
@@ -479,9 +479,9 @@ const struct gps_type_t fv18 = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* FV18_ENABLE */
@@ -533,9 +533,9 @@ const struct gps_type_t gpsclock = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* GPSCLOCK_ENABLE */
@@ -588,9 +588,9 @@ static const struct gps_type_t tripmate = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* TRIPMATE_ENABLE */
@@ -639,9 +639,9 @@ static const struct gps_type_t earthmate = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* never actually used. */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/*@ -redef @*/
/* *INDENT-ON* */
@@ -762,9 +762,9 @@ const struct gps_type_t trueNorth = {
#ifdef CONTROLSEND_ENABLE
.control_send = tnt_control_send, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL,
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif
@@ -840,9 +840,9 @@ static const struct gps_type_t oceanServer = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL,
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif
@@ -907,9 +907,9 @@ static const struct gps_type_t fury = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL,
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
@@ -961,9 +961,9 @@ static const struct gps_type_t rtcm104v2 = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL,
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* RTCM104V2_ENABLE */
@@ -1007,9 +1007,9 @@ static const struct gps_type_t rtcm104v3 = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL,
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* RTCM104V3_ENABLE */
@@ -1042,9 +1042,9 @@ static const struct gps_type_t garmintxt = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL,
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* GARMINTXT_ENABLE */
@@ -1130,9 +1130,9 @@ const struct gps_type_t mtk3301 = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL,
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* MTK3301_ENABLE */
@@ -1368,9 +1368,9 @@ const struct gps_type_t aivdm = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* no control sender */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no NTP communication */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no NTP communication */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */
#endif /* AIVDM_ENABLE */
@@ -1466,9 +1466,9 @@ const struct gps_type_t json_passthrough = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = NULL, /* no method for NTP fudge factor */
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMESERVICE_ENABLE
+ .time_offset = NULL, /* no method for NTP fudge factor */
+#endif /* ENABLE ENABLE */
};
/* *INDENT-ON* */