Commits (2)
......@@ -23,8 +23,6 @@
internal symbols for testing, e.g --define FOO=BAR generates #define
FOO BAR into config.h.
* Add monkeypatch for rmdir, rmtree under Windows.
=== Code ===
* Can the KERNEL_PLL code be removed? It's used by drivers 4, 8, 20, 22, and
......@@ -117,9 +115,6 @@ Neither is ideal, easy pickings for someone to code on.
* We might be able to eliminate a lot of the Linux runtime
droproot code by using file capabilities.
* Better ANSI/POSIX conformance in MinGW and Visual Studio 2013 might
enable us to get rid of the SYS_WINNT code. Should be tried...
* There is a mess around the symbols NO_MAIN_ALLOWED, BUILD_AS_LIB, and
LIBNTP_C that needs to be refactored. ntpd should *always* be built as
a library linked to a main module, these guard symbols should go away.
......
......@@ -183,63 +183,12 @@ __UNUSED__
_STRING_H # In ntpd/ntp_parser.tab.c
__BUILTIN_VA_ARG_INCR # In ntpd/ntp_parser.tab.c
__SIZE_TYPE__ # In ntpd/ntp_parser.tab.c
# Inaccessible port guards
SYS_WINNT # Won't make any sense until we have a Windows port again
SYS_CYGWIN32
# Windows port only - these may need revisiting
# if we can't drop the SYS_WINNT code
NTDDI_.* # Some sort of Windows NT version thing
DOES_NOT_WORK
EREALLOC_.*
HAVE_IO_COMPLETION_PORT # Windows only alternative to signaled I/O
INTPTR_MAX
INTPTR_MIN
ISC_STATIC_WIN
ISC_PLATFORM_QUADFORMAT
ISC_PLATFORM_USEDECLSPEC
LIBBIND9_EXPORTS
LIBDNS_EXPORTS
LIBISCCC_EXPORTS
LIBISCCFG_EXPORTS
LIBISC_EXPORTS
LOG_AUTHPRIV
LOG_CRON
LOG_FTP
LOG_NEWS
LOG_UUCP
MALLOC_LINT
MISSING_STDBOOL_H
MULTICAST_NONEWSOCKET
OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER
PTRDIFF_MAX
PTRDIFF_MIN
STR_PROCESSOR
SIO_UDP_CONNRESET
STR_SYSTEM
STRUCT_NTP_TIMEVAL_HAS_TV_NSEC
INTPTR_MAX # Unity
STRUCT_TIMEX_HAS_MODES
STRUCT_TIMEX_HAS_TIME_TICK
UNICODE
UNUSED$
WRAP_DBG_MALLOC
_CRTDBG_MAP_ALLOC
_CRT_SECURE_NO_WARNINGS
_DEBUG
_INTPTR_T_DEFINED
_IOCTL_H
_MSC_VER1800
_M_IA64
_M_IX86
_M_IX86_FP
_M_X64
_PTRDIFF_T_DEFINED
_UINTPTR_T_DEFINED
_WCTYPE_T_DEFINED
__RPCASYNC_H__
__STDC_CONSTANT_MACROS
__STDC_LIMIT_MACROS
__STDINT_INCLUDED
# Inaccessible port guards
SYS_CYGWIN32
# end
......@@ -18,7 +18,6 @@ include::includes/install.txt[]
* link:#waf[Autoconf has been replaced with waf]
* link:#build[Building and Installing the Distribution]
* link:#unix[Building and Installing for Unix]
* link:#win[Building and Installing for Windows]
* link:#conf[Configuration]
* link:#prob[If You Have Problems]
* link:#additional[Additional +waf+ Commands]
......@@ -69,14 +68,6 @@ configures the build process accordingly. Use the +./waf build+ command to
compile and link the distribution and the +./waf install+ command to install
the executables by default in +/usr/local/bin+.
[[win]]
== Building and Installing for Windows ==
Building for Windows is not presently supported. This may change in a
future release. If you have a requirement for this, you may be able
to accelerate the process by contributing either skilled technical
help or money so we can hire skilled technical help.
[[conf]]
== Configuration ==
......
......@@ -53,7 +53,7 @@ cease operation.
The next most common problem is incorrect DNS names. Check that each DNS
name used in the configuration file exists and that the address responds
to the Unix +ping+ command. The Unix +traceroute+ or Windows +tracert+
to the Unix +ping+ command. The Unix +traceroute+
utility can be used to verify a partial or complete path exists. Most
problems reported to the NTP newsgroup are not NTP problems, but
problems with the network or firewall configuration.
......
......@@ -337,10 +337,6 @@ typical symbolic link command is as follows;
ln -s /dev/ttyUSB0 /dev/jjy0
----------------------------------------------------------------
Windows NT does not support symbolic links to device files. COM__X__: is
the unit used by the driver, based on the refclock unit number, where
unit 1 corresponds to COM1: and unit 3 corresponds to COM3:
== Monitor Data ==
The driver writes sent and received data to/from the JJY receivers, GPS
......
......@@ -258,10 +258,6 @@ refclock nmea mode baud 19200 # All sentences from /dev/gps0 at 19200 baud
refclock nmea path /dev/ttyUSB0 # All sentences from /dev/ttyUSB0 at 9600 baud
------------------------------------------------------------------------------
== Additional Information ==
//+flag1+, +flag2+, and +flag3+ are ignored under Windows.
link:refclock.html[Reference Clock Drivers]
'''''
......
......@@ -104,14 +104,10 @@ synchronization without needing the Internet at all.
Not used by this driver.
+flag2 {0 | 1}+::
Specifies PPS capture on the rising (assert) pulse edge if 0 (default)
or falling (clear) pulse edge if 1. Not used under Windows - if the
special +serialpps.sys+ serial port driver is installed then the
leading edge will _always_ be used.
or falling (clear) pulse edge if 1.
+flag3 {0 | 1}+::
Controls the kernel PPS discipline: 0 for disable (default), 1 for
enable. Not used under Windows - if the special +serialpps.sys+
serial port driver is used then kernel PPS will be available and
used.
enable.
+flag4 {0 | 1}+::
Record a timestamp once for each second if 1. Useful for constructing
Allan deviation plots.
......
......@@ -200,23 +200,12 @@ refclock shm unit 1 prefer refid PPS
== Public vs. Private SHM segments ==
The driver attempts to create a shared memory segment with an identifier
depending on the unit number. This identifier (which can be a numeric
value or a string) clearly depends on the method used, which in turn
depends on the host operating system:
* Windows uses a file mapping to the page file with the name
\'\+Global\NTP+'u'' for public accessible mappings, where _u_ is the clock
unit. Private / non-public mappings are created as \'\+Local\NTP+'u''.
+
Public access assigns a NULL DACL to the memory mapping, while private
access just uses the default DACL of the process creating the mapping.
+
* Unix creates a shared memory segment with a key value of
\0x4E545030+_u_, where _u_ is again the clock unit. (This value could
be hex-decoded as \'NTP0', \'NTP1',..., with funny characters for units >
9.)
+
The driver attempts to create a shared memory segment with an
identifier depending on the unit number. Unix creates a shared memory
segment with a key value of \0x4E545030+_u_, where _u_ is again the
clock unit. (This value could be hex-decoded as \'NTP0', \'NTP1',...,
with funny characters for units > 9.)
Public access means a permission set of 0666, while private access
creates the mapping with a permission set of 0600.
......@@ -231,12 +220,6 @@ SHM segment owned by the runtime-user account. The internal structure of
this is the reason why a mode bit is used for the configuration of a
public segment.
When running under Windows, the chosen user account must be able to
create a SHM segment in the global object name space for SHM clocks with
public access. Otherwise the session isolation used by Windows kernels
after WinXP will get into the way if the client program does not run in
the same session.
== Additional Information ==
link:refclock.html[Reference Clock Drivers]
......
......@@ -45,7 +45,6 @@ hardware platforms:
|=============================================================================
| Platform | Operating System | NTP Sources | Accuracy
| i386 (PC) | Linux | NTP Distribution |10 us
| i386 (PC) | Windows NT | ftp://ftp.trimble.com/pub/ntp|1 ms
| SUN | Solaris 2.x | NTP Distribution |50 us
| Hewlett-Packard | HPUX 9, 10, 11 | http://us-support.external.hp.com|50 us
| Various | Free BSD | NTP Distribution |20 us
......@@ -114,10 +113,6 @@ port device. This is typically performed by a command such as:
ln -s /dev/ttyS0 /dev/trimble0
---------------------------------
Windows NT does not support symbolic links to device files. COM**x**: is
used by the driver, based on the refclock unit number, where unit 1
corresponds to COM**1**: and unit 3 corresponds to COM**3**:.
The Palisade ships 8N1 (no parity). The Thunderbolt ships 8O1 (odd
parity).
......
......@@ -58,13 +58,13 @@
the monitoring capability of {ntpdman}. Thus, monitoring is
always active as long as there is a restriction entry with
the limited flag.
// +mssntp+;;
// Enable Microsoft Windows MS-SNTP authentication using Active
// Directory services. *Note: Potential users should be aware that
// these services involve a TCP connection to another process that
// could potentially block, denying services to other users. Therefore,
// this flag should be used only for a dedicated server with no clients
// other than MS-SNTP.*
+mssntp+;;
Enable Microsoft Windows MS-SNTP authentication using Active
Directory services. *Note: Potential users should be aware that
these services involve a TCP connection to another process that
could potentially block, denying services to other users. Therefore,
this flag should be used only for a dedicated server with no clients
other than MS-SNTP.*
+nomodify+;;
Deny {ntpqman} queries which attempt
to modify the state of the server (i.e., run time reconfiguration).
......
......@@ -187,13 +187,6 @@ the configuration file +interface+ command, which is more versatile.
Registers as an NTP server with the local mDNS server which allows the
server to be discovered via mDNS client lookup.
+-M+, +--modifymmtimer+::
Modify Multimedia Timer (Windows only).
+
Set the Windows Multimedia Timer to highest resolution. This ensures
the resolution does not change while {ntpd} is running, avoiding
timekeeping glitches associated with changes.
+-n+, +--nofork+::
Do not fork. This option must not appear in combination with any of
the following options: wait-sync.
......@@ -299,21 +292,6 @@ discipline is disabled with this option.
make ARG an ntp variable (RW|DEF). This option may appear an unlimited
number of times.
//+--usepcc+::
// Use CPU cycle counter (Windows only).
//+
//Attempt to substitute the CPU counter for _QueryPerformanceCounter_.
//The CPU counter and _QueryPerformanceCounter_ are compared, and if
//they have the same frequency, the CPU counter (RDTSC on x86) is used
//directly, saving the overhead of a system call.
//+--pccfreq+=_string_::
// Force CPU cycle counter use (Windows only).
//+
//Force substitution the CPU counter for _QueryPerformanceCounter_. The
//CPU counter (RDTSC on x86) is used unconditionally with the given
//frequency (in Hz).
+-V, --version+::
Output version of program and exit. -VV gives more detailed version
information.
......
......@@ -224,6 +224,11 @@ Unix will also serve. The OS must have either a Linux-like
adjtimex(2) call or a BSD-like pair of ntp_gettime(2)/ntp_adjtime(2)
calls.
Legacy Windows support has been removed from the {project-shortname}
codebase. Future Windows support will be conditional on the quality
of POSIX/C99 emulation environments such as Cygwin and/or the support
for Linux binary execution in Windows 10 and later.
If you have a requirement for time service on an OS we don't support,
and its API is reasonably close to our POSIX/C99 conformance baseline,
we'll try to meet you halfway. We're open to development partnerships
......
......@@ -19,7 +19,7 @@ A leap second is inserted following second 59 of the last minute of the
day and becomes second 60 of that day. A leap second is deleted by
omitting second 59 of the last minute of the day, although this has
never happened and is highly unlikely to happen in future. So far as is
known, there are no provisions in the Unix or Windows libraries to
known, there are no provisions in the Unix libraries to
account for this occasion other than to affect the conversion of an NTP
datestamp or timestamp to conventional civil time.
......
......@@ -50,16 +50,6 @@ though this mechanism has been available for about 20 years' time, almost
nobody uses it.
== NTP Client for Windows Contains a Workaround ==
The Windows system time knows nothing about leap seconds, so for many years
the Windows port of ntpd provides a workaround where the system time is
slewed by the client to compensate the leap second.
Thus it is not required to use a smearing NTP server for Windows clients,
but of course the smearing server approach also works.
== The Leap Smear Approach ==
Due to the reasons mentioned above some support for leap smearing has
......
......@@ -112,7 +112,7 @@ initially within 68 years of the correct time. Further discussion on
this issue is in the white paper
{millshome}time.html[NTP Timestamp Calculations].
Ordinarily, these formats are not seen by application programs, which
convert these NTP formats to native Unix or Windows formats.
convert these NTP formats to native formats.
[[arch]]
== 3. Architecture and Algorithms ==
......
......@@ -18,13 +18,7 @@
* Configuration file name
*/
#ifndef CONFIG_FILE
# ifndef SYS_WINNT
# define CONFIG_FILE "/etc/ntp.conf"
# else /* SYS_WINNT */
# define CONFIG_FILE "%windir%\\system32\\drivers\\etc\\ntp.conf"
# define ALT_CONFIG_FILE "%windir%\\ntp.conf"
# define NTP_KEYSDIR "%windir%\\system32\\drivers\\etc"
# endif /* SYS_WINNT */
#endif /* not CONFIG_FILE */
/* Limits */
......
......@@ -380,36 +380,4 @@ extern bool adj_systime (double, int (*adjtime)(const struct timeval *, struct t
typedef void (*time_stepped_callback)(void);
extern time_stepped_callback step_callback;
/*
* Multi-thread locking for get_systime()
*
* On most systems, get_systime() is used solely by the main ntpd
* thread, but on Windows it's also used by the dedicated I/O thread.
* The [Bug 2037] changes to get_systime() have it keep state between
* calls to ensure time moves in only one direction, which means its
* use on Windows needs to be protected against simultaneous execution
* to avoid falsely detecting Lamport violations by ensuring only one
* thread at a time is in get_systime().
*/
#ifdef SYS_WINNT
extern CRITICAL_SECTION get_systime_cs;
# define INIT_GET_SYSTIME_CRITSEC() \
InitializeCriticalSection(&get_systime_cs)
# define ENTER_GET_SYSTIME_CRITSEC() \
EnterCriticalSection(&get_systime_cs)
# define LEAVE_GET_SYSTIME_CRITSEC() \
LeaveCriticalSection(&get_systime_cs)
# define INIT_WIN_PRECISE_TIME() \
init_win_precise_time()
#else /* !SYS_WINNT follows */
# define INIT_GET_SYSTIME_CRITSEC() \
do {} while (false)
# define ENTER_GET_SYSTIME_CRITSEC() \
do {} while (false)
# define LEAVE_GET_SYSTIME_CRITSEC() \
do {} while (false)
# define INIT_WIN_PRECISE_TIME() \
do {} while (false)
#endif
#endif /* GUARD_NTP_FP_H */
......@@ -13,11 +13,6 @@
#include <fcntl.h>
#include <netinet/in.h>
#ifdef SYS_WINNT
# include <io.h>
# include "win32_io.h"
#endif
#include <isc/netaddr.h>
#include "libntp.h" /* This needs Something above for GETDTABLESIZE */
......
......@@ -146,13 +146,8 @@ typedef union {
sizeof(pin6A)->s6_addr)
/* compare two in6_addr for equality only */
#if !defined(SYS_WINNT) || !defined(in_addr6)
#define ADDR6_EQ(pin6A, pin6B) \
(!ADDR6_CMP(pin6A, pin6B))
#else
#define ADDR6_EQ(pin6A, pin6B) \
IN6_ADDR_EQUAL(pin6A, pin6B)
#endif
/* compare a in6_addr with socket address */
#define S_ADDR6_EQ(psau, pin6) \
......
......@@ -157,10 +157,6 @@ struct addrinfo *copy_addrinfo_list_impl(const struct addrinfo *
#ifndef ISC_PLATFORM_HAVEIPV6
#ifdef SYS_WINNT
# define in6_addr in_addr6
#endif
struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
int ai_family; /* PF_xxx */
......