summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd/refclock_nmea.c
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2000-01-28 14:55:50 +0000
committerroberto <roberto@FreeBSD.org>2000-01-28 14:55:50 +0000
commitb5b40f9e420899251189775800d9f74092925299 (patch)
tree98efdf1b74d6ecb7828bb502a0350116eeb2fd3c /contrib/ntp/ntpd/refclock_nmea.c
parentef64b99e8412f2273dd2e8b3291c2f78ffc4667f (diff)
downloadFreeBSD-src-b5b40f9e420899251189775800d9f74092925299.zip
FreeBSD-src-b5b40f9e420899251189775800d9f74092925299.tar.gz
Virgin import of ntpd 4.0.99b
Diffstat (limited to 'contrib/ntp/ntpd/refclock_nmea.c')
-rw-r--r--contrib/ntp/ntpd/refclock_nmea.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/ntp/ntpd/refclock_nmea.c b/contrib/ntp/ntpd/refclock_nmea.c
index 211d01e..d90f71c 100644
--- a/contrib/ntp/ntpd/refclock_nmea.c
+++ b/contrib/ntp/ntpd/refclock_nmea.c
@@ -32,7 +32,11 @@
/*
* Definitions
*/
-#define DEVICE "/dev/gps%d" /* name of radio device */
+#ifdef SYS_WINNT
+# define DEVICE "COM%d:" /* COM 1 - 3 supported */
+#else
+# define DEVICE "/dev/gps%d" /* name of radio device */
+#endif
#define SPEED232 B4800 /* uart speed (4800 bps) */
#define PRECISION (-9) /* precision assumed (about 2 ms) */
#define DCD_PRECISION (-20) /* precision assumed (about 1 us) */
@@ -98,6 +102,7 @@ nmea_start(
* Open serial port. Use CLK line discipline, if available.
*/
(void)sprintf(device, DEVICE, unit);
+
if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
return (0);
OpenPOWER on IntegriCloud