[Git][NTPsec/ntpsec][master] 5 commits: Remove duplicate code
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Sep 30 02:19:15 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
18d14108 by Eric S. Raymond at 2016-09-29T22:19:02-04:00
Remove duplicate code
- - - - -
486da5d7 by Eric S. Raymond at 2016-09-29T22:19:02-04:00
>From microsecond to nanosecond timescale.
- - - - -
747a038f by Eric S. Raymond at 2016-09-29T22:19:02-04:00
Typo fix.
- - - - -
1367fd4b by Eric S. Raymond at 2016-09-29T22:19:02-04:00
Update TODO list.
- - - - -
870c4e8b by Eric S. Raymond at 2016-09-29T22:19:02-04:00
Weaken header inclusions for better contaunment.
ntp_unixtime.h is included by timevalops.h.
- - - - -
6 changed files:
- devel/TODO
- libntp/systime.c
- ntpd/ntp_io.c
- ntpd/ntpd.c
- ntpd/refclock_generic.c
- ntptime/ntptime.c
Changes:
=====================================
devel/TODO
=====================================
--- a/devel/TODO
+++ b/devel/TODO
@@ -16,6 +16,10 @@
on at least one platform and test the NMEA, Atom, and SHM drivers
on most platforms.
+=== Packaging ===
+
+* Package metadata for Debian Ubuntu, Red Hat, and SuSe.
+
== After 1.0 release ==
* Replace ntpq with a Python wrapper around the ntp Python module.
=====================================
libntp/systime.c
=====================================
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -254,7 +254,7 @@ adj_systime(
bool isneg = false;
/*
- * FIXME: With the legacy Windows port on, this might be removable.
+ * FIXME: With the legacy Windows port gone, this might be removable.
* See also the related FIXME comment in ntpd/ntp_loopfilter.c.
*
* The Windows port adj_systime() depended on being called each
=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -27,7 +27,7 @@
#include "ntp_stdlib.h"
#include "ntp_worker.h"
#include "ntp_assert.h"
-#include "timevalops.h"
+#include "ntp_unixtime.h"
#include "timespecops.h"
#include <isc/mem.h>
=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -1067,7 +1067,7 @@ wait_child_sync_if(
time_t cur_time;
time_t wait_rem;
fd_set readset;
- struct timeval wtimeout;
+ struct timespec wtimeout;
if (0 == wait_sync)
return 0;
@@ -1081,11 +1081,11 @@ wait_child_sync_if(
? (wait_end_time - cur_time)
: 0;
wtimeout.tv_sec = wait_rem;
- wtimeout.tv_usec = 0;
+ wtimeout.tv_nsec = 0;
FD_ZERO(&readset);
FD_SET(pipe_read_fd, &readset);
- rc = select(pipe_read_fd + 1, &readset, NULL, NULL,
- &wtimeout);
+ rc = pselect(pipe_read_fd + 1, &readset, NULL, NULL,
+ &wtimeout, NULL);
if (-1 == rc) {
if (EINTR == errno)
continue;
@@ -1104,9 +1104,9 @@ wait_child_sync_if(
FD_ZERO(&readset);
FD_SET(pipe_read_fd, &readset);
wtimeout.tv_sec = 0;
- wtimeout.tv_usec = 0;
- rc = select(pipe_read_fd + 1, &readset, NULL,
- NULL, &wtimeout);
+ wtimeout.tv_nsec = 0;
+ rc = pselect(pipe_read_fd + 1, &readset, NULL,
+ NULL, &wtimeout, NULL);
if (0 == rc) /* select() timeout */
break;
else /* readable */
=====================================
ntpd/refclock_generic.c
=====================================
--- a/ntpd/refclock_generic.c
+++ b/ntpd/refclock_generic.c
@@ -68,7 +68,7 @@
#include "ntpd.h"
#include "ntp_refclock.h"
-#include "timevalops.h" /* includes <sys/time.h> */
+#include "ntp_unixtime.h"
#include "ntp_control.h" /* for CTL_* clocktypes */
#include <string.h>
=====================================
ntptime/ntptime.c
=====================================
--- a/ntptime/ntptime.c
+++ b/ntptime/ntptime.c
@@ -27,11 +27,6 @@
#endif
/* MUSL port shim */
-#if !defined(HAVE_NTP_ADJTIME) && defined(HAVE_ADJTIMEX)
-#define ntp_adjtime adjtimex
-#endif
-
-/* MUSL port shim */
#ifndef HAVE_NTP_GETTIME
#ifdef STRUCT_NTPTIMEVAL_HAS_TAI
int ntp_gettime(struct ntptimeval *ntv)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/00b103156605d13ade103b9a760a5f6e0834e754...870c4e8b7a9063cee26ed1f89c81a5d5b59a348c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160930/6e4d2f24/attachment.html>
More information about the vc
mailing list