Commit 85b39ec9 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Formally drop support for systems without ntp_adjtime(2).

However, restore building omnmn Solaris, which doesn't have STA_* symbols
in timex.h. Reporting of the kernel status word will be degraded on these
systems.
parent 31d6e42a
Pipeline #14748293 passed with stages
in 23 minutes and 49 seconds
......@@ -4,10 +4,10 @@
This software should build on any operating system conformant to
POSIX.1-2001 and ISO/IEC 9899:1999 (C99). In addition, the operating
system must have an ntp_adjtime(2) call or the older BSD adjtime(2)
call. Also, it must support the IPv6 API defined in RFC 2493 and
RFC 2553. Finally, it must support iterating over active UDP interfaces
via getifaddrs(3) or some equivalent facility.
system must have an ntp_adjtime(2) call. Also, it must support the
IPv6 API defined in RFC 2493 and RFC 2553. Finally, it must support
iterating over active UDP interfaces via getifaddrs(3) or some
equivalent facility.
You can browse a summary of differences from legacy NTP here:
......@@ -123,33 +123,6 @@ Under Unix, the simplest way to compile this package is:
configure and compile the package for a different kind of
computer), type `./waf distclean'.
=== Apple ===
Under OS X you can build NTPsec using Xcode command line tools with no
additions. There is currently no support for using Xcode's builder.
Previous support for OS X 10.11 has been dropped due to multiple
botches on Apple's part. Your OS X needs to have POSIX compliant
clock_gettime(2) and clock_settime(2) functions.
The OS X build has been tested in this environment:
OS X Version : 10.12
Xcode Version : 7.1
Xcode Command Line Tools : 7.2-beta
The macOS build has been tested in this environment:
macOS Version : 16.3.0
Xcode Version : 8.2.1
All you will require is the Xcode command line tools with no additions.
There is currently no support for using Xcode's builder. NTPsec's standard
waf based build system is used.
To disable Apple's NTP, open the Date & Time Preferences and uncheck
"Set date and time automatically".
=== Solaris ===
When building the NTPsec suite using gcc under Solaris, you may see
......
......@@ -16,6 +16,13 @@ It is now possible to unpeer refclocks using a type/unit specification
rather than a magic IP address. This was the last obligatory use of
magic IP addresses in the configuration grammar.
OpenBSD has been removed from the list of supported platforms for
ntpd. It will be restored if and when its clock API supports drift
adjustment via ntp_adjtime() or equivalent facility.
MAc OS X support hsas been dropped pending the implementation of
ntp_adjtime(2); this is supposed to be in Mac OS X 10.13.
== 2017-10-10: 1.0.0 ==
This is the 1.0 release.
......
......@@ -196,11 +196,12 @@ quite a while before NTPsec removed it.
== System call interface and the PLL ==
All of ntpd's clock management is done through four system calls:
clock_gettime(2), clock_settime(2), and either ntp_adjtime(2) or the
older BSD adjtime(2) call. For ntp_adjtime(), ntpd actually uses a
thin wrapper that hides the difference between systems with
nanosecond-precision and those with only microsecond precision;
internally, ntpd does all its calculations with nanosecond precision.
clock_gettime(2), clock_settime(2), and either ntp_adjtime(2) or (in
exceptional cases) the older BSD adjtime(2) call. For ntp_adjtime(),
ntpd actually uses a thin wrapper that hides the difference between
systems with nanosecond-precision and those with only microsecond
precision; internally, ntpd does all its calculations with nanosecond
precision.
The clock_gettime(2) and clock_settime(2) calls are standardized in
POSIX; ntp_adjtime(2) is not, exhibiting some variability in
......@@ -261,10 +262,12 @@ do its work, using a control technique called a PLL/FLL (phase-locked
loop/frequency-locked loop) to do it.
The older BSD adjtime(2) can be used for slewing as well, but doesn't
assume a kernel-level PLL is available. Some platforms, like OpenBSD
and Mac OS X, use only this call because they lack ntp_adjtime(2).
Without the PLL calls, convergence to good time is observably a lot
slower and tracking will accordingly be less reliable.
assume a kernel-level PLL is available. It is used only when
ntp_adjtime() calls generate a SIGSYS because the system call has not
been implemented. Without the PLL calls, convergence to good time is
observably a lot slower and tracking will accordingly be less
reliable; support for systems that lack them (notably OpenBSD and
older Mac OS X versions) has been dropped fom NTPsec.
Deep-in-the weeds details about the kernel PLL from Hal Murray follow.
If you can follow these you may be qualified to maintain this code...
......
......@@ -190,22 +190,54 @@ static const struct codestring res_access_bits[] = {
* kernel discipline status bits
*/
static const struct codestring k_st_bits[] = {
# ifdef STA_PLL
{ STA_PLL, "pll" },
# endif
# ifdef STA_PPSFREQ
{ STA_PPSFREQ, "ppsfreq" },
# endif
# ifdef STA_PPSTIME
{ STA_PPSTIME, "ppstime" },
# endif
# ifdef STA_FLL
{ STA_FLL, "fll" },
# endif
# ifdef STA_INS
{ STA_INS, "ins" },
# endif
# ifdef STA_DEL
{ STA_DEL, "del" },
# endif
# ifdef STA_UNSYNC
{ STA_UNSYNC, "unsync" },
# endif
# ifdef STA_FREQHOLD
{ STA_FREQHOLD, "freqhold" },
# endif
# ifdef STA_PPSSIGNAL
{ STA_PPSSIGNAL, "ppssignal" },
# endif
# ifdef STA_PPSJITTER
{ STA_PPSJITTER, "ppsjitter" },
# endif
# ifdef STA_PPSWANDER
{ STA_PPSWANDER, "ppswander" },
# endif
# ifdef STA_PPSERROR
{ STA_PPSERROR, "ppserror" },
# endif
# ifdef STA_CLOCKERR
{ STA_CLOCKERR, "clockerr" },
# endif
# ifdef STA_NANO
{ STA_NANO, "nano" },
# endif
# ifdef STA_MODE
{ STA_MODE, "mode=fll" },
# endif
# ifdef STA_CLK
{ STA_CLK, "src=B" },
# endif
/* not used with getcode(), no terminating entry needed */
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment