aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>2014-12-22 22:15:31 +0000
committerOllivier Robert <roberto@FreeBSD.org>2014-12-22 22:15:31 +0000
commitc59fb7145ed811db5b9a81ec48d2e993ec5a9644 (patch)
tree1b15d6018dc7c1ef7016cdcb0dac82cf520ca87e
parentbd4312b94e8e0cfcaa66b12456aecccafec37236 (diff)
downloadsrc-c59fb7145ed811db5b9a81ec48d2e993ec5a9644.tar.gz
src-c59fb7145ed811db5b9a81ec48d2e993ec5a9644.zip
Remove files that should not be merged into head when updating ntp.
Notes
Notes: svn path=/vendor/ntp/dist/; revision=276092
-rw-r--r--html/pic/9400n.jpgbin5736 -> 0 bytes
-rw-r--r--html/pic/alice11.gifbin18003 -> 0 bytes
-rw-r--r--html/pic/alice13.gifbin11516 -> 0 bytes
-rw-r--r--html/pic/alice15.gifbin26328 -> 0 bytes
-rw-r--r--html/pic/alice23.gifbin7753 -> 0 bytes
-rw-r--r--html/pic/alice31.gifbin13824 -> 0 bytes
-rw-r--r--html/pic/alice32.gifbin17168 -> 0 bytes
-rw-r--r--html/pic/alice35.gifbin8968 -> 0 bytes
-rw-r--r--html/pic/alice38.gifbin10296 -> 0 bytes
-rw-r--r--html/pic/alice44.gifbin19897 -> 0 bytes
-rw-r--r--html/pic/alice47.gifbin10771 -> 0 bytes
-rw-r--r--html/pic/alice51.gifbin12403 -> 0 bytes
-rw-r--r--html/pic/alice61.gifbin11269 -> 0 bytes
-rw-r--r--html/pic/barnstable.gifbin2946 -> 0 bytes
-rw-r--r--html/pic/beaver.gifbin2831 -> 0 bytes
-rw-r--r--html/pic/boom3.gifbin11042 -> 0 bytes
-rw-r--r--html/pic/boom3a.gifbin18300 -> 0 bytes
-rw-r--r--html/pic/boom4.gifbin16157 -> 0 bytes
-rw-r--r--html/pic/broad.gifbin5728 -> 0 bytes
-rw-r--r--html/pic/bustardfly.gifbin8476 -> 0 bytes
-rw-r--r--html/pic/c51.jpgbin16429 -> 0 bytes
-rw-r--r--html/pic/description.jpgbin34170 -> 0 bytes
-rw-r--r--html/pic/discipline.gifbin6836 -> 0 bytes
-rw-r--r--html/pic/dogsnake.gifbin5445 -> 0 bytes
-rw-r--r--html/pic/driver29.gifbin11723 -> 0 bytes
-rw-r--r--html/pic/driver43_1.gifbin38818 -> 0 bytes
-rw-r--r--html/pic/driver43_2.jpgbin6576 -> 0 bytes
-rw-r--r--html/pic/fg6021.gifbin21593 -> 0 bytes
-rw-r--r--html/pic/fg6039.jpgbin7383 -> 0 bytes
-rw-r--r--html/pic/fig_3_1.gifbin10428 -> 0 bytes
-rw-r--r--html/pic/flatheads.gifbin13085 -> 0 bytes
-rw-r--r--html/pic/flt1.gifbin9045 -> 0 bytes
-rw-r--r--html/pic/flt2.gifbin3148 -> 0 bytes
-rw-r--r--html/pic/flt3.gifbin1847 -> 0 bytes
-rw-r--r--html/pic/flt4.gifbin3876 -> 0 bytes
-rw-r--r--html/pic/flt5.gifbin10609 -> 0 bytes
-rw-r--r--html/pic/flt6.gifbin15563 -> 0 bytes
-rw-r--r--html/pic/flt7.gifbin7848 -> 0 bytes
-rw-r--r--html/pic/flt8.gifbin5969 -> 0 bytes
-rw-r--r--html/pic/flt9.gifbin8948 -> 0 bytes
-rw-r--r--html/pic/freq1211.gifbin11428 -> 0 bytes
-rw-r--r--html/pic/gadget.jpgbin26341 -> 0 bytes
-rw-r--r--html/pic/gps167.jpgbin15589 -> 0 bytes
-rw-r--r--html/pic/group.gifbin2756 -> 0 bytes
-rw-r--r--html/pic/hornraba.gifbin8790 -> 0 bytes
-rw-r--r--html/pic/igclock.gifbin8985 -> 0 bytes
-rwxr-xr-xhtml/pic/neoclock4x.gifbin14977 -> 0 bytes
-rw-r--r--html/pic/offset1211.gifbin25493 -> 0 bytes
-rw-r--r--html/pic/oncore_evalbig.gifbin7904 -> 0 bytes
-rw-r--r--html/pic/oncore_remoteant.jpgbin4828 -> 0 bytes
-rw-r--r--html/pic/oncore_utplusbig.gifbin10117 -> 0 bytes
-rw-r--r--html/pic/oz2.gifbin8225 -> 0 bytes
-rw-r--r--html/pic/panda.gifbin1660 -> 0 bytes
-rw-r--r--html/pic/pd_om006.gifbin16704 -> 0 bytes
-rw-r--r--html/pic/pd_om011.gifbin12848 -> 0 bytes
-rw-r--r--html/pic/peer.gifbin4936 -> 0 bytes
-rw-r--r--html/pic/pogo.gifbin1918 -> 0 bytes
-rw-r--r--html/pic/pogo1a.gifbin18769 -> 0 bytes
-rw-r--r--html/pic/pogo3a.gifbin3657 -> 0 bytes
-rw-r--r--html/pic/pogo4.gifbin3213 -> 0 bytes
-rw-r--r--html/pic/pogo5.gifbin5819 -> 0 bytes
-rw-r--r--html/pic/pogo6.gifbin5902 -> 0 bytes
-rw-r--r--html/pic/pogo7.gifbin13817 -> 0 bytes
-rw-r--r--html/pic/pogo8.gifbin7820 -> 0 bytes
-rw-r--r--html/pic/pzf509.jpgbin13011 -> 0 bytes
-rw-r--r--html/pic/pzf511.jpgbin20370 -> 0 bytes
-rw-r--r--html/pic/rabbit.gifbin3342 -> 0 bytes
-rw-r--r--html/pic/radio2.jpgbin17006 -> 0 bytes
-rw-r--r--html/pic/sheepb.jpgbin20295 -> 0 bytes
-rw-r--r--html/pic/stack1a.jpgbin29655 -> 0 bytes
-rw-r--r--html/pic/stats.gifbin12168 -> 0 bytes
-rw-r--r--html/pic/sx5.gifbin20470 -> 0 bytes
-rw-r--r--html/pic/thunderbolt.jpgbin38718 -> 0 bytes
-rw-r--r--html/pic/time1.gifbin4507 -> 0 bytes
-rw-r--r--html/pic/tonea.gifbin12002 -> 0 bytes
-rw-r--r--html/pic/tribeb.gifbin30287 -> 0 bytes
-rw-r--r--html/pic/wingdorothy.gifbin10849 -> 0 bytes
-rw-r--r--ports/winnt/include/arpa/inet.h4
-rw-r--r--ports/winnt/include/clockstuff.h44
-rw-r--r--ports/winnt/include/config.h554
-rw-r--r--ports/winnt/include/gaa_compat.h771
-rw-r--r--ports/winnt/include/hopf_PCI_io.h91
-rw-r--r--ports/winnt/include/netdb.h4
-rw-r--r--ports/winnt/include/ntp_iocompletionport.h27
-rw-r--r--ports/winnt/include/ntp_timer.h6
-rw-r--r--ports/winnt/include/ntservice.h31
-rw-r--r--ports/winnt/include/stdint.h244
-rw-r--r--ports/winnt/include/stdnoreturn.h61
-rw-r--r--ports/winnt/include/sys/ioctl.h11
-rw-r--r--ports/winnt/include/sys/param.h4
-rw-r--r--ports/winnt/include/sys/resource.h10
-rw-r--r--ports/winnt/include/sys/signal.h4
-rw-r--r--ports/winnt/include/sys/time.h25
-rw-r--r--ports/winnt/include/sys/wait.h4
-rw-r--r--ports/winnt/include/syslog.h82
-rw-r--r--ports/winnt/include/termios.h214
-rw-r--r--ports/winnt/include/timepps.h811
-rw-r--r--ports/winnt/include/unistd.h4
-rw-r--r--ports/winnt/include/win32_io.h7
-rw-r--r--ports/winnt/instsrv/instsrv.c461
-rw-r--r--ports/winnt/libntp/MSG00001.binbin104 -> 0 bytes
-rw-r--r--ports/winnt/libntp/SetSystemTime.c34
-rw-r--r--ports/winnt/libntp/getclock.c63
-rw-r--r--ports/winnt/libntp/messages.h199
-rw-r--r--ports/winnt/libntp/messages.mc161
-rw-r--r--ports/winnt/libntp/messages.rc2
-rw-r--r--ports/winnt/libntp/randfile.c109
-rw-r--r--ports/winnt/libntp/setpriority.c76
-rw-r--r--ports/winnt/libntp/syslog.c219
-rw-r--r--ports/winnt/libntp/termios.c789
-rw-r--r--ports/winnt/libntp/util_clockstuff.c26
-rw-r--r--ports/winnt/libntp/win32_io.c81
-rw-r--r--ports/winnt/ntpd/hopf_PCI_io.c335
-rw-r--r--ports/winnt/ntpd/nt_clockstuff.c1743
-rw-r--r--ports/winnt/ntpd/ntp_iocompletionport.c1639
-rw-r--r--ports/winnt/ntpd/ntservice.c321
-rw-r--r--ports/winnt/ntptrace/ntptrace.dsp153
-rw-r--r--ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h714
-rw-r--r--ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt52
-rw-r--r--ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c465
-rw-r--r--ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def9
-rw-r--r--ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h49
-rw-r--r--ports/winnt/ppsapi/loopback/src/sys/time.h18
-rw-r--r--ports/winnt/ppsapi/loopback/src/timepps.h805
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c382
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def9
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h22
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln19
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj227
-rw-r--r--ports/winnt/ppsapi/skelprov/sys/time.h18
-rwxr-xr-xports/winnt/scripts/mkver.bat439
-rw-r--r--ports/winnt/vs2005/Instsrv.vcproj244
-rw-r--r--ports/winnt/vs2005/libntp.vcproj864
-rw-r--r--ports/winnt/vs2005/ntp.sln70
-rw-r--r--ports/winnt/vs2005/ntpd.vcproj1893
-rw-r--r--ports/winnt/vs2005/ntpdate.vcproj294
-rw-r--r--ports/winnt/vs2005/ntpdc.vcproj338
-rw-r--r--ports/winnt/vs2005/ntpkeygen.vcproj378
-rw-r--r--ports/winnt/vs2005/ntpq.vcproj338
-rw-r--r--ports/winnt/vs2008/instsrv/instsrv.vcproj258
-rw-r--r--ports/winnt/vs2008/libntp/libntp.vcproj948
-rw-r--r--ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj256
-rw-r--r--ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj335
-rw-r--r--ports/winnt/vs2008/ntp.sln90
-rw-r--r--ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj273
-rw-r--r--ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat39
-rw-r--r--ports/winnt/vs2008/ntpd/ntpd.vcproj1126
-rw-r--r--ports/winnt/vs2008/ntpdate/ntpdate.vcproj362
-rw-r--r--ports/winnt/vs2008/ntpdc/ntpdc.vcproj367
-rw-r--r--ports/winnt/vs2008/ntpq/ntpq.vcproj357
-rw-r--r--ports/winnt/vs2013/instsrv/instsrv.vcproj258
-rw-r--r--ports/winnt/vs2013/instsrv/instsrv.vcxproj680
-rw-r--r--ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters22
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcproj936
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcxproj740
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcxproj.filters568
-rw-r--r--ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcproj256
-rw-r--r--ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj583
-rw-r--r--ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters36
-rw-r--r--ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcproj335
-rw-r--r--ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj752
-rw-r--r--ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters36
-rw-r--r--ports/winnt/vs2013/ntp.sln166
-rw-r--r--ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcproj273
-rw-r--r--ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj531
-rw-r--r--ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters69
-rw-r--r--ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat39
-rw-r--r--ports/winnt/vs2013/ntpd/ntpd.vcproj1126
-rw-r--r--ports/winnt/vs2013/ntpd/ntpd.vcxproj1036
-rw-r--r--ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters559
-rw-r--r--ports/winnt/vs2013/ntpdate/ntpdate.vcproj362
-rw-r--r--ports/winnt/vs2013/ntpdate/ntpdate.vcxproj750
-rw-r--r--ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters72
-rw-r--r--ports/winnt/vs2013/ntpdc/ntpdc.vcproj367
-rw-r--r--ports/winnt/vs2013/ntpdc/ntpdc.vcxproj768
-rw-r--r--ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters45
-rw-r--r--ports/winnt/vs2013/ntpq/ntpq.vcproj357
-rw-r--r--ports/winnt/vs2013/ntpq/ntpq.vcxproj740
-rw-r--r--ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters42
179 files changed, 0 insertions, 33986 deletions
diff --git a/html/pic/9400n.jpg b/html/pic/9400n.jpg
deleted file mode 100644
index 9209b90f3d0d..000000000000
--- a/html/pic/9400n.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice11.gif b/html/pic/alice11.gif
deleted file mode 100644
index 62d0c9ba0094..000000000000
--- a/html/pic/alice11.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice13.gif b/html/pic/alice13.gif
deleted file mode 100644
index c928ff75bb42..000000000000
--- a/html/pic/alice13.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice15.gif b/html/pic/alice15.gif
deleted file mode 100644
index e17b5fdf11e1..000000000000
--- a/html/pic/alice15.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice23.gif b/html/pic/alice23.gif
deleted file mode 100644
index bc258a0f7916..000000000000
--- a/html/pic/alice23.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice31.gif b/html/pic/alice31.gif
deleted file mode 100644
index ea3d20cd9c83..000000000000
--- a/html/pic/alice31.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice32.gif b/html/pic/alice32.gif
deleted file mode 100644
index db7cc40c655f..000000000000
--- a/html/pic/alice32.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice35.gif b/html/pic/alice35.gif
deleted file mode 100644
index aa0ca4335db9..000000000000
--- a/html/pic/alice35.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice38.gif b/html/pic/alice38.gif
deleted file mode 100644
index e40adba1b70c..000000000000
--- a/html/pic/alice38.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice44.gif b/html/pic/alice44.gif
deleted file mode 100644
index 953387edc444..000000000000
--- a/html/pic/alice44.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice47.gif b/html/pic/alice47.gif
deleted file mode 100644
index 6b27160454d0..000000000000
--- a/html/pic/alice47.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice51.gif b/html/pic/alice51.gif
deleted file mode 100644
index 1e9082a554b6..000000000000
--- a/html/pic/alice51.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/alice61.gif b/html/pic/alice61.gif
deleted file mode 100644
index 5687c38e8731..000000000000
--- a/html/pic/alice61.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/barnstable.gif b/html/pic/barnstable.gif
deleted file mode 100644
index 17d9cdd5de92..000000000000
--- a/html/pic/barnstable.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/beaver.gif b/html/pic/beaver.gif
deleted file mode 100644
index 3d0c8eb9b5c4..000000000000
--- a/html/pic/beaver.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/boom3.gif b/html/pic/boom3.gif
deleted file mode 100644
index 1a95d4088121..000000000000
--- a/html/pic/boom3.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/boom3a.gif b/html/pic/boom3a.gif
deleted file mode 100644
index 14bfe5bf8890..000000000000
--- a/html/pic/boom3a.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/boom4.gif b/html/pic/boom4.gif
deleted file mode 100644
index 0661ac41031f..000000000000
--- a/html/pic/boom4.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/broad.gif b/html/pic/broad.gif
deleted file mode 100644
index b372bb5c14dc..000000000000
--- a/html/pic/broad.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/bustardfly.gif b/html/pic/bustardfly.gif
deleted file mode 100644
index b5c6e91a75ad..000000000000
--- a/html/pic/bustardfly.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/c51.jpg b/html/pic/c51.jpg
deleted file mode 100644
index d90ad551d2c6..000000000000
--- a/html/pic/c51.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/description.jpg b/html/pic/description.jpg
deleted file mode 100644
index 2153180a899c..000000000000
--- a/html/pic/description.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/discipline.gif b/html/pic/discipline.gif
deleted file mode 100644
index 3280d1460e65..000000000000
--- a/html/pic/discipline.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/dogsnake.gif b/html/pic/dogsnake.gif
deleted file mode 100644
index 1f9755dcd976..000000000000
--- a/html/pic/dogsnake.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/driver29.gif b/html/pic/driver29.gif
deleted file mode 100644
index b0415ae41ed9..000000000000
--- a/html/pic/driver29.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/driver43_1.gif b/html/pic/driver43_1.gif
deleted file mode 100644
index f1ff7c79ee63..000000000000
--- a/html/pic/driver43_1.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/driver43_2.jpg b/html/pic/driver43_2.jpg
deleted file mode 100644
index c53639c5daaa..000000000000
--- a/html/pic/driver43_2.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/fg6021.gif b/html/pic/fg6021.gif
deleted file mode 100644
index e6e3071262da..000000000000
--- a/html/pic/fg6021.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/fg6039.jpg b/html/pic/fg6039.jpg
deleted file mode 100644
index 25fc7c421113..000000000000
--- a/html/pic/fg6039.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/fig_3_1.gif b/html/pic/fig_3_1.gif
deleted file mode 100644
index a280a89032e5..000000000000
--- a/html/pic/fig_3_1.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flatheads.gif b/html/pic/flatheads.gif
deleted file mode 100644
index 707cb8cc3d4b..000000000000
--- a/html/pic/flatheads.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt1.gif b/html/pic/flt1.gif
deleted file mode 100644
index d08c5ac74688..000000000000
--- a/html/pic/flt1.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt2.gif b/html/pic/flt2.gif
deleted file mode 100644
index d4909cb54cef..000000000000
--- a/html/pic/flt2.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt3.gif b/html/pic/flt3.gif
deleted file mode 100644
index 1eefbe13946a..000000000000
--- a/html/pic/flt3.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt4.gif b/html/pic/flt4.gif
deleted file mode 100644
index 3f8b67134748..000000000000
--- a/html/pic/flt4.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt5.gif b/html/pic/flt5.gif
deleted file mode 100644
index 52714ac0826e..000000000000
--- a/html/pic/flt5.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt6.gif b/html/pic/flt6.gif
deleted file mode 100644
index 0451e86f6641..000000000000
--- a/html/pic/flt6.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt7.gif b/html/pic/flt7.gif
deleted file mode 100644
index 55f07d83bb9f..000000000000
--- a/html/pic/flt7.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt8.gif b/html/pic/flt8.gif
deleted file mode 100644
index 04bd32b78c41..000000000000
--- a/html/pic/flt8.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/flt9.gif b/html/pic/flt9.gif
deleted file mode 100644
index e107c482a494..000000000000
--- a/html/pic/flt9.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/freq1211.gif b/html/pic/freq1211.gif
deleted file mode 100644
index 2a564168376d..000000000000
--- a/html/pic/freq1211.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/gadget.jpg b/html/pic/gadget.jpg
deleted file mode 100644
index 6289911e226f..000000000000
--- a/html/pic/gadget.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/gps167.jpg b/html/pic/gps167.jpg
deleted file mode 100644
index 8a87a75f996c..000000000000
--- a/html/pic/gps167.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/group.gif b/html/pic/group.gif
deleted file mode 100644
index 26aff0674136..000000000000
--- a/html/pic/group.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/hornraba.gif b/html/pic/hornraba.gif
deleted file mode 100644
index 3077d75ecc93..000000000000
--- a/html/pic/hornraba.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/igclock.gif b/html/pic/igclock.gif
deleted file mode 100644
index 940f330c7ebb..000000000000
--- a/html/pic/igclock.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/neoclock4x.gif b/html/pic/neoclock4x.gif
deleted file mode 100755
index 4df95af54ffe..000000000000
--- a/html/pic/neoclock4x.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/offset1211.gif b/html/pic/offset1211.gif
deleted file mode 100644
index 8a73287a9cb3..000000000000
--- a/html/pic/offset1211.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/oncore_evalbig.gif b/html/pic/oncore_evalbig.gif
deleted file mode 100644
index 931a7f14d52c..000000000000
--- a/html/pic/oncore_evalbig.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/oncore_remoteant.jpg b/html/pic/oncore_remoteant.jpg
deleted file mode 100644
index 0f1d04891c6f..000000000000
--- a/html/pic/oncore_remoteant.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/oncore_utplusbig.gif b/html/pic/oncore_utplusbig.gif
deleted file mode 100644
index dec7e71fd7be..000000000000
--- a/html/pic/oncore_utplusbig.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/oz2.gif b/html/pic/oz2.gif
deleted file mode 100644
index d4982f02b2a8..000000000000
--- a/html/pic/oz2.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/panda.gif b/html/pic/panda.gif
deleted file mode 100644
index 6feb74365ee4..000000000000
--- a/html/pic/panda.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pd_om006.gif b/html/pic/pd_om006.gif
deleted file mode 100644
index 3266285eac56..000000000000
--- a/html/pic/pd_om006.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pd_om011.gif b/html/pic/pd_om011.gif
deleted file mode 100644
index 06566b9525d2..000000000000
--- a/html/pic/pd_om011.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/peer.gif b/html/pic/peer.gif
deleted file mode 100644
index 35bd36f7fb98..000000000000
--- a/html/pic/peer.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pogo.gif b/html/pic/pogo.gif
deleted file mode 100644
index 68dacbe856dc..000000000000
--- a/html/pic/pogo.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pogo1a.gif b/html/pic/pogo1a.gif
deleted file mode 100644
index 433e467d9194..000000000000
--- a/html/pic/pogo1a.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pogo3a.gif b/html/pic/pogo3a.gif
deleted file mode 100644
index 49f1359fefaa..000000000000
--- a/html/pic/pogo3a.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pogo4.gif b/html/pic/pogo4.gif
deleted file mode 100644
index e0a3b178160b..000000000000
--- a/html/pic/pogo4.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pogo5.gif b/html/pic/pogo5.gif
deleted file mode 100644
index 87ad8e490d6b..000000000000
--- a/html/pic/pogo5.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pogo6.gif b/html/pic/pogo6.gif
deleted file mode 100644
index 3f98c52cdf63..000000000000
--- a/html/pic/pogo6.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pogo7.gif b/html/pic/pogo7.gif
deleted file mode 100644
index 36befe7a692c..000000000000
--- a/html/pic/pogo7.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pogo8.gif b/html/pic/pogo8.gif
deleted file mode 100644
index 6860efbba879..000000000000
--- a/html/pic/pogo8.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/pzf509.jpg b/html/pic/pzf509.jpg
deleted file mode 100644
index b51303bfe667..000000000000
--- a/html/pic/pzf509.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/pzf511.jpg b/html/pic/pzf511.jpg
deleted file mode 100644
index c470af2f6daa..000000000000
--- a/html/pic/pzf511.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/rabbit.gif b/html/pic/rabbit.gif
deleted file mode 100644
index ab6ec5ff56fa..000000000000
--- a/html/pic/rabbit.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/radio2.jpg b/html/pic/radio2.jpg
deleted file mode 100644
index ceb7c76e36fa..000000000000
--- a/html/pic/radio2.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/sheepb.jpg b/html/pic/sheepb.jpg
deleted file mode 100644
index 1b3323ee4c04..000000000000
--- a/html/pic/sheepb.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/stack1a.jpg b/html/pic/stack1a.jpg
deleted file mode 100644
index 1e023cb4af5c..000000000000
--- a/html/pic/stack1a.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/stats.gif b/html/pic/stats.gif
deleted file mode 100644
index b0d0aaa31e8d..000000000000
--- a/html/pic/stats.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/sx5.gif b/html/pic/sx5.gif
deleted file mode 100644
index 504e38b73287..000000000000
--- a/html/pic/sx5.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/thunderbolt.jpg b/html/pic/thunderbolt.jpg
deleted file mode 100644
index 49253ab543e8..000000000000
--- a/html/pic/thunderbolt.jpg
+++ /dev/null
Binary files differ
diff --git a/html/pic/time1.gif b/html/pic/time1.gif
deleted file mode 100644
index 88e70420f302..000000000000
--- a/html/pic/time1.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/tonea.gif b/html/pic/tonea.gif
deleted file mode 100644
index 195a3df6c4da..000000000000
--- a/html/pic/tonea.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/tribeb.gif b/html/pic/tribeb.gif
deleted file mode 100644
index 59e8a7c48706..000000000000
--- a/html/pic/tribeb.gif
+++ /dev/null
Binary files differ
diff --git a/html/pic/wingdorothy.gif b/html/pic/wingdorothy.gif
deleted file mode 100644
index 3f2e0be66330..000000000000
--- a/html/pic/wingdorothy.gif
+++ /dev/null
Binary files differ
diff --git a/ports/winnt/include/arpa/inet.h b/ports/winnt/include/arpa/inet.h
deleted file mode 100644
index 5e1599737300..000000000000
--- a/ports/winnt/include/arpa/inet.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
diff --git a/ports/winnt/include/clockstuff.h b/ports/winnt/include/clockstuff.h
deleted file mode 100644
index df8569935094..000000000000
--- a/ports/winnt/include/clockstuff.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _CLOCKSTUFF_H
-#define _CLOCKSTUFF_H
-
-#include <time.h>
-#include <sys\timeb.h>
-
-#include "ntp_fp.h"
-#include "ntp_syslog.h"
-
-
-void init_winnt_time(void);
-void reset_winnt_time(void);
-void lock_thread_to_processor(HANDLE);
-
-/* 100ns intervals between 1/1/1601 and 1/1/1970 as reported by
- * SystemTimeToFileTime()
- */
-
-#define FILETIME_1970 0x019db1ded53e8000
-#define HECTONANOSECONDS 10000000
-
-/*
- * Multimedia Timer
- */
-
-void set_mm_timer(int);
-
-enum {
- MM_TIMER_LORES,
- MM_TIMER_HIRES
-};
-
-/*
- * get_sys_time_as_filetime is a function pointer to
- * either GetSystemTimeAsFileTime provided by Windows
- * or ntpd's interpolating replacement.
- */
-typedef void (WINAPI *PGSTAFT)(LPFILETIME pftResult);
-extern PGSTAFT get_sys_time_as_filetime;
-extern PGSTAFT pGetSystemTimePreciseAsFileTime;
-
-void lock_thread_to_processor(HANDLE);
-
-#endif
diff --git a/ports/winnt/include/config.h b/ports/winnt/include/config.h
deleted file mode 100644
index b99aaa7ee27f..000000000000
--- a/ports/winnt/include/config.h
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * ports/winnt/include/config.h - static Windows config.h
- *
- * On most systems config.h is generated by the configure script.
- * For the Windows port, it's hand-maintained. Compilers earlier
- * than Visual C++ 2005 are no longer supported, enabling
- * portable use of "long long" and "%lld".
- */
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-/*
- * Known predifined MS compiler version codes:
- * 1800: MSVC++ 12.0 (Visual Studio 2013)
- * 1700: MSVC++ 11.0 (Visual Studio 2012)
- * 1600: MSVC++ 10.0 (Visual Studio 2010)
- * 1500: MSVC++ 9.0 (Visual Studio 2008)
- * 1400: MSVC++ 8.0 (Visual Studio 2005)
- * 1310: MSVC++ 7.1 (Visual Studio 2003)
- * 1300: MSVC++ 7.0
- * 1200: MSVC++ 6.0 (Visual C++ 6)
- * 1100: MSVC++ 5.0
- */
-
-#if defined(_MSC_VER) && _MSC_VER < 1400
-#error Minimum supported Microsoft compiler is Visual C++ 2005.
-#endif
-
-/*
- * We want structures and prototypes added after Windows NT 4.0 exposed
- * by Windows header files, so we define _WIN32_WINNT to target Windows
- * XP (version 5.1). By default, _WIN32_WINNT also controls the minimum
- * required Windows version to launch the .exe. As we want a single
- * binary to work on all supported Windows versions, we runtime link
- * newer functions, and use the linker /version:0x0400 option to
- * override the .EXE header minimum Windows version.
- *
- * When using the VC++ 2008 and later compilers, the resulting binaries
- * will not work on versions earlier than Windows XP, due to runtime
- * library dependencies. That is, Visual C++ 2005 is the last version
- * capable of producing binaries usable with Windows NT 4 and 2000.
- */
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif
-
-#define __attribute__(x) /* empty */
-#define _CRT_SECURE_NO_DEPRECATE 1
-
-/*
- * ANSI C compliance enabled
- */
-#define __STDC__ 1
-
-/*
- * Enable the debug build of MS C runtime to dump leaks
- * at exit time (currently only if run under a debugger).
- */
-#if defined(_MSC_VER) && defined(_DEBUG)
-# define _CRTDBG_MAP_ALLOC
-# include <stdlib.h>
-# include <malloc.h>
-# include <crtdbg.h>
-/* # define MALLOC_LINT */ /* defers free() */
-# define EREALLOC_IMPL(ptr, newsz, filenm, loc) \
- _realloc_dbg(ptr, newsz, _NORMAL_BLOCK, filenm, loc)
-#endif
-
-/*
- * We need to include stdio.h first before we #define snprintf
- * otherwise we can get errors during the build
- */
-#include <stdio.h>
-
-/* Prevent inclusion of winsock.h in windows.h */
-#ifndef _WINSOCKAPI_
-#define _WINSOCKAPI_
-#endif
-
-#ifndef __RPCASYNC_H__
-#define __RPCASYNC_H__
-#endif
-
-/*
- * On Unix struct sock_timeval is equivalent to struct timeval.
- * On Windows built with 64-bit time_t, sock_timeval.tv_sec is a long
- * as required by Windows' socket() interface timeout argument, while
- * timeval.tv_sec is time_t for the more common use as a UTC time
- * within NTP.
- *
- * winsock.h unconditionally defines struct timeval with long tv_sec
- * instead of time_t tv_sec. We redirect its declaration to struct
- * sock_timeval instead of struct timeval with a #define.
- */
-#define timeval sock_timeval
-
-/* Include Windows headers */
-#include <windows.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-#undef timeval /* see sock_timeval #define and comment above */
-
-/*
- * Some definitions we are using are missing in the headers
- * shipping with VC6. However, if the SDK is installed then the
- * SDK's headers may declare the missing types. This is at least
- * the case in the Oct 2001 SDK. That SDK and all subsequent
- * versions also define the symbol _W64, so we can use that one
- * to determine whether some types need to be defined, or not.
- */
-#ifdef _W64
-/* VC6 can include wspiapi.h only if the SDK is installed */
-#include <wspiapi.h>
-#endif
-
-#undef interface
-#include <process.h>
-#include <time.h> /* time_t for timeval decl */
-#include <io.h>
-#include <isc/strerror.h>
-
-/* ---------------------------------------------------------------------
- * Above this line are #include lines and the few #define lines
- * needed before including headers.
- */
-
-struct timeval {
- time_t tv_sec;
- long tv_usec;
-};
-
-/*
- * ntohl and friends are actual functions on Windows, use our own
- * macros instead to save the function call overhead. All releases
- * of Windows are little-endian.
- */
-#ifdef ntohl
-#error ntohl is already defined in ports/winnt/include/config.h
-#else
-#define ntohl(ul) (((u_long)(ul) & 0xff) << 24 | \
- ((u_long)(ul) & 0xff00) << 8 | \
- ((u_long)(ul) & 0xff0000) >> 8 | \
- ((u_long)(ul) & 0xff000000) >> 24)
-#define htonl(ul) ntohl(ul)
-#define ntohs(us) ((u_short) \
- (((u_short)(us) & 0xff) << 8 | \
- ((u_short)(us) & 0xff00) >> 8))
-#define htons(us) ntohs(us)
-#endif
-
-/*
- * On Unix open() works for tty (serial) devices just fine, while on
- * Windows refclock serial devices are opened using CreateFile, a lower
- * level than the CRT-provided descriptors, because the C runtime lacks
- * tty APIs. For refclocks which wish to use open() as well as or
- * instead of refclock_open(), tty_open() is equivalent to open() on
- * Unix and implemented in the Windows port similarly to
- * refclock_open().
- */
-extern int tty_open(char *, int, int);
-
-/*
- * disable use of __declspec(dllexport) by libisc routines
- */
-#define ISC_STATIC_WIN 1
-
-/*
- * ntp_rfc2553.h has cruft under #ifdef SYS_WINNT which is
- * appropriate for older Microsoft IPv6 definitions, such
- * as in_addr6 being the struct type. We can differentiate
- * the RFC2553-compliant newer headers because they have
- * #define in_addr6 in6_addr
- * for backward compatibility. With the newer headers,
- * we define ISC_PLATFORM_HAVEIPV6 and disable the cruft.
- */
-#ifdef in_addr6
-#define WANT_IPV6
-#define ISC_PLATFORM_HAVEIPV6
-#define ISC_PLATFORM_HAVESCOPEID
-#define HAVE_STRUCT_SOCKADDR_STORAGE
-#define ISC_PLATFORM_HAVEIN6PKTINFO
-#endif /* in_addr6 / RFC2553-compliant IPv6 headers */
-
-#define NO_OPTION_NAME_WARNINGS
-
-#if !defined( _W64 )
- /*
- * if ULONG_PTR needs to be defined then the build environment
- * is pure 32 bit Windows. Since ULONG_PTR and DWORD have
- * the same size in 32 bit Windows we can safely define
- * a replacement.
- */
-typedef DWORD ULONG_PTR;
-/* VC6 doesn't know about socklen_t, except if the SDK is installed */
-typedef int socklen_t;
-#endif /* _W64 */
-
-#define ISC_PLATFORM_NEEDIN6ADDRANY
-#define HAVE_SOCKADDR_IN6
-
-/*
- * The type of the socklen_t defined for getnameinfo() and getaddrinfo()
- * is int for VS compilers on Windows but the type is already declared
- */
-#define GETSOCKNAME_SOCKLEN_TYPE socklen_t
-
-/*
- * Older SDKs do not define SO_EXCLUSIVEADDRUSE in winsock2.h
- */
-#ifndef SO_EXCLUSIVEADDRUSE
-#define SO_EXCLUSIVEADDRUSE ((int)(~SO_REUSEADDR))
-#endif
-
-#if defined _MSC_VER && _MSC_VER < 1400
-/*
- * Use 32-bit time definitions for versions prior to VS 2005
- * VS 2005 defaults to 64-bit time
- */
-# define SIZEOF_TIME_T 4
-#else
-# define SIZEOF_TIME_T 8
-#endif
-
-
-/*
- * An attempt to cut down the number of warnings generated during compilation.
- * All of these should be benign to disable.
- */
-
-#pragma warning(disable: 4100) /* unreferenced formal parameter */
-#pragma warning(disable: 4127) /* conditional expression is constant */
-#pragma warning(disable: 4996) /* more secure replacement available */
-
-/*
- * Windows NT Configuration Values
- */
-#if defined _DEBUG /* Use VC standard macro definitions */
-# define DEBUG 1
-#endif
-
-#define __windows__ 1
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-#define OPEN_BCAST_SOCKET 1 /* for ntp_io.c */
-#define TYPEOF_IP_MULTICAST_LOOP BOOL
-#define SETSOCKOPT_ARG_CAST (const char *)
-#define HAVE_RANDOM
-#define AUTOKEY
-#define SAVECONFIG 1
-
-/*
- * Multimedia timer enable
- */
-#define USE_MM_TIMER
-
-/* Enable OpenSSL */
-#define OPENSSL 1
-
-/*
- * Keywords and functions that Microsoft maps
- * to other names
- */
-#define inline __inline
-#define stricmp _stricmp
-#define strcasecmp _stricmp
-#define isascii __isascii
-#define finite _finite
-#define random rand
-#define srandom srand
-#define fdopen _fdopen
-#define read _read
-#define open _open
-#ifndef close
-#define close _close
-#endif
-#define write _write
-#define strdup _strdup
-#define alloca _alloca
-#define stat _stat /*struct stat from <sys/stat.h> */
-#define fstat _fstat
-#define unlink _unlink
-/*
- * punt on fchmod on Windows
- */
-#define fchmod(x,y) {}
-#define lseek _lseek
-#define pipe _pipe
-#define dup2 _dup2
-/*
- * scale, unix sleep is seconds, Windows Sleep is msec
- */
-#define sleep(x) Sleep((unsigned)(x) * 1000)
-#define fileno _fileno
-#define isatty _isatty
-#define mktemp _mktemp
-#define getpid _getpid
-#define timegm _mkgmtime
-#define errno_to_str isc__strerror
-
-typedef int pid_t; /* PID is an int */
-typedef int ssize_t; /* ssize is an int */
-
-/*
- * Map the stream to the file number
- */
-#define STDOUT_FILENO _fileno(stdout)
-#define STDERR_FILENO _fileno(stderr)
-
-/*
- * To minimize Windows-specific changes to the rest of the NTP code,
- * particularly reference clocks, ntp_stdlib.h will
- *
- * #define strerror(e) ntp_strerror(e)
- *
- * to deal with our mixture of C runtime (open, write) and Windows
- * (sockets, serial ports) error codes. This is an ugly hack because
- * both use the lowest values differently, but particularly for ntpd,
- * it's not a problem.
- */
-#define NTP_REDEFINE_STRERROR
-
-#define MCAST /* Enable Multicast Support */
-#define MULTICAST_NONEWSOCKET /* Don't create a new socket for mcast address */
-
-# define REFCLOCK /* from ntpd.mak */
-
-/* #define CLOCK_PARSE */
-#define CLOCK_ACTS
-#define CLOCK_ARBITER
-#define CLOCK_ARCRON_MSF
-#define OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER /* timepps.h */
-#define HAVE_TIMEPPS_H
-#define HAVE_PPSAPI
-#define CLOCK_ATOM
-#define CLOCK_CHU
-#define CLOCK_CHRONOLOG
-#define CLOCK_DUMBCLOCK
-#define CLOCK_HOPF_SERIAL /* device 38, hopf DCF77/GPS serial line receiver */
-#define CLOCK_HOPF_PCI /* device 39, hopf DCF77/GPS PCI-Bus receiver */
-#define CLOCK_JUPITER
-#define CLOCK_LOCAL
-#define CLOCK_NMEA
-#define CLOCK_ONCORE
-#define CLOCK_PALISADE /* from ntpd.mak */
-#define CLOCK_PARSE
-/* parse component drivers */
-#define CLOCK_COMPUTIME
-#define CLOCK_DCF7000
-#define CLOCK_HOPF6021
-#define CLOCK_MEINBERG
-#define CLOCK_RAWDCF
-#define CLOCK_RCC8000
-#define CLOCK_SCHMID
-#define CLOCK_TRIMTAIP
-#define CLOCK_TRIMTSIP
-#define CLOCK_VARITEXT
-#define CLOCK_WHARTON_400A
-/* end parse component drivers */
-/* # define CLOCK_SHM */
-#define CLOCK_SPECTRACOM /* refclock_wwvb.c */
-#define CLOCK_TRIMBLEDC
-#define CLOCK_TRUETIME
-
-#define NTP_LITTLE_ENDIAN /* from libntp.mak */
-#define NTP_POSIX_SOURCE
-
-#define SYSLOG_FILE /* from libntp.mak */
-
-#define HAVE_LONG_LONG_INT 1
-#define HAVE_UNSIGNED_LONG_LONG_INT 1
-#define HAVE_SIZE_T 1
-#define HAVE_PTRDIFF_T 1
-
-# define SIZEOF_SIGNED_CHAR 1
-# define SIZEOF_SHORT 2
-# define SIZEOF_INT 4
-# define SIZEOF_LONG 4
-# define SIZEOF_LONG_LONG 8
-
-/* libntp/snprintf.c doesn't know %I64d */
-#define ISC_PLATFORM_QUADFORMAT "ll"
-
-# define HAVE_ERRNO_H 1
-# define HAVE_FCNTL_H 1
-# define HAVE_LIMITS_H 1
-# define HAVE_STDARG_H 1
-# define HAVE_SYS_RESOURCE_H 1
-# define HAVE_SYS_TIME_H 1
-# define HAVE_TERMIOS_H 1
-
-# define HAVE_ALLOCA 1
-# define HAVE_GETCLOCK 1
-# define HAVE_MEMMOVE 1
-# define HAVE_MKTIME 1
-# define HAVE_SETVBUF 1
-# define HAVE_STRCHR 1 /* for libopts */
-# define HAVE_STRDUP 1
-# define HAVE_TIMEGM 1 /* actually _mkgmtime */
-
-# define HAVE_STRUCT_TIMESPEC
-# define HAVE_IO_COMPLETION_PORT
-# define ISC_PLATFORM_NEEDNTOP
-# define ISC_PLATFORM_NEEDPTON
-
-#define HAVE_BSD_NICE /* emulate BSD setpriority() */
-
-#define HW_WANT_RPL_VSNPRINTF 1
-#define vsnprintf rpl_vsnprintf
-#include <stdarg.h>
-int rpl_vsnprintf(char *, size_t, const char *, va_list);
-#define HW_WANT_RPL_SNPRINTF 1
-#define snprintf rpl_snprintf
-int rpl_snprintf(char *, size_t, const char *, ...);
-#define HAVE_VSNPRINTF 1
-#define HAVE_SNPRINTF 1
-
-typedef char *caddr_t;
-
-#ifdef _WCTYPE_T_DEFINED /* see vc/include/crtdefs.h */
-#define HAVE_WINT_T 1
-#endif
-
-#ifndef _INTPTR_T_DEFINED
-typedef long intptr_t;
-#define _INTPTR_T_DEFINED
-#endif
-#define HAVE_INTPTR_T 1
-
-#ifndef _UINTPTR_T_DEFINED
-typedef unsigned long uintptr_t;
-#define _UINTPTR_T_DEFINED
-#endif
-#define HAVE_UINTPTR_T 1
-
-#if !defined( _W64 )
- /*
- * if DWORD_PTR needs to be defined then the build environment
- * is pure 32 bit Windows. Since DWORD_PTR and DWORD have
- * the same size in 32 bit Windows we can safely define
- * a replacement.
- */
- typedef DWORD DWORD_PTR;
-#endif
-
-#define NEED_S_CHAR_TYPEDEF
-
-
-/* C99 exact size integer support. */
-#if defined(_MSC_VER) && _MSC_VER<1800
-# define MISSING_INTTYPES_H 1 /* not provided by VS2012 and earlier */
-# define MISSING_STDBOOL_H 1 /* not provided by VS2012 and earlier */
-#else
-#if defined(_MSC_VER) && _MSC_VER>=1800
-/* VS2013 and above support C99 types */
-# define HAVE_INT8_T 1
-# define HAVE_UINT8_T 1
-# define HAVE_INT16_T 1
-# define HAVE_UINT16_T 1
-# define HAVE_INT32_T 1
-# define HAVE_UINT32_T 1
-#endif
-#endif
-
-#if !defined (MISSING_STDBOOL_H)
-# define HAVE_STDBOOL_H
-#endif
-#if !defined(MISSING_INTTYPES_H)
-# define HAVE_INTTYPES_H 1
-#elif !defined(MISSING_STDINT_H)
-# define HAVE_STDINT_H 1
-#elif !defined(ADDED_EXACT_SIZE_INTEGERS)
-# define ADDED_EXACT_SIZE_INTEGERS 1
- typedef __int8 int8_t;
- typedef unsigned __int8 uint8_t;
-
- typedef __int16 int16_t;
- typedef unsigned __int16 uint16_t;
-
- typedef __int32 int32_t;
- typedef unsigned __int32 uint32_t;
-
- typedef __int64 int64_t;
- typedef unsigned __int64 uint64_t;
-#endif
-
-
-/* Directory separator, usually / or \ */
-#define DIR_SEP '\\'
-
-#define POSIX_SHELL "/bin/sh" /* libopts/makeshell.c */
-
-#define ULONG_CONST(a) a ## UL
-
-#define NOKMEM
-#define RETSIGTYPE void
-
-#ifndef STR_SYSTEM
-#define STR_SYSTEM "Windows"
-#endif
-
-#ifndef STR_PROCESSOR
-
-#define STRINGIZE(arg) #arg
-
-#ifdef _M_IX86
-#ifndef _M_IX86_FP
-#define STR_PROCESSOR "x86"
-#else
-#if !_M_IX86_FP
-#define STR_PROCESSOR "x86"
-#else
-#if _M_IX86_FP > 2
-#define STR_PROCESSOR "x86-FP-" STRINGIZE(_M_IX86_FP)
-#else
-#if _M_IX86_FP == 2
-#define STR_PROCESSOR "x86-SSE2"
-#else
-#define STR_PROCESSOR "x86-SSE"
-#endif /* _M_IX86 == 2 */
-#endif /* _M_IX86_FP > 2 */
-#endif /* !_M_IX86_FP */
-#endif /* !defined(_M_IX86_FP) */
-#endif /* !defined(_M_IX86) */
-
-#ifdef _M_IA64
-#define STR_PROCESSOR "Itanium"
-#endif
-
-#ifdef _M_X64
-#define STR_PROCESSOR "x64"
-#endif
-
-#endif /* !defined(STR_PROCESSOR) */
-
-#undef STRINGIZE
-
-#define SIOCGIFFLAGS SIO_GET_INTERFACE_LIST /* used in ntp_io.c */
-/*
- * Below this line are includes which must happen after the bulk of
- * config.h is processed. If you need to add another #include to this
- * file the preferred location is near the top, above the similar
- * line of hyphens.
- * ---------------------------------------------------------------------
- */
-
-/*
- * Include standard stat information
- */
-#include <isc/stat.h>
-
-#endif /* CONFIG_H */
diff --git a/ports/winnt/include/gaa_compat.h b/ports/winnt/include/gaa_compat.h
deleted file mode 100644
index fdacaf0e84a5..000000000000
--- a/ports/winnt/include/gaa_compat.h
+++ /dev/null
@@ -1,771 +0,0 @@
-/*
- * ports/winnt/include/gaa_compat.h
- *
- * This header allows systems without a recent-enough SDK to build NTP
- * which can use GetAdaptersAddresses(), related functions and macros.
- */
-#ifndef GAA_COMPAT_H
-#define GAA_COMPAT_H
-
-#ifdef _W64
-# include <iphlpapi.h>
-#else /* !_W64 follows */
-
-#pragma warning(push)
-/* warning C4201: nonstandard extension used : nameless struct/union */
-#pragma warning(disable:4201)
-/* warning C4214: nonstandard extension used : bit field types other than int */
-#pragma warning(disable:4214)
-
-/* +++++++++++++++++++++++ from nldef.h */
-typedef enum {
- //
- // These values are from iptypes.h.
- // They need to fit in a 4 bit field.
- //
- IpPrefixOriginOther = 0,
- IpPrefixOriginManual,
- IpPrefixOriginWellKnown,
- IpPrefixOriginDhcp,
- IpPrefixOriginRouterAdvertisement,
- IpPrefixOriginUnchanged = 1 << 4
-} NL_PREFIX_ORIGIN;
-
-typedef enum {
- //
- // These values are from in iptypes.h.
- // They need to fit in a 4 bit field.
- //
- IpSuffixOriginOther = 0,
- IpSuffixOriginManual,
- IpSuffixOriginWellKnown,
- IpSuffixOriginDhcp,
- IpSuffixOriginLinkLayerAddress,
- IpSuffixOriginRandom,
- IpSuffixOriginUnchanged = 1 << 4
-} NL_SUFFIX_ORIGIN;
-
-typedef enum {
- //
- // These values are from in iptypes.h.
- //
- IpDadStateInvalid = 0,
- IpDadStateTentative,
- IpDadStateDuplicate,
- IpDadStateDeprecated,
- IpDadStatePreferred,
-} NL_DAD_STATE;
-/* +++++++++++++++++++++++ from nldef.h */
-
-
-/* +++++++++++++++++++++++ from ifdef.h */
-typedef ULONG32 NET_IF_OBJECT_ID, *PNET_IF_OBJECT_ID;
-
-
-typedef enum _NET_IF_ADMIN_STATUS // ifAdminStatus
-{
- NET_IF_ADMIN_STATUS_UP = 1,
- NET_IF_ADMIN_STATUS_DOWN = 2,
- NET_IF_ADMIN_STATUS_TESTING = 3
-} NET_IF_ADMIN_STATUS, *PNET_IF_ADMIN_STATUS;
-
-typedef enum _NET_IF_OPER_STATUS // ifOperStatus
-{
- NET_IF_OPER_STATUS_UP = 1,
- NET_IF_OPER_STATUS_DOWN = 2,
- NET_IF_OPER_STATUS_TESTING = 3,
- NET_IF_OPER_STATUS_UNKNOWN = 4,
- NET_IF_OPER_STATUS_DORMANT = 5,
- NET_IF_OPER_STATUS_NOT_PRESENT = 6,
- NET_IF_OPER_STATUS_LOWER_LAYER_DOWN = 7
-} NET_IF_OPER_STATUS, *PNET_IF_OPER_STATUS;
-
-//
-// Flags to extend operational status
-//
-#define NET_IF_OPER_STATUS_DOWN_NOT_AUTHENTICATED 0x00000001
-#define NET_IF_OPER_STATUS_DOWN_NOT_MEDIA_CONNECTED 0x00000002
-#define NET_IF_OPER_STATUS_DORMANT_PAUSED 0x00000004
-#define NET_IF_OPER_STATUS_DORMANT_LOW_POWER 0x00000008
-
-typedef UINT32 NET_IF_COMPARTMENT_ID, *PNET_IF_COMPARTMENT_ID;
-
-//
-// Define compartment ID type:
-//
-#define NET_IF_COMPARTMENT_ID_UNSPECIFIED (NET_IF_COMPARTMENT_ID)0
-#define NET_IF_COMPARTMENT_ID_PRIMARY (NET_IF_COMPARTMENT_ID)1
-
-#define NET_IF_OID_IF_ALIAS 0x00000001 // identifies the ifAlias string for an interface
-#define NET_IF_OID_COMPARTMENT_ID 0x00000002 // identifies the compartment ID for an interface.
-#define NET_IF_OID_NETWORK_GUID 0x00000003 // identifies the NetworkGuid for an interface.
-#define NET_IF_OID_IF_ENTRY 0x00000004 // identifies statistics for an interface.
-
-//
-// Define NetworkGUID type:
-//
-typedef GUID NET_IF_NETWORK_GUID, *PNET_IF_NETWORK_GUID;
-
-//
-// Define macros for an "unspecified" NetworkGUID value to be used in structures
-// that haven't had the NET_LUID field filled in yet.
-//
-#define NET_SET_UNSPECIFIED_NETWORK_GUID(_pNetworkGuid)
-#define NET_IS_UNSPECIFIED_NETWORK_GUID(_NetworkGuidValue)
-
-//
-// To prevent collisions between user-assigned and system-assigend site-ids,
-// we partition the site-id space into two:
-// 1. User-Assigned: NET_SITEID_UNSPECIFIED < SiteId < NET_SITEID_MAXUSER
-// 2. System-Assigned: NET_SITEID_MAXUSER < SiteId < NET_SITEID_MAXSYSTEM
-//
-// Note: A network's SiteId doesn't really need to be settable.
-// 1. The network profile manager creates a network per network profile.
-// 2. NDIS/IF assigns a unique SiteId to each network.
-//
-#define NET_SITEID_UNSPECIFIED (0)
-#define NET_SITEID_MAXUSER (0x07ffffff)
-#define NET_SITEID_MAXSYSTEM (0x0fffffff)
-C_ASSERT(NET_SITEID_MAXUSER < NET_SITEID_MAXSYSTEM);
-
-typedef enum _NET_IF_RCV_ADDRESS_TYPE // ifRcvAddressType
-{
- NET_IF_RCV_ADDRESS_TYPE_OTHER = 1,
- NET_IF_RCV_ADDRESS_TYPE_VOLATILE = 2,
- NET_IF_RCV_ADDRESS_TYPE_NON_VOLATILE = 3
-} NET_IF_RCV_ADDRESS_TYPE, *PNET_IF_RCV_ADDRESS_TYPE;
-
-typedef struct _NET_IF_RCV_ADDRESS_LH
-{
- NET_IF_RCV_ADDRESS_TYPE ifRcvAddressType;
- USHORT ifRcvAddressLength;
- USHORT ifRcvAddressOffset; // from beginning of this struct
-} NET_IF_RCV_ADDRESS_LH, *PNET_IF_RCV_ADDRESS_LH;
-
-typedef struct _NET_IF_ALIAS_LH
-{
- USHORT ifAliasLength; // in bytes, of ifAlias string
- USHORT ifAliasOffset; // in bytes, from beginning of this struct
-} NET_IF_ALIAS_LH, *PNET_IF_ALIAS_LH;
-
-#pragma warning(push)
-#pragma warning(disable:4214) // bit field types other than int
-typedef union _NET_LUID_LH
-{
- ULONG64 Value;
- struct
- {
- ULONG64 Reserved:24;
- ULONG64 NetLuidIndex:24;
- ULONG64 IfType:16; // equal to IANA IF type
- }Info;
-} NET_LUID_LH, *PNET_LUID_LH;
-#pragma warning(pop)
-
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-typedef NET_IF_RCV_ADDRESS_LH NET_IF_RCV_ADDRESS;
-typedef NET_IF_RCV_ADDRESS* PNET_IF_RCV_ADDRESS;
-
-typedef NET_IF_ALIAS_LH NET_IF_ALIAS;
-typedef NET_IF_ALIAS* PNET_IF_ALIAS;
-#endif //NTDDI_LONGHORN
-
-//
-// Need to make this visible on all platforms (for the purpose of IF_LUID).
-//
-typedef NET_LUID_LH NET_LUID;
-typedef NET_LUID* PNET_LUID;
-
-//
-// IF_LUID
-//
-// Define the locally unique datalink interface identifier type.
-// This type is persistable.
-//
-typedef NET_LUID IF_LUID, *PIF_LUID;
-
-typedef ULONG NET_IFINDEX, *PNET_IFINDEX; // Interface Index (ifIndex)
-typedef UINT16 NET_IFTYPE, *PNET_IFTYPE; // Interface Type (IANA ifType)
-
-#define NET_IFINDEX_UNSPECIFIED (NET_IFINDEX)(0) // Not a valid ifIndex
-#define NET_IFLUID_UNSPECIFIED (0) // Not a valid if Luid
-
-//
-// Definitions for NET_IF_INFORMATION.Flags
-//
-#define NIIF_HARDWARE_INTERFACE 0x00000001 // Set iff hardware
-#define NIIF_FILTER_INTERFACE 0x00000002
-#define NIIF_NDIS_RESERVED1 0x00000004
-#define NIIF_NDIS_RESERVED2 0x00000008
-#define NIIF_NDIS_RESERVED3 0x00000010
-#define NIIF_NDIS_WDM_INTERFACE 0x00000020
-#define NIIF_NDIS_ENDPOINT_INTERFACE 0x00000040
-
-#define NIIF_WAN_TUNNEL_TYPE_UNKNOWN ((ULONG)(-1))
-
-//
-// Define datalink interface access types.
-//
-typedef enum _NET_IF_ACCESS_TYPE
-{
- NET_IF_ACCESS_LOOPBACK = 1,
- NET_IF_ACCESS_BROADCAST = 2,
- NET_IF_ACCESS_POINT_TO_POINT = 3,
- NET_IF_ACCESS_POINT_TO_MULTI_POINT = 4,
- NET_IF_ACCESS_MAXIMUM = 5
-} NET_IF_ACCESS_TYPE, *PNET_IF_ACCESS_TYPE;
-
-
-//
-// Define datalink interface direction types.
-//
-typedef enum _NET_IF_DIRECTION_TYPE
-{
- NET_IF_DIRECTION_SENDRECEIVE,
- NET_IF_DIRECTION_SENDONLY,
- NET_IF_DIRECTION_RECEIVEONLY,
- NET_IF_DIRECTION_MAXIMUM
-} NET_IF_DIRECTION_TYPE, *PNET_IF_DIRECTION_TYPE;
-
-
-typedef enum _NET_IF_CONNECTION_TYPE
-{
- NET_IF_CONNECTION_DEDICATED = 1,
- NET_IF_CONNECTION_PASSIVE = 2,
- NET_IF_CONNECTION_DEMAND = 3,
- NET_IF_CONNECTION_MAXIMUM = 4
-} NET_IF_CONNECTION_TYPE, *PNET_IF_CONNECTION_TYPE;
-
-
-typedef enum _NET_IF_MEDIA_CONNECT_STATE
-{
- MediaConnectStateUnknown,
- MediaConnectStateConnected,
- MediaConnectStateDisconnected
-} NET_IF_MEDIA_CONNECT_STATE, *PNET_IF_MEDIA_CONNECT_STATE;
-
-#define NET_IF_LINK_SPEED_UNKNOWN ((ULONG64)(-1))
-
-//
-// Defines the duplex state of media
-//
-typedef enum _NET_IF_MEDIA_DUPLEX_STATE
-{
- MediaDuplexStateUnknown,
- MediaDuplexStateHalf,
- MediaDuplexStateFull
-} NET_IF_MEDIA_DUPLEX_STATE, *PNET_IF_MEDIA_DUPLEX_STATE;
-
-
-// Special values for fields in NET_PHYSICAL_LOCATION
-#define NIIF_BUS_NUMBER_UNKNOWN ((ULONG)(-1))
-#define NIIF_SLOT_NUMBER_UNKNOWN ((ULONG)(-1))
-#define NIIF_FUNCTION_NUMBER_UNKNOWN ((ULONG)(-1))
-
-typedef struct _NET_PHYSICAL_LOCATION_LH
-{
- ULONG BusNumber; // Physical location
- ULONG SlotNumber; // ... for hardware
- ULONG FunctionNumber; // ... devices.
-} NET_PHYSICAL_LOCATION_LH, *PNET_PHYSICAL_LOCATION_LH;
-
-//
-// maximum string size in -wchar- units
-//
-#define IF_MAX_STRING_SIZE 256
-
-typedef struct _IF_COUNTED_STRING_LH
-{
- USHORT Length; // in -Bytes-
- WCHAR String[IF_MAX_STRING_SIZE + 1];
-} IF_COUNTED_STRING_LH, *PIF_COUNTED_STRING_LH;
-
-#define IF_MAX_PHYS_ADDRESS_LENGTH 32
-
-typedef struct _IF_PHYSICAL_ADDRESS_LH
-{
- USHORT Length;
- UCHAR Address[IF_MAX_PHYS_ADDRESS_LENGTH];
-} IF_PHYSICAL_ADDRESS_LH, *PIF_PHYSICAL_ADDRESS_LH;
-
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-typedef NET_PHYSICAL_LOCATION_LH NET_PHYSICAL_LOCATION;
-typedef NET_PHYSICAL_LOCATION* PNET_PHYSICAL_LOCATION;
-
-typedef IF_COUNTED_STRING_LH IF_COUNTED_STRING;
-typedef IF_COUNTED_STRING* PIF_COUNTED_STRING;
-
-typedef IF_PHYSICAL_ADDRESS_LH IF_PHYSICAL_ADDRESS;
-typedef IF_PHYSICAL_ADDRESS* PIF_PHYSICAL_ADDRESS;
-#endif
-
-
-//
-// IF_INDEX
-//
-// Define the interface index type.
-// This type is not persistable.
-// This must be unsigned (not an enum) to replace previous uses of
-// an index that used a DWORD type.
-//
-
-typedef NET_IFINDEX IF_INDEX, *PIF_INDEX;
-#define IFI_UNSPECIFIED NET_IFINDEX_UNSPECIFIED
-
-
-//
-// Get definitions for IFTYPE and IF_ACCESS_TYPE.
-//
-#include <ipifcons.h>
-
-
-//
-// Types of tunnels (sub-type of IF_TYPE when IF_TYPE is IF_TYPE_TUNNEL).
-// See http://www.iana.org/assignments/ianaiftype-mib.
-//
-typedef enum {
- TUNNEL_TYPE_NONE = 0,
- TUNNEL_TYPE_OTHER = 1,
- TUNNEL_TYPE_DIRECT = 2,
- TUNNEL_TYPE_6TO4 = 11,
- TUNNEL_TYPE_ISATAP = 13,
- TUNNEL_TYPE_TEREDO = 14,
-} TUNNEL_TYPE, *PTUNNEL_TYPE;
-
-//
-// IF_ADMINISTRATIVE_STATE
-//
-// Datalink Interface Administrative State.
-// Indicates whether the interface has been administratively enabled.
-//
-
-typedef enum _IF_ADMINISTRATIVE_STATE {
- IF_ADMINISTRATIVE_DISABLED,
- IF_ADMINISTRATIVE_ENABLED,
- IF_ADMINISTRATIVE_DEMANDDIAL,
-} IF_ADMINISTRATIVE_STATE, *PIF_ADMINISTRATIVE_STATE;
-
-
-//
-// Note: Interface is Operational iff
-// ((MediaSense is Connected) and (AdministrativeState is Enabled))
-// or
-// ((MediaSense is Connected) and (AdministrativeState is OnDemand))
-//
-// !Operational iff
-// ((MediaSense != Connected) or (AdministrativeState is Disabled))
-//
-
-//
-// OperStatus values from RFC 2863
-//
-typedef enum {
- IfOperStatusUp = 1,
- IfOperStatusDown,
- IfOperStatusTesting,
- IfOperStatusUnknown,
- IfOperStatusDormant,
- IfOperStatusNotPresent,
- IfOperStatusLowerLayerDown
-} IF_OPER_STATUS;
-/* +++++++++++++++++++++++ from ifdef.h */
-
-
-/* +++++++++++++++++++++++ from iptypes.h */
-// Definitions and structures used by getnetworkparams and getadaptersinfo apis
-
-#define MAX_ADAPTER_DESCRIPTION_LENGTH 128 // arb.
-#define MAX_ADAPTER_NAME_LENGTH 256 // arb.
-#define MAX_ADAPTER_ADDRESS_LENGTH 8 // arb.
-#define DEFAULT_MINIMUM_ENTITIES 32 // arb.
-#define MAX_HOSTNAME_LEN 128 // arb.
-#define MAX_DOMAIN_NAME_LEN 128 // arb.
-#define MAX_SCOPE_ID_LEN 256 // arb.
-#define MAX_DHCPV6_DUID_LENGTH 130 // RFC 3315.
-
-//
-// types
-//
-
-// Node Type
-
-#define BROADCAST_NODETYPE 1
-#define PEER_TO_PEER_NODETYPE 2
-#define MIXED_NODETYPE 4
-#define HYBRID_NODETYPE 8
-
-//
-// IP_ADDRESS_STRING - store an IP address as a dotted decimal string
-//
-
-typedef struct {
- char String[4 * 4];
-} IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING;
-
-//
-// IP_ADDR_STRING - store an IP address with its corresponding subnet mask,
-// both as dotted decimal strings
-//
-
-typedef struct _IP_ADDR_STRING {
- struct _IP_ADDR_STRING* Next;
- IP_ADDRESS_STRING IpAddress;
- IP_MASK_STRING IpMask;
- DWORD Context;
-} IP_ADDR_STRING, *PIP_ADDR_STRING;
-
-//
-// ADAPTER_INFO - per-adapter information. All IP addresses are stored as
-// strings
-//
-
-typedef struct _IP_ADAPTER_INFO {
- struct _IP_ADAPTER_INFO* Next;
- DWORD ComboIndex;
- char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4];
- char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4];
- UINT AddressLength;
- BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH];
- DWORD Index;
- UINT Type;
- UINT DhcpEnabled;
- PIP_ADDR_STRING CurrentIpAddress;
- IP_ADDR_STRING IpAddressList;
- IP_ADDR_STRING GatewayList;
- IP_ADDR_STRING DhcpServer;
- BOOL HaveWins;
- IP_ADDR_STRING PrimaryWinsServer;
- IP_ADDR_STRING SecondaryWinsServer;
- time_t LeaseObtained;
- time_t LeaseExpires;
-} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;
-
-#ifdef _WINSOCK2API_
-
-//
-// The following types require Winsock2.
-//
-
-typedef NL_PREFIX_ORIGIN IP_PREFIX_ORIGIN;
-typedef NL_SUFFIX_ORIGIN IP_SUFFIX_ORIGIN;
-typedef NL_DAD_STATE IP_DAD_STATE;
-
-typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Flags;
- };
- };
- struct _IP_ADAPTER_UNICAST_ADDRESS_LH *Next;
- SOCKET_ADDRESS Address;
-
- IP_PREFIX_ORIGIN PrefixOrigin;
- IP_SUFFIX_ORIGIN SuffixOrigin;
- IP_DAD_STATE DadState;
-
- ULONG ValidLifetime;
- ULONG PreferredLifetime;
- ULONG LeaseLifetime;
- UINT8 OnLinkPrefixLength;
-} IP_ADAPTER_UNICAST_ADDRESS_LH,
- *PIP_ADAPTER_UNICAST_ADDRESS_LH;
-
-typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Flags;
- };
- };
- struct _IP_ADAPTER_UNICAST_ADDRESS_XP *Next;
- SOCKET_ADDRESS Address;
-
- IP_PREFIX_ORIGIN PrefixOrigin;
- IP_SUFFIX_ORIGIN SuffixOrigin;
- IP_DAD_STATE DadState;
-
- ULONG ValidLifetime;
- ULONG PreferredLifetime;
- ULONG LeaseLifetime;
-} IP_ADAPTER_UNICAST_ADDRESS_XP, *PIP_ADAPTER_UNICAST_ADDRESS_XP;
-
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-typedef IP_ADAPTER_UNICAST_ADDRESS_LH IP_ADAPTER_UNICAST_ADDRESS;
-typedef IP_ADAPTER_UNICAST_ADDRESS_LH *PIP_ADAPTER_UNICAST_ADDRESS;
-#elif (NTDDI_VERSION >= NTDDI_WINXP)
-typedef IP_ADAPTER_UNICAST_ADDRESS_XP IP_ADAPTER_UNICAST_ADDRESS;
-typedef IP_ADAPTER_UNICAST_ADDRESS_XP *PIP_ADAPTER_UNICAST_ADDRESS;
-#endif
-
-//
-// Bit values of IP_ADAPTER_UNICAST_ADDRESS Flags field.
-//
-#define IP_ADAPTER_ADDRESS_DNS_ELIGIBLE 0x01
-#define IP_ADAPTER_ADDRESS_TRANSIENT 0x02
-
-typedef struct _IP_ADAPTER_ANYCAST_ADDRESS_XP {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Flags;
- };
- };
- struct _IP_ADAPTER_ANYCAST_ADDRESS_XP *Next;
- SOCKET_ADDRESS Address;
-} IP_ADAPTER_ANYCAST_ADDRESS_XP, *PIP_ADAPTER_ANYCAST_ADDRESS_XP;
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-typedef IP_ADAPTER_ANYCAST_ADDRESS_XP IP_ADAPTER_ANYCAST_ADDRESS;
-typedef IP_ADAPTER_ANYCAST_ADDRESS_XP *PIP_ADAPTER_ANYCAST_ADDRESS;
-#endif
-
-typedef struct _IP_ADAPTER_MULTICAST_ADDRESS_XP {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Flags;
- };
- };
- struct _IP_ADAPTER_MULTICAST_ADDRESS_XP *Next;
- SOCKET_ADDRESS Address;
-} IP_ADAPTER_MULTICAST_ADDRESS_XP, *PIP_ADAPTER_MULTICAST_ADDRESS_XP;
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-typedef IP_ADAPTER_MULTICAST_ADDRESS_XP IP_ADAPTER_MULTICAST_ADDRESS;
-typedef IP_ADAPTER_MULTICAST_ADDRESS_XP *PIP_ADAPTER_MULTICAST_ADDRESS;
-#endif
-
-typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS_XP {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Reserved;
- };
- };
- struct _IP_ADAPTER_DNS_SERVER_ADDRESS_XP *Next;
- SOCKET_ADDRESS Address;
-} IP_ADAPTER_DNS_SERVER_ADDRESS_XP, *PIP_ADAPTER_DNS_SERVER_ADDRESS_XP;
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-typedef IP_ADAPTER_DNS_SERVER_ADDRESS_XP IP_ADAPTER_DNS_SERVER_ADDRESS;
-typedef IP_ADAPTER_DNS_SERVER_ADDRESS_XP *PIP_ADAPTER_DNS_SERVER_ADDRESS;
-#endif
-
-typedef struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Reserved;
- };
- };
- struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH *Next;
- SOCKET_ADDRESS Address;
-} IP_ADAPTER_WINS_SERVER_ADDRESS_LH, *PIP_ADAPTER_WINS_SERVER_ADDRESS_LH;
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH IP_ADAPTER_WINS_SERVER_ADDRESS;
-typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH *PIP_ADAPTER_WINS_SERVER_ADDRESS;
-#endif
-
-
-typedef struct _IP_ADAPTER_GATEWAY_ADDRESS_LH {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Reserved;
- };
- };
- struct _IP_ADAPTER_GATEWAY_ADDRESS_LH *Next;
- SOCKET_ADDRESS Address;
-} IP_ADAPTER_GATEWAY_ADDRESS_LH, *PIP_ADAPTER_GATEWAY_ADDRESS_LH;
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-typedef IP_ADAPTER_GATEWAY_ADDRESS_LH IP_ADAPTER_GATEWAY_ADDRESS;
-typedef IP_ADAPTER_GATEWAY_ADDRESS_LH *PIP_ADAPTER_GATEWAY_ADDRESS;
-#endif
-
-typedef struct _IP_ADAPTER_PREFIX_XP {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Flags;
- };
- };
- struct _IP_ADAPTER_PREFIX_XP *Next;
- SOCKET_ADDRESS Address;
- ULONG PrefixLength;
-} IP_ADAPTER_PREFIX_XP, *PIP_ADAPTER_PREFIX_XP;
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-typedef IP_ADAPTER_PREFIX_XP IP_ADAPTER_PREFIX;
-typedef IP_ADAPTER_PREFIX_XP *PIP_ADAPTER_PREFIX;
-#endif
-
-//
-// Bit values of IP_ADAPTER_ADDRESSES Flags field.
-//
-#define IP_ADAPTER_DDNS_ENABLED 0x00000001
-#define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x00000002
-#define IP_ADAPTER_DHCP_ENABLED 0x00000004
-#define IP_ADAPTER_RECEIVE_ONLY 0x00000008
-#define IP_ADAPTER_NO_MULTICAST 0x00000010
-#define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x00000020
-#define IP_ADAPTER_NETBIOS_OVER_TCPIP_ENABLED 0x00000040
-#define IP_ADAPTER_IPV4_ENABLED 0x00000080
-#define IP_ADAPTER_IPV6_ENABLED 0x00000100
-
-typedef struct _IP_ADAPTER_ADDRESSES_LH {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- IF_INDEX IfIndex;
- };
- };
- struct _IP_ADAPTER_ADDRESSES_LH *Next;
- PCHAR AdapterName;
- PIP_ADAPTER_UNICAST_ADDRESS_LH FirstUnicastAddress;
- PIP_ADAPTER_ANYCAST_ADDRESS_XP FirstAnycastAddress;
- PIP_ADAPTER_MULTICAST_ADDRESS_XP FirstMulticastAddress;
- PIP_ADAPTER_DNS_SERVER_ADDRESS_XP FirstDnsServerAddress;
- PWCHAR DnsSuffix;
- PWCHAR Description;
- PWCHAR FriendlyName;
- BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
- ULONG PhysicalAddressLength;
- union {
- ULONG Flags;
- struct {
- ULONG DdnsEnabled : 1;
- ULONG RegisterAdapterSuffix : 1;
- ULONG Dhcpv4Enabled : 1;
- ULONG ReceiveOnly : 1;
- ULONG NoMulticast : 1;
- ULONG Ipv6OtherStatefulConfig : 1;
- ULONG NetbiosOverTcpipEnabled : 1;
- ULONG Ipv4Enabled : 1;
- ULONG Ipv6Enabled : 1;
- ULONG Ipv6ManagedAddressConfigurationSupported : 1;
- };
- };
- ULONG Mtu;
- IFTYPE IfType;
- IF_OPER_STATUS OperStatus;
- IF_INDEX Ipv6IfIndex;
- ULONG ZoneIndices[16];
- PIP_ADAPTER_PREFIX_XP FirstPrefix;
-
- ULONG64 TransmitLinkSpeed;
- ULONG64 ReceiveLinkSpeed;
- PIP_ADAPTER_WINS_SERVER_ADDRESS_LH FirstWinsServerAddress;
- PIP_ADAPTER_GATEWAY_ADDRESS_LH FirstGatewayAddress;
- ULONG Ipv4Metric;
- ULONG Ipv6Metric;
- IF_LUID Luid;
- SOCKET_ADDRESS Dhcpv4Server;
- NET_IF_COMPARTMENT_ID CompartmentId;
- NET_IF_NETWORK_GUID NetworkGuid;
- NET_IF_CONNECTION_TYPE ConnectionType;
- TUNNEL_TYPE TunnelType;
- //
- // DHCP v6 Info.
- //
- SOCKET_ADDRESS Dhcpv6Server;
- BYTE Dhcpv6ClientDuid[MAX_DHCPV6_DUID_LENGTH];
- ULONG Dhcpv6ClientDuidLength;
- ULONG Dhcpv6Iaid;
-} IP_ADAPTER_ADDRESSES_LH,
- *PIP_ADAPTER_ADDRESSES_LH;
-
-typedef struct _IP_ADAPTER_ADDRESSES_XP {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD IfIndex;
- };
- };
- struct _IP_ADAPTER_ADDRESSES_XP *Next;
- PCHAR AdapterName;
- PIP_ADAPTER_UNICAST_ADDRESS_XP FirstUnicastAddress;
- PIP_ADAPTER_ANYCAST_ADDRESS_XP FirstAnycastAddress;
- PIP_ADAPTER_MULTICAST_ADDRESS_XP FirstMulticastAddress;
- PIP_ADAPTER_DNS_SERVER_ADDRESS_XP FirstDnsServerAddress;
- PWCHAR DnsSuffix;
- PWCHAR Description;
- PWCHAR FriendlyName;
- BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
- DWORD PhysicalAddressLength;
- DWORD Flags;
- DWORD Mtu;
- DWORD IfType;
- IF_OPER_STATUS OperStatus;
- DWORD Ipv6IfIndex;
- DWORD ZoneIndices[16];
- PIP_ADAPTER_PREFIX_XP FirstPrefix;
-} IP_ADAPTER_ADDRESSES_XP,
- *PIP_ADAPTER_ADDRESSES_XP;
-
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-typedef IP_ADAPTER_ADDRESSES_LH IP_ADAPTER_ADDRESSES;
-typedef IP_ADAPTER_ADDRESSES_LH *PIP_ADAPTER_ADDRESSES;
-#elif (NTDDI_VERSION >= NTDDI_WINXP)
-typedef IP_ADAPTER_ADDRESSES_XP IP_ADAPTER_ADDRESSES;
-typedef IP_ADAPTER_ADDRESSES_XP *PIP_ADAPTER_ADDRESSES;
-#else
-//
-// For platforms other platforms that are including
-// the file but not using the types.
-//
-typedef IP_ADAPTER_ADDRESSES_XP IP_ADAPTER_ADDRESSES;
-typedef IP_ADAPTER_ADDRESSES_XP *PIP_ADAPTER_ADDRESSES;
-#endif
-
-
-//
-// Flags used as argument to GetAdaptersAddresses().
-// "SKIP" flags are added when the default is to include the information.
-// "INCLUDE" flags are added when the default is to skip the information.
-//
-#define GAA_FLAG_SKIP_UNICAST 0x0001
-#define GAA_FLAG_SKIP_ANYCAST 0x0002
-#define GAA_FLAG_SKIP_MULTICAST 0x0004
-#define GAA_FLAG_SKIP_DNS_SERVER 0x0008
-#define GAA_FLAG_INCLUDE_PREFIX 0x0010
-#define GAA_FLAG_SKIP_FRIENDLY_NAME 0x0020
-#define GAA_FLAG_INCLUDE_WINS_INFO 0x0040
-#define GAA_FLAG_INCLUDE_GATEWAYS 0x0080
-#define GAA_FLAG_INCLUDE_ALL_INTERFACES 0x0100
-#define GAA_FLAG_INCLUDE_ALL_COMPARTMENTS 0x0200
-#define GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER 0x0400
-
-#endif /* _WINSOCK2API_ */
-/* +++++++++++++++++++++++ from iptypes.h */
-
-
-/* +++++++++++++++++++++++ from iphlpapi.h */
-#ifdef _WINSOCK2API_
-
-//
-// The following functions require Winsock2.
-//
-
-ULONG
-WINAPI
-GetAdaptersAddresses(
- IN ULONG Family,
- IN ULONG Flags,
- IN PVOID Reserved,
- __out_bcount_opt(*SizePointer) PIP_ADAPTER_ADDRESSES AdapterAddresses,
- IN OUT PULONG SizePointer
- );
-
-#endif
-/* +++++++++++++++++++++++ from iphlpapi.h */
-
-#pragma warning(pop)
-#endif /* !_W64 */
-#endif /* GAA_COMPAT_H */
diff --git a/ports/winnt/include/hopf_PCI_io.h b/ports/winnt/include/hopf_PCI_io.h
deleted file mode 100644
index 7bca1d3f57c9..000000000000
--- a/ports/winnt/include/hopf_PCI_io.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * hopf_PCI_io.h
- * structur definition and prototype Function declarations
- *
- * Date: 21.03.2000 Revision: 01.10
- *
- * Copyright (C) 1999, 2000 by Bernd Altmeier altmeier@ATLSoft.de
- *
- */
-
-#if defined(__cplusplus)
-extern "C"{
-#endif
-
-#ifndef __inpREAD_H
-#define __inpREAD_H
-
-
-typedef struct _CLOCKVER {
- CHAR cVersion[255];
-} CLOCKVER, *PCLOCKVER, *LPCLOCKVER;
-
-typedef struct _HOPFTIME {
- WORD wYear;
- WORD wMonth;
- WORD wDayOfWeek;
- WORD wDay;
- WORD wHour;
- WORD wMinute;
- WORD wSecond;
- WORD wMilliseconds;
- WORD wStatus;
-} HOPFTIME, *PHOPFTIME, *LPHOPFTIME;
-
-typedef struct _SATSTAT {
- BYTE wVisible;
- BYTE wMode;
- BYTE wSat0;
- BYTE wRat0;
- BYTE wSat1;
- BYTE wRat1;
- BYTE wSat2;
- BYTE wRat2;
- BYTE wSat3;
- BYTE wRat3;
- BYTE wSat4;
- BYTE wRat4;
- BYTE wSat5;
- BYTE wRat5;
- BYTE wSat6;
- BYTE wRat6;
- BYTE wSat7;
- BYTE wRat7;
-} SATSTAT, *PSATSTAT, *LPSATSTAT;
-
-
-typedef struct _GPSPOS {
- LONG wAltitude; // Höhe immer 0
- LONG wLongitude; // Länge in Msec
- LONG wLatitude; // Breite in Msec
-} GPSPOS, *PGPSPOS, *LPGPSPOS;
-
-
-typedef struct _DCFANTENNE {
- BYTE bStatus;
- BYTE bStatus1;
- WORD wAntValue;
-} DCFANTENNE, *PDCFANTENNE, *LPDCFANTENNE;
-
-
-
-// Function declarations
-BOOL OpenHopfDevice();
-BOOL CloseHopfDevice();
-VOID GetHopfTime(LPHOPFTIME Data, DWORD Offset);
-VOID GetHopfLocalTime(LPHOPFTIME Data);
-VOID GetHopfSystemTime(LPHOPFTIME Data);
-VOID GetSatData(LPSATSTAT Data);
-VOID GetDiffTime(LPLONG Data);
-VOID GetPosition(LPGPSPOS Data);
-VOID GetHardwareVersion(LPCLOCKVER Data);
-VOID GetHardwareData(LPDWORD Data,WORD Ofs);
-VOID GetDCFAntenne(LPDCFANTENNE Data);
-
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* inpREAD_H */
-
diff --git a/ports/winnt/include/netdb.h b/ports/winnt/include/netdb.h
deleted file mode 100644
index 5e1599737300..000000000000
--- a/ports/winnt/include/netdb.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
diff --git a/ports/winnt/include/ntp_iocompletionport.h b/ports/winnt/include/ntp_iocompletionport.h
deleted file mode 100644
index 7d7ff7c4b207..000000000000
--- a/ports/winnt/include/ntp_iocompletionport.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#if !defined __ntp_iocompletionport_h
-# define __ntp_iocompletionport_h
-
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "clockstuff.h"
-#include "ntp_worker.h"
-
-# if defined(HAVE_IO_COMPLETION_PORT)
-
-extern void init_io_completion_port(void);
-extern void uninit_io_completion_port(void);
-
-extern int io_completion_port_add_socket(SOCKET fd, struct interface *);
-
-struct refclockio; /* in ntp_refclock.h but inclusion here triggers problems */
-extern int io_completion_port_add_clock_io(struct refclockio *rio);
-extern void io_completion_port_remove_clock_io(struct refclockio *rio);
-extern int io_completion_port_sendto(int, void *, size_t, sockaddr_u *);
-
-extern int GetReceivedBuffers(void);
-
-extern HANDLE WaitableExitEventHandle;
-
-# endif
-
-#endif
diff --git a/ports/winnt/include/ntp_timer.h b/ports/winnt/include/ntp_timer.h
deleted file mode 100644
index 15328a67a123..000000000000
--- a/ports/winnt/include/ntp_timer.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef NTP_TIMER_H
-#define NTP_TIMER_H
-
-extern void timer_clr_stats(void);
-
-#endif /* NTP_TIMER_H */
diff --git a/ports/winnt/include/ntservice.h b/ports/winnt/include/ntservice.h
deleted file mode 100644
index f44335fdb3b9..000000000000
--- a/ports/winnt/include/ntservice.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
- * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
- * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef NTSERVICE_H
-#define NTSERVICE_H
-
-#define NTP_DISPLAY_NAME "NetworkTimeProtocol"
-#define NTP_SERVICE_NAME "ntpd"
-
-void ntservice_init(void);
-void UpdateSCM(DWORD);
-void WINAPI ServiceControl(DWORD dwCtrlCode);
-void ntservice_shutdown(void);
-BOOL ntservice_systemisshuttingdown(void);
-BOOL WINAPI OnConsoleEvent(DWORD dwCtrlType);
-
-#endif /* NTSERVICE_H */
diff --git a/ports/winnt/include/stdint.h b/ports/winnt/include/stdint.h
deleted file mode 100644
index 4040c24f0f84..000000000000
--- a/ports/winnt/include/stdint.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * stdint_msvc.h - C99 integer types for older Visual C compilers
- *
- * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
- * The contents of 'html/copyright.html' apply.
- *
- * ----------------------------------------------------------------------
- *
- * Fairly straight forward implementation of the C99 standard integer
- * types.
- */
-
-#ifndef __STDINT_INCLUDED
-#define __STDINT_INCLUDED
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1800
-# error Use only with MSVC6 - MSVC11(VS2012)
-#endif
-
-#include <crtdefs.h>
-#include <limits.h>
-
-/* ---------------------------------------------------------------------
- * We declare the min/max values, using the MSVC syntax for literals of
- * a given bit width.
- */
-
-#define _VC_SI_LIT(lit,wbit) (lit ## i ## wbit)
-#define _VC_UI_LIT(lit,wbit) (lit ## ui ## wbit)
-
-/* ---------------------------------------------------------------------
- * Exact width integer types
- */
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
-# define INT8_MIN _I8_MIN
-# define INT8_MAX _I8_MAX
-# define UINT8_MAX _UI8_MAX
-# define INT16_MIN _I16_MIN
-# define INT16_MAX _I16_MAX
-# define UINT16_MAX _UI16_MAX
-# define INT32_MIN _I32_MIN
-# define INT32_MAX _I32_MAX
-# define UINT32_MAX _UI32_MAX
-# define INT64_MIN _I64_MIN
-# define INT64_MAX _I64_MAX
-# define UINT64_MAX _UI64_MAX
-#endif
-
-/* ---------------------------------------------------------------------
- * Least-size integers
- *
- * These are mapped to exact size.
- */
-typedef __int8 int_least8_t;
-typedef __int16 int_least16_t;
-typedef __int32 int_least32_t;
-typedef __int64 int_least64_t;
-
-typedef unsigned __int8 uint_least8_t;
-typedef unsigned __int16 uint_least16_t;
-typedef unsigned __int32 uint_least32_t;
-typedef unsigned __int64 uint_least64_t;
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
-#define INT_LEAST8_MIN _I8_MIN
-#define INT_LEAST8_MAX _I8_MAX
-#define UINT_LEAST8_MAX _UI8_MAX
-#define INT_LEAST16_MIN _I16_MIN
-#define INT_LEAST16_MAX _I16_MAX
-#define UINT_LEAST16_MAX _UI16_MAX
-#define INT_LEAST32_MIN _I32_MIN
-#define INT_LEAST32_MAX _I32_MAX
-#define UINT_LEAST32_MAX _UI32_MAX
-#define INT_LEAST64_MIN _I64_MIN
-#define INT_LEAST64_MAX _I64_MAX
-#define UINT_LEAST64_MAX _UI64_MAX
-#endif
-
-/* ---------------------------------------------------------------------
- * least-size, fastest integer
- *
- * The 'FAST' types are all 32 bits, except the 64 bit quantity; as the
- * natural register width is 32 bits, quantities of that size are fastest
- * to operate on naturally. (This even holds for the x86_64; MSVC uses
- * the 'llp64' model.
- */
-typedef __int32 int_fast8_t;
-typedef __int32 int_fast16_t;
-typedef __int32 int_fast32_t;
-typedef __int64 int_fast64_t;
-
-typedef unsigned __int32 uint_fast8_t;
-typedef unsigned __int32 uint_fast16_t;
-typedef unsigned __int32 uint_fast32_t;
-typedef unsigned __int64 uint_fast64_t;
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
-#define INT_FAST8_MIN _I32_MIN
-#define INT_FAST8_MAX _I32_MAX
-#define UINT_FAST8_MAX _UI32_MAX
-#define INT_FAST16_MIN _I32_MIN
-#define INT_FAST16_MAX _I32_MAX
-#define UINT_FAST16_MAX _UI32_MAX
-#define INT_FAST32_MIN _I32_MIN
-#define INT_FAST32_MAX _I32_MAX
-#define UINT_FAST32_MAX _UI32_MAX
-#define INT_FAST64_MIN _I64_MIN
-#define INT_FAST64_MAX _I64_MAX
-#define UINT_FAST64_MAX _UI64_MAX
-#endif
-
-/* ---------------------------------------------------------------------
- * The (u)intptr_t, ptrdiff_t and size_t definitions depend on the
- * target: 32bit for x86, and 64bit for x64, aka amd64. Well, we
- * have to bite the bullet.
- */
-
-/* ------------------------------------------------------------------ */
-# if defined(_WIN64) || defined(WIN64)
-/* ------------------------------------------------------------------ */
-
-# ifndef _INTPTR_T_DEFINED
-# define _INTPTR_T_DEFINED
- typedef __int64 intptr_t;
-# endif
-
-# ifndef _UINTPTR_T_DEFINED
-# define _UINTPTR_T_DEFINED
- typedef unsigned __int64 uintptr_t;
-# endif
-
-# ifndef _PTRDIFF_T_DEFINED
-# define _PTRDIFF_T_DEFINED
- typedef __int64 ptrdiff_t;
-# endif
-
-# if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
-# ifndef INTPTR_MIN
-# define INTPTR_MIN _I64_MIN
-# endif
-# ifndef INTPTR_MAX
-# define INTPTR_MAX _I64_MAX
-# endif
-# ifndef UINTPTR_MAX
-# define UINTPTR_MAX _UI64_MAX
-# endif
-# ifndef PTRDIFF_MIN
-# define PTRDIFF_MIN _I64_MIN
-# endif
-# ifndef PTRDIFF_MAX
-# define PTRDIFF_MAX _I64_MAX
-# endif
-# endif
-
-/* ------------------------------------------------------------------ */
-#else /* 32 bit target assumed here! */
-/* ------------------------------------------------------------------ */
-
-# ifndef _INTPTR_T_DEFINED
-# define _INTPTR_T_DEFINED
- typedef __int32 intptr_t;
-# endif
-
-# ifndef _UINTPTR_T_DEFINED
-# define _UINTPTR_T_DEFINED
- typedef unsigned __int32 uintptr_t;
-# endif
-
-# ifndef _PTRDIFF_T_DEFINED
-# define _PTRDIFF_T_DEFINED
- typedef __int64 ptrdiff_t;
-# endif
-
-# if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
-# ifndef INTPTR_MIN
-# define INTPTR_MIN _I32_MIN
-# endif
-# ifndef INTPTR_MAX
-# define INTPTR_MAX _I32_MAX
-# endif
-# ifndef UINTPTR_MAX
-# define UINTPTR_MAX _UI32_MAX
-# endif
-# ifndef PTRDIFF_MIN
-# define PTRDIFF_MIN _I32_MIN
-# endif
-# ifndef PTRDIFF_MAX
-# define PTRDIFF_MAX _I32_MAX
-# endif
-# endif
-#endif /* platform dependent stuff */
-
-
-/* ---------------------------------------------------------------------
- * max integer is 64-bit integer
- */
-typedef __int64 intmax_t;
-typedef unsigned __int64 uintmax_t;
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
-# define INTMAX_MIN _I64_MIN
-# define INTMAX_MAX _I64_MAX
-# define UINTMAX_MAX _UI64_MAX
-#endif
-
-/* ---------------------------------------------------------------------
- * limit for size_t (older MSVC versions lack that one)
- */
-#if _MSC_VER <=1200
-# if defined(_WIN64) || defined(WIN64)
-# define SIZE_MAX _UI64_MAX
-#else
-# define SIZE_MAX _UI32_MAX
-# endif
-#endif
-
-/* ---------------------------------------------------------------------
- * construct numerical literals with precise size
- */
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
-# define INT8_C(lit) _VC_SI_LIT(lit,8)
-# define UINT8_C(lit) _VC_UI_LIT(lit,8)
-# define INT16_C(lit) _VC_SI_LIT(lit,16)
-# define UINT16_C(lit) _VC_UI_LIT(lit,16)
-# define INT32_C(lit) _VC_SI_LIT(lit,32)
-# define UINT32_C(lit) _VC_UI_LIT(lit,32)
-# define INT64_C(lit) _VC_SI_LIT(lit,64)
-# define UINT64_C(lit) _VC_UI_LIT(lit,64)
-# define INTMAX_C(lit) _VC_SI_LIT(lit,64)
-# define UINTMAX_C(lit) _VC_UI_LIT(lit,64)
-#endif
-
-#endif
-/**** EOF ****/
diff --git a/ports/winnt/include/stdnoreturn.h b/ports/winnt/include/stdnoreturn.h
deleted file mode 100644
index 65702e012026..000000000000
--- a/ports/winnt/include/stdnoreturn.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* A substitute for ISO C11 <stdnoreturn.h>.
-
- Copyright 2012-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-/* Written by Paul Eggert. */
-
-#ifndef noreturn
-
-/* ISO C11 <stdnoreturn.h> for platforms that lack it.
-
- References:
- ISO C11 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
- section 7.23 */
-
-/* The definition of _Noreturn is copied here. */
-#if !defined _Noreturn && __STDC_VERSION__ < 201112
-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
- || 0x5110 <= __SUNPRO_C)
-# define _Noreturn __attribute__ ((__noreturn__))
-# elif 1200 <= _MSC_VER
-# define _Noreturn __declspec (noreturn)
-# else
-# define _Noreturn
-# endif
-#endif
-
-#if 1200 <= _MSC_VER
-/* Standard include files on this platform contain declarations like
- "__declspec (noreturn) void abort (void);". "#define noreturn
- _Noreturn" would cause this declaration to be rewritten to the
- invalid "__declspec (__declspec (noreturn)) void abort (void);".
- Instead, define noreturn to empty, so that such declarations are
- rewritten to "__declspec () void abort (void);", which is
- equivalent to "void abort (void);"; this gives up on noreturn's
- advice to the compiler but at least it is valid code. */
-# define noreturn /*empty*/
-#else
-# define noreturn _Noreturn
-#endif
-
-/* Did he ever return?
- No he never returned
- And his fate is still unlearn'd ...
- -- Steiner J, Hawes BL. M.T.A. (1949) */
-
-#endif /* noreturn */
diff --git a/ports/winnt/include/sys/ioctl.h b/ports/winnt/include/sys/ioctl.h
deleted file mode 100644
index 6f4b07691661..000000000000
--- a/ports/winnt/include/sys/ioctl.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
-
-#ifndef _IOCTL_H
-#define _IOCTL_H
-
-#include "win32_io.h"
-
-#endif \ No newline at end of file
diff --git a/ports/winnt/include/sys/param.h b/ports/winnt/include/sys/param.h
deleted file mode 100644
index 5e1599737300..000000000000
--- a/ports/winnt/include/sys/param.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
diff --git a/ports/winnt/include/sys/resource.h b/ports/winnt/include/sys/resource.h
deleted file mode 100644
index 01f4c810ff7f..000000000000
--- a/ports/winnt/include/sys/resource.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * ports/winnt/include/sys/resource.h
- *
- * routines declared in Unix systems' sys/resource.h
- */
-
-#define PRIO_PROCESS 0
-#define NTP_PRIO (-12)
-
-int setpriority(int, int, int); /* winnt\libntp\setpriority.c */
diff --git a/ports/winnt/include/sys/signal.h b/ports/winnt/include/sys/signal.h
deleted file mode 100644
index 5e1599737300..000000000000
--- a/ports/winnt/include/sys/signal.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
diff --git a/ports/winnt/include/sys/time.h b/ports/winnt/include/sys/time.h
deleted file mode 100644
index b4489170bea0..000000000000
--- a/ports/winnt/include/sys/time.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ports/winnt/include/sys/time.h
- *
- * routines declared in Unix systems' sys/time.h
- */
-
-#ifndef SYS_TIME_H
-#define SYS_TIME_H
-
-#include "ntp_types.h"
-#include <time.h>
-#include <sys/timeb.h>
-
-typedef struct timespec {
- time_t tv_sec;
- long tv_nsec;
-} timespec_t;
-
-#define TIMEOFDAY 0 /* getclock() clktyp arg */
-extern int getclock(int, struct timespec *ts);
-extern int gettimeofday(struct timeval *, void *);
-extern int settimeofday(struct timeval *);
-extern void init_win_precise_time(void);
-
-#endif /* SYS_TIME_H */
diff --git a/ports/winnt/include/sys/wait.h b/ports/winnt/include/sys/wait.h
deleted file mode 100644
index 5e1599737300..000000000000
--- a/ports/winnt/include/sys/wait.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
diff --git a/ports/winnt/include/syslog.h b/ports/winnt/include/syslog.h
deleted file mode 100644
index 5cbf30a00a13..000000000000
--- a/ports/winnt/include/syslog.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
- * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
- * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* From BIND 9 lib/isc/include/isc/: syslog.h,v 1.4 2002/08/01 03:43:31 mayer */
-
-#ifndef _SYSLOG_H
-#define _SYSLOG_H
-
-#include <stdio.h>
-
-/* Constant definitions for openlog() */
-#define LOG_PID 1
-#define LOG_CONS 2
-/* NT event log does not support facility level */
-#define LOG_KERN 0
-#define LOG_USER 0
-#define LOG_MAIL 0
-#define LOG_DAEMON 0
-#define LOG_AUTH 0
-#define LOG_SYSLOG 0
-#define LOG_LPR 0
-#define LOG_LOCAL0 0
-#define LOG_LOCAL1 0
-#define LOG_LOCAL2 0
-#define LOG_LOCAL3 0
-#define LOG_LOCAL4 0
-#define LOG_LOCAL5 0
-#define LOG_LOCAL6 0
-#define LOG_LOCAL7 0
-
-#define LOG_EMERG 0 /* system is unusable */
-#define LOG_ALERT 1 /* action must be taken immediately */
-#define LOG_CRIT 2 /* critical conditions */
-#define LOG_ERR 3 /* error conditions */
-#define LOG_WARNING 4 /* warning conditions */
-#define LOG_NOTICE 5 /* normal but signification condition */
-#define LOG_INFO 6 /* informational */
-#define LOG_DEBUG 7 /* debug-level messages */
-
-/*
- * These are ignored on NT
- */
-#define LOG_NDELAY 0 /* Open the connection to syslogd immediately */
-
-#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
-
-void
-syslog(int level, const char *fmt, ...);
-
-void
-openlog(const char *, int, ...);
-
-void
-closelog(void);
-
-void
-ModifyLogLevel(int level);
-
-int
-setlogmask(int maskpri);
-
-void
-InitNTLogging(FILE *, int);
-
-void
-NTReportError(const char *, const char *);
-
-#endif
diff --git a/ports/winnt/include/termios.h b/ports/winnt/include/termios.h
deleted file mode 100644
index 9c1cc625cd40..000000000000
--- a/ports/winnt/include/termios.h
+++ /dev/null
@@ -1,214 +0,0 @@
-#ifndef NTP_WIN_TERMIOS_H
-#define NTP_WIN_TERMIOS_H
-
-/* Flag definitions for compatibility
- * ==================================
-*/
-
-#include <fcntl.h>
-
-#define NCCS 18 /* refclock_arc.c uses VTIME (17) */
-#define VEOL 3
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-struct termios
-{
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
- cc_t c_cc[NCCS]; /* control characters */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
-};
-
-/* c_cc characters
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VTIME 5
-#define VMIN 6
-#define VSWTC 7
-#define VSTART 8
-#define VSTOP 9
-#define VSUSP 10
-#define VEOL 11
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE 14
-#define VLNEXT 15
-#define VEOL2 16
-*/
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK 0000020
-#define ISTRIP 0000040
-#define INLCR 0000100
-#define IGNCR 0000200
-#define ICRNL 0000400
-#define IUCLC 0001000
-#define IXON 0002000
-#define IXANY 0004000
-#define IXOFF 0010000
-#define IMAXBEL 0020000
-
-/* c_oflag bits */
-#define OPOST 0000001
-#define OLCUC 0000002
-#define ONLCR 0000004
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-#define OFILL 0000100
-#define OFDEL 0000200
-
-#define NLDLY 0000400
-#define NL0 0000000
-#define NL1 0000400
-
-#define CRDLY 0003000
-#define CR0 0000000
-#define CR1 0001000
-#define CR2 0002000
-#define CR3 0003000
-
-#define TABDLY 0014000
-#define TAB0 0000000
-#define TAB1 0004000
-#define TAB2 0010000
-#define TAB3 0014000
-#define XTABS 0014000
-
-#define BSDLY 0020000
-#define BS0 0000000
-#define BS1 0020000
-
-#define VTDLY 0040000
-#define VT0 0000000
-#define VT1 0040000
-
-#define FFDLY 0100000
-#define FF0 0000000
-#define FF1 0100000
-
-/* c_cflag bit meaning */
-#define CBAUD 0010017
-#define B0 0000000 /* hang up */
-#define B50 0000001
-#define B75 0000002
-#define B110 0000003
-#define B134 0000004
-#define B150 0000005
-#define B200 0000006
-#define B300 0000007
-#define B600 0000010
-#define B1200 0000011
-#define B1800 0000012
-#define B2400 0000013
-#define B4800 0000014
-#define B9600 0000015
-#define B19200 0000016
-#define B38400 0000017
-
-#define EXTA B19200
-#define EXTB B38400
-
-#define CSIZE 0000060
-#define CS5 0000000
-#define CS6 0000020
-#define CS7 0000040
-#define CS8 0000060
-
-#define CSTOPB 0000100
-#define CREAD 0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL 0002000
-#define CLOCAL 0004000
-
-#define CBAUDEX 0010000
-#define B57600 0010001
-#define B115200 0010002
-#define B230400 0010003
-#define B460800 0010004
-
-#define CIBAUD 002003600000 /* input baud rate (not used) */
-#define CRTSCTS 020000000000 /* flow control */
-
-/* c_lflag bits */
-#define ISIG 0000001
-#define ICANON 0000002
-#define XCASE 0000004
-#define ECHO 0000010
-#define ECHOE 0000020
-#define ECHOK 0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define TOSTOP 0000400
-#define ECHOCTL 0001000
-#define ECHOPRT 0002000
-#define ECHOKE 0004000
-#define FLUSHO 0010000
-#define PENDIN 0040000
-#define IEXTEN 0100000
-
-/* tcflow() and TCXONC use these */
-#define TCOOFF 0
-#define TCOON 1
-#define TCIOFF 2
-#define TCION 3
-
-/* tcflush() and TCFLSH use these */
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-
-/* tcsetattr uses these */
-#define TCSANOW 0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-#define VMIN 16
-#define VTIME 17
-
-/* modem lines */
-#define TIOCM_LE 0x001
-#define TIOCM_DTR 0x002
-#define TIOCM_RTS 0x004
-#define TIOCM_ST 0x008
-#define TIOCM_SR 0x010
-#define TIOCM_CTS 0x020
-#define TIOCM_CAR 0x040
-#define TIOCM_RNG 0x080
-#define TIOCM_DSR 0x100
-#define TIOCM_CD TIOCM_CAR
-#define TIOCM_RI TIOCM_RNG
-#define TIOCM_OUT1 0x2000
-#define TIOCM_OUT2 0x4000
-
-/* ioctl */
-#define TIOCMGET 1
-#define TIOCMSET 2
-#define TIOCMBIC 3
-#define TIOCMBIS 4
-
-/* NOP cfsetospeed() and cfsetispeed() for now */
-#define cfsetospeed(dcb, spd) (0)
-#define cfsetispeed(dcb, spd) (0)
-
-extern int closeserial (int);
-extern int ioctl (int, int, int *);
-extern int tcsetattr (int, int, const struct termios *);
-extern int tcgetattr (int, struct termios *);
-extern int tcflush (int, int);
-extern int isserialhandle (HANDLE);
-
-#endif /* NTP_WIN_TERMIOS_H */
diff --git a/ports/winnt/include/timepps.h b/ports/winnt/include/timepps.h
deleted file mode 100644
index 76b1bfada1ab..000000000000
--- a/ports/winnt/include/timepps.h
+++ /dev/null
@@ -1,811 +0,0 @@
-/***********************************************************************
- * *
- * Copyright (c) David L. Mills 1999-2009 *
- * *
- * Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and with or without fee is hereby *
- * granted, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission *
- * notice appear in supporting documentation, and that the name *
- * University of Delaware not be used in advertising or publicity *
- * pertaining to distribution of the software without specific, *
- * written prior permission. The University of Delaware makes no *
- * representations about the suitability this software for any *
- * purpose. It is provided "as is" without express or implied *
- * warranty. *
- * *
- ***********************************************************************
- * *
- * This header file complies with "Pulse-Per-Second API for UNIX-like *
- * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
- * and Marc Brett, from whom much of this code was shamelessly stolen. *
- * *
- * This modified timepps.h can be used to provide a PPSAPI interface *
- * to a machine running Windows with one or more backend provider DLLs *
- * implementing the provider interfaces defined herein. *
- * *
- * This Windows version was derived by Dave Hart *
- * <davehart@davehart.com> from Mills' timepps-Solaris.h *
- * *
- ***********************************************************************
- * *
- * Some of this include file *
- * Copyright (c) 1999 by Ulrich Windl, *
- * based on code by Reg Clemens <reg@dwf.com> *
- * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
- * *
- ***********************************************************************
- * *
- * "THE BEER-WARE LICENSE" (Revision 42): *
- * <phk@FreeBSD.org> wrote this file. As long as you retain this *
- * notice you can do whatever you want with this stuff. If we meet some*
- * day, and you think this stuff is worth it, you can buy me a beer *
- * in return. Poul-Henning Kamp *
- * *
- **********************************************************************/
-
-#ifndef TIMEPPS_H
-#define TIMEPPS_H
-
-#include "sys/time.h" /* in ntp ref source declares struct timespec */
-
-/*
- * The following definitions are architecture independent
- */
-
-#define PPS_API_VERS_1 1 /* API version number */
-#define PPS_JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
-#define PPS_NANOSECOND 1000000000L /* one nanosecond in decimal */
-#define PPS_FRAC 4294967296. /* 2^32 as a double */
-#define PPS_HECTONANOSECONDS 10000000 /* 100ns units in a second */
-#define PPS_FILETIME_1970 0x019db1ded53e8000 /* unix epoch to Windows */
-
-#define PPS_NORMALIZE(x) /* normalize timespec */ \
- do { \
- if ((x).tv_nsec >= PPS_NANOSECOND) { \
- (x).tv_nsec -= PPS_NANOSECOND; \
- (x).tv_sec++; \
- } else if ((x).tv_nsec < 0) { \
- (x).tv_nsec += PPS_NANOSECOND; \
- (x).tv_sec--; \
- } \
- } while (0)
-
-#define PPS_TSPECTONTP(x) /* convert timespec to ntp_fp */ \
- do { \
- double d_frac; \
- \
- d_frac = ((struct timespec)&(x))->tv_nsec \
- * PPS_FRAC / PPS_NANOSECOND; \
- (x).integral = ((struct timespec)&(x))->tv_sec \
- + PPS_JAN_1970; \
- (x).fractional = (unsigned int)d_frac; \
- if (d_frac >= PPS_FRAC) \
- (x).integral++; \
- } while (0)
-
-#define PPS_NTPTOTSPEC(x) /* convert ntp_fp to timespec */ \
- do { \
- double d_frac; \
- \
- /* careful, doing in place and tv_sec may be 64bit */ \
- d_frac = (double)((ntp_fp_t *)&(x))->fractional \
- * PPS_NANOSECOND / PPS_FRAC; \
- (x).tv_sec = ((ntp_fp_t *)&(x))->integral \
- - (time_t)PPS_JAN_1970; \
- (x).tv_nsec = (long)d_frac; \
- } while (0)
-
-
-/*
- * Device/implementation parameters (mode)
- */
-
-#define PPS_CAPTUREASSERT 0x01 /* capture assert events */
-#define PPS_CAPTURECLEAR 0x02 /* capture clear events */
-#define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */
-
-#define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */
-#define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */
-#define PPS_OFFSETBOTH 0x30 /* apply compensation for both */
-
-#define PPS_CANWAIT 0x100 /* Can we wait for an event? */
-#define PPS_CANPOLL 0x200 /* "This bit is reserved for */
-
-/*
- * Kernel actions (mode)
- */
-
-#define PPS_ECHOASSERT 0x40 /* feed back assert event to output */
-#define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */
-
-/*
- * Timestamp formats (tsformat)
- */
-
-#define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */
-#define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */
-#define PPS_TSFMT_BOTH (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)
-
-/*
- * Kernel discipline actions (not used in Windows yet)
- */
-
-#define PPS_KC_HARDPPS 0 /* enable kernel consumer */
-#define PPS_KC_HARDPPS_PLL 1 /* phase-lock mode */
-#define PPS_KC_HARDPPS_FLL 2 /* frequency-lock mode */
-
-/*
- * Type definitions
- */
-
-typedef unsigned long pps_seq_t; /* sequence number */
-
-#pragma warning(push)
-#pragma warning(disable: 201) /* nonstd extension nameless union */
-
-typedef struct ntp_fp {
- union ntp_fp_sec {
- unsigned int integral;
- int s_integral;
- };
- unsigned int fractional;
-} ntp_fp_t; /* NTP-compatible time stamp */
-
-#pragma warning(pop)
-
-typedef union pps_timeu { /* timestamp format */
- struct timespec tspec;
- ntp_fp_t ntpfp;
- unsigned long longpad[3];
-} pps_timeu_t; /* generic data type to represent time stamps */
-
-/* addition of NTP fixed-point format */
-
-#define NTPFP_M_ADD(r_i, r_f, a_i, a_f) /* r += a */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- lo_tmp = ((r_f) & 0xffff) + ((a_f) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) + (((a_f) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_i) += (a_i); \
- if (hi_tmp & 0x10000) \
- (r_i)++; \
- } while (0)
-
-#define NTPFP_L_ADDS(r, a) NTPFP_M_ADD((r)->integral, (r)->fractional, \
- (a)->s_integral, (a)->fractional)
-
-
-/*
- * Timestamp information structure
- */
-
-typedef struct pps_info {
- pps_seq_t assert_sequence; /* seq. num. of assert event */
- pps_seq_t clear_sequence; /* seq. num. of clear event */
- pps_timeu_t assert_tu; /* time of assert event */
- pps_timeu_t clear_tu; /* time of clear event */
- int current_mode; /* current mode bits */
-} pps_info_t;
-
-#define assert_timestamp assert_tu.tspec
-#define clear_timestamp clear_tu.tspec
-
-#define assert_timestamp_ntpfp assert_tu.ntpfp
-#define clear_timestamp_ntpfp clear_tu.ntpfp
-
-/*
- * Parameter structure
- */
-
-typedef struct pps_params {
- int api_version; /* API version # */
- int mode; /* mode bits */
- pps_timeu_t assert_off_tu; /* offset compensation for assert */
- pps_timeu_t clear_off_tu; /* offset compensation for clear */
-} pps_params_t;
-
-#define assert_offset assert_off_tu.tspec
-#define clear_offset clear_off_tu.tspec
-
-#define assert_offset_ntpfp assert_off_tu.ntpfp
-#define clear_offset_ntpfp clear_off_tu.ntpfp
-
-/*
- *------ Here begins the implementation-specific part! ------
- */
-
-#include <windows.h>
-#include <errno.h>
-#include <stddef.h> /* offsetof() */
-#include <io.h> /* _get_osfhandle() */
-
-#ifndef EOPNOTSUPP
-#define EOPNOTSUPP 45
-#endif
-
-typedef UINT_PTR pps_handle_t; /* pps handlebars */
-
-#ifndef inline
-#define inline __inline
-#endif
-
-/*
- * ntpd on Windows is typically distributed as a binary as few users
- * have the tools needed to build from source. Rather than build
- * a single timepps.h for Windows which knows how to talk to all
- * PPS implementations frozen in time as of compiling, this timepps.h
- * allows one or more backend providers to be used by naming a DLL
- * which exports the provider interfaces defined here.
- */
-typedef enum ppsapi_magic_tag {
- PPSAPI_MAGIC_UNIT = 0x70707355, /* ppsU */
-} ppsapi_magic;
-
-typedef struct {
- struct pps_provider_tag *provider;
- void * context;/* provider's unit pointer */
- ppsapi_magic magic; /* to detect invalid handles */
- pps_params_t params; /* PPS parameters set by user */
-} pps_unit_t;
-
-typedef void (*ppps_ntp_timestamp_from_counter)(
- ntp_fp_t *result,
- ULONGLONG Timestamp,
- ULONGLONG Counterstamp
- );
-
-typedef pps_handle_t (*pcreate_pps_handle)(
- void * prov_context
- );
-
-/*
- * ppsapi_prov_init() - exported by backend DLLs
- *
- * Return value is pps capabilities available to PPSAPI consumers
- * via time_pps_getcaps().
- */
-#define PPSAPI_TIMEPPS_PROV_VER 2
-
-typedef int (WINAPI *pppsapi_prov_init)(
- int ppsapi_timepps_prov_ver,
- pcreate_pps_handle create_pps_handle,
- ppps_ntp_timestamp_from_counter ntp_timestamp_from_counter,
- char * short_name_buf,
- size_t short_name_size,
- char * full_name_buf,
- size_t full_name_size
- );
-
-typedef int (WINAPI *provtime_pps_create)(
- HANDLE winhandle, /* user device handle */
- pps_handle_t *phandle /* returned handle */
- );
-
-typedef int (WINAPI *provtime_pps_destroy)(
- pps_unit_t * unit,
- void * context
- );
-
-typedef int (WINAPI *provtime_pps_setparams)(
- pps_unit_t * unit,
- void * context,
- const pps_params_t * params
- );
-
-typedef int (WINAPI *provtime_pps_fetch)(
- pps_unit_t * unit,
- void * context,
- const int tsformat,
- pps_info_t * pinfo,
- const struct timespec * timeout
- );
-
-typedef int (WINAPI *provtime_pps_kcbind)(
- pps_unit_t * unit,
- void * context,
- const int kernel_consumer,
- const int edge,
- const int tsformat
- );
-
-typedef struct pps_provider_tag {
- struct pps_provider_tag *next;
- int caps;
- char * short_name;
- char * full_name;
- provtime_pps_create ptime_pps_create;
- provtime_pps_destroy ptime_pps_destroy;
- provtime_pps_setparams ptime_pps_setparams;
- provtime_pps_fetch ptime_pps_fetch;
- provtime_pps_kcbind ptime_pps_kcbind;
-} ppsapi_provider;
-
-static ppsapi_provider * g_provider_list;
-static ppsapi_provider * g_curr_provider;
-
-
-static inline pps_handle_t
-internal_create_pps_handle(
- void * prov_context
- )
-{
- pps_unit_t * punit;
-
- if (NULL == g_curr_provider) {
- fprintf(stderr, "create_pps_handle: provider backend called me outside time_pps_create\n");
- punit = NULL;
- } else
- punit = malloc(sizeof(*punit));
- if (punit != NULL) {
- punit->provider = g_curr_provider;
- punit->context = prov_context;
- punit->magic = PPSAPI_MAGIC_UNIT;
- memset(&punit->params, 0, sizeof(punit->params));
- }
- return (pps_handle_t)punit;
-}
-
-static inline pps_unit_t *
-unit_from_ppsapi_handle(
- pps_handle_t handle
- )
-{
- pps_unit_t *punit;
-
- punit = (pps_unit_t *)handle;
- if (PPSAPI_MAGIC_UNIT != punit->magic)
- punit = NULL;
- return punit;
-}
-
-/*
- * ntpd on Windows only looks to errno after finding
- * GetLastError returns NO_ERROR. To accomodate its
- * use of msyslog in portable code such as refclock_atom.c,
- * this implementation always clears the Windows
- * error code using SetLastError(NO_ERROR) when
- * returning an errno. This is also a good idea
- * for any non-ntpd clients as they should rely only
- * the errno for PPSAPI functions.
- */
-#define RETURN_PPS_ERRNO(e) \
-do { \
- SetLastError(NO_ERROR); \
- errno = (e); \
- return -1; \
-} while (0)
-
-
-#ifdef OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER
-extern void pps_ntp_timestamp_from_counter(ntp_fp_t *, ULONGLONG, ULONGLONG);
-#else
-/*
- * helper routine for serialpps.sys ioctl which returns
- * performance counter "timestamp" as well as a system
- * FILETIME timestamp. Converts one of the inputs to
- * NTP fixed-point format.
- *
- * You will probably want to supply your own and #define
- * OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER, as this stub
- * converts only the low-resolution system timestamp.
- *
- * When implementing a provider, use the pointer to this
- * conversion function supplied to your prov_init(), as
- * the copy in your DLL will likely be the stub below,
- * where you want the one provided by the PPSAPI client
- * such as ntpd.
- */
-static inline void
-pps_ntp_timestamp_from_counter(
- ntp_fp_t *result,
- ULONGLONG Timestamp,
- ULONGLONG Counterstamp)
-{
- ULONGLONG BiasedTimestamp;
-
- /* convert from 100ns units to NTP fixed point format */
-
- BiasedTimestamp = Timestamp - PPS_FILETIME_1970;
- result->integral = PPS_JAN_1970 +
- (unsigned)(BiasedTimestamp / PPS_HECTONANOSECONDS);
- result->fractional =
- (unsigned) ((BiasedTimestamp % PPS_HECTONANOSECONDS) *
- (PPS_FRAC / PPS_HECTONANOSECONDS));
-}
-#endif
-
-
-static inline int
-load_pps_provider(
- char * dllpath
- )
-{
- char short_name[16];
- char full_name[64];
- ppsapi_provider * prov;
- HMODULE hmod;
- pppsapi_prov_init pprov_init;
-
- prov = malloc(sizeof(*prov));
- if (NULL == prov)
- return ENOMEM;
-
- hmod = LoadLibrary(dllpath);
- if (NULL == hmod) {
- fprintf(stderr, "load_pps_provider: LoadLibrary(%s) error %u\n", dllpath, GetLastError());
- free(prov);
- return ENOENT;
- }
-
- pprov_init = (pppsapi_prov_init)GetProcAddress(hmod, "ppsapi_prov_init");
- if (NULL == pprov_init) {
- fprintf(stderr, "load_pps_provider: entrypoint ppsapi_prov_init not found in %s\n", dllpath);
- free(prov);
- FreeLibrary(hmod);
- return EFAULT;
- }
-
- prov->caps = (*pprov_init)(PPSAPI_TIMEPPS_PROV_VER,
- &internal_create_pps_handle,
- &pps_ntp_timestamp_from_counter,
- short_name, sizeof(short_name),
- full_name, sizeof(full_name));
-
- if (!prov->caps) {
- free(prov);
- FreeLibrary(hmod);
- return EACCES;
- }
-
- prov->short_name = _strdup(short_name);
- prov->full_name = _strdup(full_name);
-
- if (NULL == prov->short_name || !prov->short_name[0]
- || NULL == prov->full_name || !prov->full_name[0]) {
-
- if (prov->short_name)
- free(prov->short_name);
- if (prov->full_name)
- free(prov->full_name);
- free(prov);
- FreeLibrary(hmod);
- return EINVAL;
- }
-
- prov->ptime_pps_create = (provtime_pps_create)
- GetProcAddress(hmod, "prov_time_pps_create");
- prov->ptime_pps_destroy = (provtime_pps_destroy)
- GetProcAddress(hmod, "prov_time_pps_destroy");
- prov->ptime_pps_setparams = (provtime_pps_setparams)
- GetProcAddress(hmod, "prov_time_pps_setparams");
- prov->ptime_pps_fetch = (provtime_pps_fetch)
- GetProcAddress(hmod, "prov_time_pps_fetch");
- prov->ptime_pps_kcbind = (provtime_pps_kcbind)
- GetProcAddress(hmod, "prov_time_pps_kcbind");
-
- if (NULL == prov->ptime_pps_create
- || NULL == prov->ptime_pps_destroy
- || NULL == prov->ptime_pps_setparams
- || NULL == prov->ptime_pps_fetch
- || NULL == prov->ptime_pps_kcbind) {
-
- fprintf(stderr, "PPSAPI provider %s missing entrypoint\n",
- prov->short_name);
- free(prov->short_name);
- free(prov->full_name);
- free(prov);
- FreeLibrary(hmod);
- return EINVAL;
- }
-
- fprintf(stderr, "loaded PPSAPI provider %s caps 0x%x provider %p\n",
- prov->full_name, prov->caps, prov);
-
- prov->next = g_provider_list;
- g_provider_list = prov;
-
- return 0;
-}
-
-
-/*
- * time_pps_create - create PPS handle from file descriptor
- *
- * This is the initial entrypoint of PPSAPI from the client. Note
- * to maintain source compatibility with Unix, the input file
- * descriptor really is a descriptor from the C runtime low-numbered
- * descriptor namespace, though it may have been converted from a
- * native Windows HANDLE using _open_osfhandle().
- */
-static inline int
-time_pps_create(
- int filedes,/* device file descriptor */
- pps_handle_t * phandle /* returned handle */
- )
-{
- HANDLE winhandle;
- char * dlls;
- char * dll;
- char * pch;
- ppsapi_provider * prov;
- pps_handle_t ppshandle;
- int err;
-
- if (NULL == phandle)
- RETURN_PPS_ERRNO(EFAULT);
-
- winhandle = (HANDLE)_get_osfhandle(filedes);
- fprintf(stderr, "time_pps_create(%d) got winhandle %p\n", filedes, winhandle);
- if (INVALID_HANDLE_VALUE == winhandle)
- RETURN_PPS_ERRNO(EBADF);
-
- /*
- * For initial testing the list of PPSAPI backend
- * providers is provided by the environment variable
- * PPSAPI_DLLS, separated by semicolons such as
- * PPSAPI_DLLS=c:\ntp\serial_ppsapi.dll;..\parport_ppsapi.dll
- * There are a million better ways, such as a well-known
- * registry key under which a value is created for each
- * provider DLL installed, or even a platform-specific
- * ntp.conf directive or command-line switch.
- */
- dlls = getenv("PPSAPI_DLLS");
- if (dlls != NULL && NULL == g_provider_list) {
- dlls = dll = _strdup(dlls);
- fprintf(stderr, "getenv(PPSAPI_DLLS) gives %s\n", dlls);
- } else
- dlls = dll = NULL;
-
- while (dll != NULL && dll[0]) {
- pch = strchr(dll, ';');
- if (pch != NULL)
- *pch = 0;
- err = load_pps_provider(dll);
- if (err) {
- fprintf(stderr, "load_pps_provider(%s) got errno %d\n", dll, err);
- RETURN_PPS_ERRNO(err);
- }
- dll = (NULL == pch)
- ? NULL
- : pch + 1;
- }
-
- if (NULL != dlls)
- free(dlls);
- dlls = dll = NULL;
-
- /*
- * Hand off to each provider in turn until one returns a PPS
- * handle or they've all declined.
- */
- for (prov = g_provider_list; prov != NULL; prov = prov->next) {
- ppshandle = 0;
- g_curr_provider = prov;
- err = (*prov->ptime_pps_create)(winhandle, &ppshandle);
- g_curr_provider = NULL;
- fprintf(stderr, "%s prov_time_pps_create(%p) returned %d\n",
- prov->short_name, winhandle, err);
- if (!err && ppshandle) {
- *phandle = ppshandle;
- return 0;
- }
- }
-
- fprintf(stderr, "PPSAPI provider list %p\n", g_provider_list);
-
- RETURN_PPS_ERRNO(ENOEXEC);
-}
-
-
-/*
- * release PPS handle
- */
-
-static inline int
-time_pps_destroy(
- pps_handle_t handle
- )
-{
- pps_unit_t * punit;
- int err;
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- err = (*punit->provider->ptime_pps_destroy)(punit, punit->context);
-
- free(punit);
-
- if (err)
- RETURN_PPS_ERRNO(err);
- else
- return 0;
-}
-
-/*
- * set parameters for handle
- */
-
-static inline int
-time_pps_setparams(
- pps_handle_t handle,
- const pps_params_t *params
- )
-{
- pps_unit_t * punit;
- int err;
-
- /*
- * Check for valid arguments and set parameters.
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- if (NULL == params)
- RETURN_PPS_ERRNO(EFAULT);
-
- err = (*punit->provider->ptime_pps_setparams)(punit, punit->context, params);
-
- if (err)
- RETURN_PPS_ERRNO(err);
- else
- return 0;
-}
-
-/*
- * get parameters for handle
- */
-
-static inline int
-time_pps_getparams(
- pps_handle_t handle,
- pps_params_t *params_buf
- )
-{
- pps_unit_t * punit;
-
- /*
- * Check for valid arguments and get parameters.
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- if (NULL == params_buf)
- RETURN_PPS_ERRNO(EFAULT);
-
- *params_buf = punit->params;
- return 0;
-}
-
-
-/*
- * time_pps_getcap - get capabilities for handle
- */
-static inline int
-time_pps_getcap(
- pps_handle_t handle,
- int *pmode
- )
-{
- pps_unit_t * punit;
-
- /*
- * Check for valid arguments and get capabilities.
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- if (NULL == pmode)
- RETURN_PPS_ERRNO(EFAULT);
-
- *pmode = punit->provider->caps;
- return 0;
-}
-
-/*
- * Fetch timestamps
- */
-
-static inline int
-time_pps_fetch(
- pps_handle_t handle,
- const int tsformat,
- pps_info_t * pinfo,
- const struct timespec * ptimeout
- )
-{
- pps_unit_t * punit;
- int err;
-
- /*
- * Check for valid arguments and fetch timestamps
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- if (NULL == pinfo)
- RETURN_PPS_ERRNO(EFAULT);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- err = (*punit->provider->ptime_pps_fetch)(punit,
- punit->context,
- tsformat,
- pinfo,
- ptimeout);
-
- if (err)
- RETURN_PPS_ERRNO(err);
- else
- return 0;
-}
-
-/*
- * time_pps_kcbind - specify kernel consumer
- *
- * Not supported so far by Windows.
- */
-
-static inline int
-time_pps_kcbind(
- pps_handle_t handle,
- const int kernel_consumer,
- const int edge, const int tsformat
- )
-{
- pps_unit_t * punit;
- int err;
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- err = (*punit->provider->ptime_pps_kcbind)(
- punit,
- punit->context,
- kernel_consumer,
- edge,
- tsformat);
-
- if (err)
- RETURN_PPS_ERRNO(err);
- else
- return 0;
-}
-
-
-#endif /* TIMEPPS_H */
diff --git a/ports/winnt/include/unistd.h b/ports/winnt/include/unistd.h
deleted file mode 100644
index 5e1599737300..000000000000
--- a/ports/winnt/include/unistd.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
diff --git a/ports/winnt/include/win32_io.h b/ports/winnt/include/win32_io.h
deleted file mode 100644
index 8f67ca1d1896..000000000000
--- a/ports/winnt/include/win32_io.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef WIN32_IO_H
-#define WIN32_IO_H
-
-extern void InitSockets(void);
-extern void connection_reset_fix(SOCKET fd, sockaddr_u *addr);
-
-#endif /* WIN32_IO_H */
diff --git a/ports/winnt/instsrv/instsrv.c b/ports/winnt/instsrv/instsrv.c
deleted file mode 100644
index b3acc9f3921d..000000000000
--- a/ports/winnt/instsrv/instsrv.c
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * File: instsrv.c
- * Purpose: To install a new service and to insert registry entries.
- *
- */
-#ifndef __RPCASYNC_H__
-#define __RPCASYNC_H__ /* Skip asynch rpc inclusion */
-#endif
-
-#include <windows.h>
-#include <stdio.h>
-
-#define PERR(api) printf("\n%s: Error %d from %s on line %d", \
- __FILE__, GetLastError(), api, __LINE__);
-
-#define MSG_FOR_ACCESS_DENIED "You aren't authorized to do this - please see your system Administrator"
-#define MSG_1_FOR_BAD_PATH "The fully qualified path name to the .exe must be given, and"
-#define MSG_2_FOR_BAD_PATH " the drive letter must be for a fixed disk (e.g., not a net drive)"
-
-SC_HANDLE schService;
-SC_HANDLE schSCManager;
-int ok2;
-
-VOID DisplayHelp(VOID);
-
-/* --------------------------------------------------------------------------------------- */
-
-int InstallService(LPCTSTR serviceName, LPCTSTR displayName, LPCTSTR serviceExe)
-{
- LPCTSTR lpszBinaryPathName = serviceExe;
- TCHAR lpszRootPathName[] ="?:\\";
-
- if ( (':' != *(lpszBinaryPathName+1)) || ('\\' != *(lpszBinaryPathName+2)) )
- { printf("\n%s",MSG_1_FOR_BAD_PATH);
- printf("\n%s\n",MSG_2_FOR_BAD_PATH);
- return 1;
- }
-
- #define DRIVE_TYPE_INDETERMINATE 0
- #define ROOT_DIR_DOESNT_EXIST 1
-
- *lpszRootPathName = *(lpszBinaryPathName+0) ;
-
- switch ( GetDriveType(lpszRootPathName) )
- {
- case DRIVE_FIXED :
- { // OK
- break;
- }
- case ROOT_DIR_DOESNT_EXIST :
- { printf("\n%s",MSG_1_FOR_BAD_PATH);
- printf("\n the root directory where the .exe is specified to be must exist, and");
- printf("\n%s\n",MSG_2_FOR_BAD_PATH);
- return 1;
- }
- case DRIVE_TYPE_INDETERMINATE :
- case DRIVE_REMOVABLE :
- case DRIVE_REMOTE :
- case DRIVE_CDROM :
- case DRIVE_RAMDISK :
- { printf("\n%s",MSG_1_FOR_BAD_PATH);
- printf("\n%s\n",MSG_2_FOR_BAD_PATH);
- return 1;
- }
- default :
- { printf("\n%s",MSG_1_FOR_BAD_PATH);
- printf("\n%s\n",MSG_2_FOR_BAD_PATH);
- return 1;
- }
- }
-
- if (INVALID_HANDLE_VALUE == CreateFile(lpszBinaryPathName,
- GENERIC_READ,
- FILE_SHARE_READ,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL))
- {
- printf("\n%s",MSG_1_FOR_BAD_PATH);
- printf("\n the file must exist, and");
- printf("\n%s\n",MSG_2_FOR_BAD_PATH);
- return 1;
- }
-
- schService = CreateService(
- schSCManager, // SCManager database
- serviceName, // name of service
- displayName, // name to display
- SERVICE_ALL_ACCESS, // desired access
- SERVICE_WIN32_OWN_PROCESS, // service type
- SERVICE_AUTO_START, // start type
- SERVICE_ERROR_NORMAL, // error control type
- lpszBinaryPathName, // service's binary
- NULL, // no load ordering group
- NULL, // no tag identifier
- NULL, // no dependencies
- NULL, // Local System account
- NULL); // null password
-
- if (NULL == schService)
- { switch (GetLastError())
- {
- case ERROR_ACCESS_DENIED :
- { printf("\n%s",MSG_FOR_ACCESS_DENIED);
- break;
- }
- case ERROR_SERVICE_EXISTS :
- { printf("\nThe %s service is already installed",serviceName);
- printf("\nRemove it first if you need to re-install a new version\n");
- break;
- }
- default :
- { PERR("CreateService");
- }
- }
- return 1;
- }
- else
-
- CloseServiceHandle(schService);
- return 0;
-}
-
-/* --------------------------------------------------------------------------------------- */
-
-int RemoveService(LPCTSTR serviceName)
-{
- {
- #define SZ_ENUM_BUF 4096
- ENUM_SERVICE_STATUS essServiceStatus[SZ_ENUM_BUF];
- DWORD dwBufSize = sizeof(essServiceStatus);
- DWORD dwBytesNeeded = 0;
- DWORD dwServicesReturned = 0;
- DWORD dwResumeHandle = 0;
- DWORD dwI = 0;
- BOOLEAN bFound = FALSE;
-
- if (!EnumServicesStatus(schSCManager,
- SERVICE_WIN32,
- SERVICE_ACTIVE,
- (LPENUM_SERVICE_STATUS)&essServiceStatus,
- dwBufSize,
- &dwBytesNeeded,
- &dwServicesReturned,
- &dwResumeHandle))
- { switch (GetLastError())
- {
- case ERROR_ACCESS_DENIED :
- { printf("\n%s",MSG_FOR_ACCESS_DENIED);
- break;
- }
- default :
- { PERR("EnumServicesStatus");
- }
- }
- return 1;
- }
-
- for (dwI=0; dwI<dwServicesReturned; dwI++)
- { if(0 == _stricmp(essServiceStatus[dwI].lpServiceName,serviceName))
- { bFound = TRUE;
- break;
- }
- }
-
- if (bFound)
- { printf("\nThe %s service cannot be removed until it has been stopped.",serviceName);
- printf("\nTo stop the %s service, use the Stop button in the Control",serviceName);
- printf("\n Panel Services applet\n");
- return 1;
- }
- }
-
- schService = OpenService(schSCManager,
- serviceName,
- SERVICE_ALL_ACCESS);
- if (NULL == schService)
- { switch (GetLastError())
- {
- case ERROR_ACCESS_DENIED :
- { printf("\n%s",MSG_FOR_ACCESS_DENIED);
- break;
- }
- case ERROR_SERVICE_DOES_NOT_EXIST :
- { printf("\nThe %s service is not installed, so cannot be removed\n",serviceName);
- break;
- }
- default :
- { PERR("OpenService");
- }
- }
- return 1;
- }
-
- if (DeleteService(schService))
- { printf("\nDelete of Service \"Network Time Protocol\" was SUCCESSFUL\n");
- return 0;
- }
- else
- { switch (GetLastError())
- {
- case ERROR_ACCESS_DENIED :
- { printf("\n%s",MSG_FOR_ACCESS_DENIED);
- break;
- }
- default :
- { PERR("DeleteService");
- }
- }
- return 1;
- }
-}
-
-/* --------------------------------------------------------------------------------------- */
-
-int addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL)
-{
- HKEY hk; /* registry key handle */
- DWORD dwData;
- BOOL bSuccess;
- char regarray[200];
- char *lpregarray = regarray;
-
- /* When an application uses the RegisterEventSource or OpenEventLog
- function to get a handle of an event log, the event loggging service
- searches for the specified source name in the registry. You can add a
- new source name to the registry by opening a new registry subkey
- under the Application key and adding registry values to the new
- subkey. */
-
- strcpy(lpregarray, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\");
- strcat(lpregarray, pszAppname);
- /* Create a new key for our application */
- bSuccess = RegCreateKey(HKEY_LOCAL_MACHINE, lpregarray, &hk);
- if(bSuccess != ERROR_SUCCESS)
- {
- PERR("RegCreateKey");
- return 1;
- }
-
- /* Add the Event-ID message-file name to the subkey. */
- bSuccess = RegSetValueEx(hk, /* subkey handle */
- "EventMessageFile", /* value name */
- 0, /* must be zero */
- REG_EXPAND_SZ, /* value type */
- (LPBYTE) pszMsgDLL, /* address of value data */
- strlen(pszMsgDLL) + 1); /* length of value data */
- if(bSuccess != ERROR_SUCCESS)
- {
- PERR("RegSetValueEx");
- return 1;
- }
-
- /* Set the supported types flags and addit to the subkey. */
- dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
- EVENTLOG_INFORMATION_TYPE;
- bSuccess = RegSetValueEx(hk, /* subkey handle */
- "TypesSupported", /* value name */
- 0, /* must be zero */
- REG_DWORD, /* value type */
- (LPBYTE) &dwData, /* address of value data */
- sizeof(DWORD)); /* length of value data */
- if(bSuccess != ERROR_SUCCESS)
- {
- PERR("RegSetValueEx");
- return 1;
- }
- RegCloseKey(hk);
- return 0;
-}
-
-/* --------------------------------------------------------------------------------------- */
-
-int addKeysToRegistry()
-
-{
- HKEY hk; /* registry key handle */
- BOOL bSuccess;
- char myarray[200];
- char *lpmyarray = myarray;
- int arsize = 0;
-
- /* now add the depends on service key */
-
- /* Create a new key for our application */
- bSuccess = RegCreateKey(HKEY_LOCAL_MACHINE,
- "SYSTEM\\CurrentControlSet\\Services\\NTP", &hk);
- if(bSuccess != ERROR_SUCCESS)
- {
- PERR("RegCreateKey");
- return 1;
- }
-
- strcpy(lpmyarray,"TcpIp");
- lpmyarray = lpmyarray + 6;
- arsize = arsize + 6;
- strcpy(lpmyarray,"Afd");
- lpmyarray = lpmyarray + 4;
- arsize = arsize + 4;
- arsize = arsize + 2;
- strcpy(lpmyarray,"\0\0");
-
- bSuccess = RegSetValueEx(hk, /* subkey handle */
- "DependOnService", /* value name */
- 0, /* must be zero */
- REG_MULTI_SZ, /* value type */
- (LPBYTE) &myarray, /* address of value data */
- arsize); /* length of value data */
- if(bSuccess != ERROR_SUCCESS)
- {
- PERR("RegSetValueEx");
- return 1;
- }
-
- RegCloseKey(hk);
- return 0;
-}
-
-/* --------------------------------------------------------------------------------------- */
-
-int main(int argc, char *argv[])
-{
- #define SZ_NAME_BUF 270 // 256 is max, add a little
- UCHAR ucNameBuf[SZ_NAME_BUF] = "NTP";
- LPTSTR lpszServName = (LPTSTR)&ucNameBuf;
-
- UCHAR ucDNameBuf[SZ_NAME_BUF] = "Network Time Protocol";
- LPTSTR lpszDispName = (LPTSTR)&ucDNameBuf;
-
-
- UCHAR ucExeNBuf[SZ_NAME_BUF] = "";
- LPTSTR lpszExeName = (LPTSTR)&ucExeNBuf;
-
- BOOL bRemovingService = FALSE;
- char *p;
-
- int ok = 0;
-
- // check if Win32s, if so, display notice and terminate
- if( GetVersion() & 0x80000000 )
- {
- MessageBox( NULL,
- "This application cannot run on Windows 3.1.\n"
- "This application will now terminate.",
- "NAMED",
- MB_OK | MB_ICONSTOP | MB_SETFOREGROUND );
- return( 1 );
- }
- if (argc == 2)
- bRemovingService = (!stricmp(argv[1], "remove"));
-
- if(!bRemovingService)
- {
-
-
- if (argc != 2)
- {
- DisplayHelp();
- return(1);
- }
-
- p=argv[1];
- if ( ('/' == *p)
- || ('-' == *p) )
- {
- DisplayHelp();
- return(1);
- }
-
-
- }
-
- if (strlen(argv[1]) > 256)
- {
- printf("\nThe service name cannot be longer than 256 characters\n");
- return(1);
- }
-
-
-
- bRemovingService = (!stricmp(argv[1], "remove"));
- schSCManager = OpenSCManager(
- NULL, // machine (NULL == local)
- NULL, // database (NULL == default)
- SC_MANAGER_ALL_ACCESS); // access required
-
- if (NULL == schSCManager)
- { switch (GetLastError())
- {
- case ERROR_ACCESS_DENIED :
- { printf("\n%s",MSG_FOR_ACCESS_DENIED);
- break;
- }
- default :
- { PERR("OpenSCManager");
- }
- }
- return (0);
- }
-
- if (bRemovingService)
- {
- ok = RemoveService(lpszServName);
- }
- else
- {
- /* get the exe name */
- strcpy(lpszExeName,argv[1]);
- ok = InstallService(lpszServName, lpszDispName, lpszExeName);
- }
-
- CloseServiceHandle(schSCManager);
-
- if (!bRemovingService)
- {
- if (ok == 0)
- { /* Set the Event-ID message-file name. */
- ok = addSourceToRegistry("NTP", lpszExeName);
- if (ok == 0)
- ok = addKeysToRegistry();
- else return ok;
-
- if (ok == 0)
- {
- printf("\nThe \"Network Time Protocol\" service was successfully created.\n");
- printf("\nDon't forget!!! You must now go to the Control Panel and");
- printf("\n use the Services applet to change the account name and");
- printf("\n password that the NTP Service will use when");
- printf("\n it starts.");
- printf("\nTo do this: use the Startup button in the Services applet,");
- printf("\n and (for example) specify the desired account and");
- printf("\n correct password.");
- printf("\nAlso, use the Services applet to ensure this newly installed");
- printf("\n service starts automatically on bootup.\n");
- return 0;
- }
- }
- else return ok;
- }
- return 0;
-}
-
-/* --------------------------------------------------------------------------------------- */
-
-VOID DisplayHelp(VOID)
-{
- printf("Installs or removes the NTP service.\n");
- printf("To install the NTP service,\n");
- printf("type INSTSRV <path> \n");
- printf("Where:\n");
- printf(" path Absolute path to the NTP service, name.exe. You must\n");
- printf(" use a fully qualified path and the drive letter must be for a\n");
- printf(" fixed, local drive.\n\n");
- printf("For example, INSTSRV i:\\winnt\\system32\\ntpd.exe\n");
- printf("To remove the NTP service,\n");
- printf("type INSTSRV remove \n");
-
-}
-
-/* EOF */
diff --git a/ports/winnt/libntp/MSG00001.bin b/ports/winnt/libntp/MSG00001.bin
deleted file mode 100644
index 320ee54d1e2c..000000000000
--- a/ports/winnt/libntp/MSG00001.bin
+++ /dev/null
Binary files differ
diff --git a/ports/winnt/libntp/SetSystemTime.c b/ports/winnt/libntp/SetSystemTime.c
deleted file mode 100644
index 8cb43173f22e..000000000000
--- a/ports/winnt/libntp/SetSystemTime.c
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#include <config.h>
-
-#include "clockstuff.h"
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-
-pset_tod_using set_tod_using = NULL;
-
-int
-ntp_set_tod(
- struct timeval *tv,
- void *tzp
- )
-{
- SYSTEMTIME st;
- union {
- FILETIME ft;
- ULONGLONG ull;
- } t;
-
- UNUSED_ARG(tzp);
-
- t.ull = FILETIME_1970 +
- (ULONGLONG)tv->tv_sec * 10 * 1000 * 1000 +
- (ULONGLONG)tv->tv_usec * 10;
-
- if (!FileTimeToSystemTime(&t.ft, &st) || !SetSystemTime(&st)) {
- msyslog(LOG_ERR, "SetSystemTime failed: %m");
- return -1;
- }
-
- return 0;
-}
diff --git a/ports/winnt/libntp/getclock.c b/ports/winnt/libntp/getclock.c
deleted file mode 100644
index 68496bd53078..000000000000
--- a/ports/winnt/libntp/getclock.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * getclock.c - Emulate Unix getclock(3) nanosecond interface for libntp/ntpd
- */
-#include "config.h"
-
-#include "ntp_unixtime.h"
-#include "clockstuff.h"
-#include "ntp_stdlib.h"
-
-/*
- * getclock() is in libntp. To use interpolation,
- * ports/winnt/ntpd/nt_clockstuff.c overrides GetSystemTimeAsFileTime
- * via the pointer get_sys_time_as_filetime.
- */
-PGSTAFT get_sys_time_as_filetime;
-PGSTAFT pGetSystemTimePreciseAsFileTime;
-
-
-int
-getclock(
- int clktyp,
- struct timespec *ts
- )
-{
- union {
- FILETIME ft;
- ULONGLONG ull;
- } uNow;
-
- if (clktyp != TIMEOFDAY) {
- TRACE(1, ("getclock() supports only TIMEOFDAY clktyp\n"));
- errno = EINVAL;
- return -1;
- }
-
- (*get_sys_time_as_filetime)(&uNow.ft);
-
- /*
- * Convert the hecto-nano second time to timespec format
- */
- uNow.ull -= FILETIME_1970;
- ts->tv_sec = (time_t)( uNow.ull / HECTONANOSECONDS);
- ts->tv_nsec = (long)(( uNow.ull % HECTONANOSECONDS) * 100);
-
- return 0;
-}
-
-
-void
-init_win_precise_time(void)
-{
- HANDLE hDll;
- FARPROC pfn;
-
- hDll = LoadLibrary("kernel32");
- pfn = GetProcAddress(hDll, "GetSystemTimePreciseAsFileTime");
- if (NULL != pfn) {
- pGetSystemTimePreciseAsFileTime = (PGSTAFT)pfn;
- get_sys_time_as_filetime = pGetSystemTimePreciseAsFileTime;
- } else {
- get_sys_time_as_filetime = &GetSystemTimeAsFileTime;
- }
-}
diff --git a/ports/winnt/libntp/messages.h b/ports/winnt/libntp/messages.h
deleted file mode 100644
index 475371169a2a..000000000000
--- a/ports/winnt/libntp/messages.h
+++ /dev/null
@@ -1,199 +0,0 @@
- /*
- Microsoft Developer Support
- Copyright (c) 1992 Microsoft Corporation
-
- This file contains the message definitions for the Win32
- syslog support messages for the nntp firewall
--------------------------------------------------------------------------
- HEADER SECTION
-
- The header section defines names and language identifiers for use
- by the message definitions later in this file. The MessageIdTypedef,
- SeverityNames, FacilityNames, and LanguageNames keywords are
- optional and not required.
-
-
-
- The MessageIdTypedef keyword gives a typedef name that is used in a
- type cast for each message code in the generated include file. Each
- message code appears in the include file with the format: #define
- name ((type) 0xnnnnnnnn) The default value for type is empty, and no
- type cast is generated. It is the programmer's responsibility to
- specify a typedef statement in the application source code to define
- the type. The type used in the typedef must be large enough to
- accomodate the entire 32-bit message code.
-
-
-
- The SeverityNames keyword defines the set of names that are allowed
- as the value of the Severity keyword in the message definition. The
- set is delimited by left and right parentheses. Associated with each
- severity name is a number that, when shifted left by 30, gives the
- bit pattern to logical-OR with the Facility value and MessageId
- value to form the full 32-bit message code. The default value of
- this keyword is:
-
- SeverityNames=(
- Success=0x0
- Informational=0x1
- Warning=0x2
- Error=0x3
- )
-
- Severity values occupy the high two bits of a 32-bit message code.
- Any severity value that does not fit in two bits is an error. The
- severity codes can be given symbolic names by following each value
- with :name
-
-
-FacilityNames=(System=0x0:FACILITY_SYSTEM
- Runtime=0x2:FACILITY_RUNTIME
- Stubs=0x3:FACILITY_STUBS
- Io=0x4:FACILITY_IO_ERROR_CODE
- )
-
- The FacilityNames keyword defines the set of names that are allowed
- as the value of the Facility keyword in the message definition. The
- set is delimited by left and right parentheses. Associated with each
- facility name is a number that, when shift it left by 16 bits, gives
- the bit pattern to logical-OR with the Severity value and MessageId
- value to form the full 32-bit message code. The default value of
- this keyword is:
-
- FacilityNames=(
- System=0x0FF
- Application=0xFFF
- )
-
- Facility codes occupy the low order 12 bits of the high order
- 16-bits of a 32-bit message code. Any facility code that does not
- fit in 12 bits is an error. This allows for 4,096 facility codes.
- The first 256 codes are reserved for use by the system software. The
- facility codes can be given symbolic names by following each value
- with :name
-
-
- The LanguageNames keyword defines the set of names that are allowed
- as the value of the Language keyword in the message definition. The
- set is delimited by left and right parentheses. Associated with each
- language name is a number and a file name that are used to name the
- generated resource file that contains the messages for that
- language. The number corresponds to the language identifier to use
- in the resource table. The number is separated from the file name
- with a colon. The initial value of LanguageNames is:
-
- LanguageNames=(English=1:MSG00001)
-
- Any new names in the source file which don't override the built-in
- names are added to the list of valid languages. This allows an
- application to support private languages with descriptive names.
-
-
--------------------------------------------------------------------------
- MESSAGE DEFINITION SECTION
-
- Following the header section is the body of the Message Compiler
- source file. The body consists of zero or more message definitions.
- Each message definition begins with one or more of the following
- statements:
-
- MessageId = [number|+number]
- Severity = severity_name
- Facility = facility_name
- SymbolicName = name
-
- The MessageId statement marks the beginning of the message
- definition. A MessageID statement is required for each message,
- although the value is optional. If no value is specified, the value
- used is the previous value for the facility plus one. If the value
- is specified as +number then the value used is the previous value
- for the facility, plus the number after the plus sign. Otherwise, if
- a numeric value is given, that value is used. Any MessageId value
- that does not fit in 16 bits is an error.
-
- The Severity and Facility statements are optional. These statements
- specify additional bits to OR into the final 32-bit message code. If
- not specified they default to the value last specified for a message
- definition. The initial values prior to processing the first message
- definition are:
-
- Severity=Success
- Facility=Application
-
- The value associated with Severity and Facility must match one of
- the names given in the FacilityNames and SeverityNames statements in
- the header section. The SymbolicName statement allows you to
- associate a C/C++ symbolic constant with the final 32-bit message
- code.
- */
-//
-// Values are 32 bit values laid out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-
-//
-// Define the severity codes
-//
-#define STATUS_SEVERITY_WARNING 0x2
-#define STATUS_SEVERITY_SUCCESS 0x0
-#define STATUS_SEVERITY_INFORMATIONAL 0x1
-#define STATUS_SEVERITY_ERROR 0x3
-
-
-//
-// MessageId: NTP_ERROR
-//
-// MessageText:
-//
-// %1
-//
-#define NTP_ERROR ((DWORD)0xC0000001L)
-
-//
-// MessageId: NTP_WARNING
-//
-// MessageText:
-//
-// %1
-//
-//
-#define NTP_WARNING ((DWORD)0x80000002L)
-
-//
-// MessageId: NTP_INFO
-//
-// MessageText:
-//
-// %1
-//
-//
-//
-//
-#define NTP_INFO ((DWORD)0x40000003L)
-
diff --git a/ports/winnt/libntp/messages.mc b/ports/winnt/libntp/messages.mc
deleted file mode 100644
index 3a6bc7d22c0f..000000000000
--- a/ports/winnt/libntp/messages.mc
+++ /dev/null
@@ -1,161 +0,0 @@
-; /*
-; Microsoft Developer Support
-; Copyright (c) 1992 Microsoft Corporation
-;
-; This file contains the message definitions for the Win32
-; syslog support messages for the nntp firewall
-
-;-------------------------------------------------------------------------
-; HEADER SECTION
-;
-; The header section defines names and language identifiers for use
-; by the message definitions later in this file. The MessageIdTypedef,
-; SeverityNames, FacilityNames, and LanguageNames keywords are
-; optional and not required.
-;
-;
-MessageIdTypedef=DWORD
-;
-; The MessageIdTypedef keyword gives a typedef name that is used in a
-; type cast for each message code in the generated include file. Each
-; message code appears in the include file with the format: #define
-; name ((type) 0xnnnnnnnn) The default value for type is empty, and no
-; type cast is generated. It is the programmer's responsibility to
-; specify a typedef statement in the application source code to define
-; the type. The type used in the typedef must be large enough to
-; accomodate the entire 32-bit message code.
-;
-;
-SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
- Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
- Warning=0x2:STATUS_SEVERITY_WARNING
- Error=0x3:STATUS_SEVERITY_ERROR
- )
-;
-; The SeverityNames keyword defines the set of names that are allowed
-; as the value of the Severity keyword in the message definition. The
-; set is delimited by left and right parentheses. Associated with each
-; severity name is a number that, when shifted left by 30, gives the
-; bit pattern to logical-OR with the Facility value and MessageId
-; value to form the full 32-bit message code. The default value of
-; this keyword is:
-;
-; SeverityNames=(
-; Success=0x0
-; Informational=0x1
-; Warning=0x2
-; Error=0x3
-; )
-;
-; Severity values occupy the high two bits of a 32-bit message code.
-; Any severity value that does not fit in two bits is an error. The
-; severity codes can be given symbolic names by following each value
-; with :name
-;
-;
-;FacilityNames=(System=0x0:FACILITY_SYSTEM
-; Runtime=0x2:FACILITY_RUNTIME
-; Stubs=0x3:FACILITY_STUBS
-; Io=0x4:FACILITY_IO_ERROR_CODE
-; )
-;
-; The FacilityNames keyword defines the set of names that are allowed
-; as the value of the Facility keyword in the message definition. The
-; set is delimited by left and right parentheses. Associated with each
-; facility name is a number that, when shift it left by 16 bits, gives
-; the bit pattern to logical-OR with the Severity value and MessageId
-; value to form the full 32-bit message code. The default value of
-; this keyword is:
-;
-; FacilityNames=(
-; System=0x0FF
-; Application=0xFFF
-; )
-;
-; Facility codes occupy the low order 12 bits of the high order
-; 16-bits of a 32-bit message code. Any facility code that does not
-; fit in 12 bits is an error. This allows for 4,096 facility codes.
-; The first 256 codes are reserved for use by the system software. The
-; facility codes can be given symbolic names by following each value
-; with :name
-;
-;
-; The LanguageNames keyword defines the set of names that are allowed
-; as the value of the Language keyword in the message definition. The
-; set is delimited by left and right parentheses. Associated with each
-; language name is a number and a file name that are used to name the
-; generated resource file that contains the messages for that
-; language. The number corresponds to the language identifier to use
-; in the resource table. The number is separated from the file name
-; with a colon. The initial value of LanguageNames is:
-;
-; LanguageNames=(English=1:MSG00001)
-;
-; Any new names in the source file which don't override the built-in
-; names are added to the list of valid languages. This allows an
-; application to support private languages with descriptive names.
-;
-;
-;-------------------------------------------------------------------------
-; MESSAGE DEFINITION SECTION
-;
-; Following the header section is the body of the Message Compiler
-; source file. The body consists of zero or more message definitions.
-; Each message definition begins with one or more of the following
-; statements:
-;
-; MessageId = [number|+number]
-; Severity = severity_name
-; Facility = facility_name
-; SymbolicName = name
-;
-; The MessageId statement marks the beginning of the message
-; definition. A MessageID statement is required for each message,
-; although the value is optional. If no value is specified, the value
-; used is the previous value for the facility plus one. If the value
-; is specified as +number then the value used is the previous value
-; for the facility, plus the number after the plus sign. Otherwise, if
-; a numeric value is given, that value is used. Any MessageId value
-; that does not fit in 16 bits is an error.
-;
-; The Severity and Facility statements are optional. These statements
-; specify additional bits to OR into the final 32-bit message code. If
-; not specified they default to the value last specified for a message
-; definition. The initial values prior to processing the first message
-; definition are:
-;
-; Severity=Success
-; Facility=Application
-;
-; The value associated with Severity and Facility must match one of
-; the names given in the FacilityNames and SeverityNames statements in
-; the header section. The SymbolicName statement allows you to
-; associate a C/C++ symbolic constant with the final 32-bit message
-; code.
-; */
-
-MessageId=0x1
-Severity=Error
-Facility=Application
-SymbolicName=NTP_ERROR
-Language=English
-%1
-.
-
-MessageId=0x2
-Severity=Warning
-Facility=Application
-SymbolicName=NTP_WARNING
-Language=English
-%1
-
-.
-MessageId=0x3
-Severity=Informational
-Facility=Application
-SymbolicName=NTP_INFO
-Language=English
-%1
-
-
-
diff --git a/ports/winnt/libntp/messages.rc b/ports/winnt/libntp/messages.rc
deleted file mode 100644
index 0abcb0fa2c57..000000000000
--- a/ports/winnt/libntp/messages.rc
+++ /dev/null
@@ -1,2 +0,0 @@
-LANGUAGE 0x9,0x1
-1 11 "MSG00001.bin"
diff --git a/ports/winnt/libntp/randfile.c b/ports/winnt/libntp/randfile.c
deleted file mode 100644
index 7de80b80d6a4..000000000000
--- a/ports/winnt/libntp/randfile.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Make sure that there is a good source of random characters
- * so that OpenSSL can work properly and securely.
- */
-
-#include <config.h>
-#include <wincrypt.h>
-
-#include <stdio.h>
-
-unsigned int getrandom_chars(int desired, unsigned char *buf, int lenbuf);
-BOOL create_random_file(char *filename);
-
-BOOL
-init_randfile()
-{
- FILE *rf;
- char *randfile;
- char *homedir;
- char tmp[256];
- /* See if the environmental variable RANDFILE is defined
- * and the file exists
- */
- randfile = getenv("RANDFILE");
- if (randfile != NULL) {
- rf = fopen(randfile, "rb");
- if (rf != NULL) {
- fclose(rf);
- return (TRUE);
- }
- else {
- /* The environmental variable exists but not the file */
- return (create_random_file(randfile));
- }
- }
- /*
- * If the RANDFILE environmental variable does not exist,
- * see if the HOME enviromental variable exists and
- * a .rnd file is in there.
- */
- homedir = getenv("HOME");
- if (homedir != NULL &&
- (strlen(homedir) + 5 /* \.rnd */) < sizeof(tmp)) {
- snprintf(tmp, sizeof(tmp), "%s\\.rnd", homedir);
- rf = fopen(tmp, "rb");
- if (rf != NULL) {
- fclose(rf);
- return (TRUE);
- }
- else {
- /* The HOME environmental variable exists but not the file */
- return (create_random_file(tmp));
- }
- }
- /*
- * Final try. Look for it on the C:\ directory
- * NOTE: This is a really bad place for it security-wise
- * However, OpenSSL looks for it there if it can't find it elsewhere
- */
- rf = fopen("C:\\.rnd", "rb");
- if (rf != NULL) {
- fclose(rf);
- return (TRUE);
- }
- /* The file does not exist */
- return (create_random_file("C:\\.rnd"));
-}
-/*
- * Routine to create the random file with 1024 random characters
- */
-BOOL
-create_random_file(char *filename) {
- FILE *rf;
- int nchars;
- unsigned char buf[1025];
-
- nchars = getrandom_chars(1024, buf, sizeof(buf));
- rf = fopen(filename, "wb");
- if (rf == NULL)
- return (FALSE);
- fwrite(buf, sizeof(unsigned char), nchars, rf);
- fclose(rf);
- return (TRUE);
-}
-
-unsigned int
-getrandom_chars(int desired, unsigned char *buf, int lenbuf) {
- HCRYPTPROV hcryptprov;
- BOOL err;
-
- if (buf == NULL || lenbuf <= 0 || desired > lenbuf)
- return (0);
- /*
- * The first time we just try to acquire the context
- */
- err = CryptAcquireContext(&hcryptprov, NULL, NULL, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT);
- if (!err){
- return (0);
- }
- if (!CryptGenRandom(hcryptprov, desired, buf)) {
- CryptReleaseContext(hcryptprov, 0);
- return (0);
- }
-
- CryptReleaseContext(hcryptprov, 0);
- return (desired);
-}
-
diff --git a/ports/winnt/libntp/setpriority.c b/ports/winnt/libntp/setpriority.c
deleted file mode 100644
index 52ab78529422..000000000000
--- a/ports/winnt/libntp/setpriority.c
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <config.h>
-#include <stdio.h>
-#include <sys/resource.h> /* our private version */
-#include "ntp_stdlib.h"
-#include "ntp_syslog.h"
-#include "ntp_debug.h"
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "clockstuff.h"
-
-
-/*
- * setpriority
- *
- * to reduce the #ifdef forest in the portable code,
- * we emulate the BSD setpriority interface:
- *
- * if (-1 == setpriority(PRIO_PROCESS, 0, NTP_PRIO))
- * msyslog(LOG_ERR, "setpriority() error: %m");
- *
- * However, since the Windows port of ntpd has always raised its
- * priority (to realtime if allowed, or silently downgraded to
- * high by the system if not) with or without -N. Changing that
- * now would endanger users who upgrade the binary without adding
- * -N to its invocation. Instsrv assumes ntpd.exe is installed
- * with no command-line arguments.
- *
- * This routine is used by utilities as well as ntpd itself, so
- * it checks if the priority is already high or realtime and
- * logs no complaints in that case, to avoid duplicating. ntpd
- * will have raised the priority to one of those in
- * init_winnt_time, while the utilities will rely on this
- * code.
- *
- */
-
-int setpriority(
- int which,
- int who,
- int prio
- )
-{
- BOOL success;
- DWORD prio_class;
-
- if (PRIO_PROCESS != which || who || NTP_PRIO != prio)
- TRACE(1, ("windows setpriority() clone needs work.\n"));
-
- prio_class = GetPriorityClass(GetCurrentProcess());
-
- if (HIGH_PRIORITY_CLASS == prio_class ||
- REALTIME_PRIORITY_CLASS == prio_class)
- return 0;
-
- success = SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
-
- if (!success) {
- msyslog(LOG_ERR, "Unable to raise priority: %m");
- errno = EPERM;
- return -1;
- }
-
- prio_class = GetPriorityClass(GetCurrentProcess());
-
- if (REALTIME_PRIORITY_CLASS == prio_class)
- msyslog(LOG_INFO, "Raised to realtime priority class");
- else if (HIGH_PRIORITY_CLASS == prio_class)
- msyslog(LOG_ERR, "Raised to high priority class, realtime "
- "requires Increase Scheduling Priority "
- "privilege (enabled with secpol.msc).");
- else
- msyslog(LOG_ERR, "Unexpected process priority class %d",
- prio_class);
-
- return 0;
-}
diff --git a/ports/winnt/libntp/syslog.c b/ports/winnt/libntp/syslog.c
deleted file mode 100644
index 71c90c237ec3..000000000000
--- a/ports/winnt/libntp/syslog.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
- * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
- * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* From BIND 9 lib/isc/win32/: syslog.c,v 1.6 2002/08/03 01:34:14 mayer */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <windows.h>
-#include <string.h>
-#include <stdlib.h>
-#include <syslog.h>
-
-#include <isc/strerror.h>
-#include <lib_strbuf.h>
-
-#include "ntp_stdlib.h"
-
-#include "messages.h"
-
-static HANDLE hAppLog = NULL;
-static FILE *log_stream;
-static int debug_level = 0;
-static char progname[51] = "NTP";
-static int logmask = 0;
-
-static struct dsn_c_pvt_sfnt {
- int val;
- const char *strval;
-} facilities[] = {
- { LOG_KERN, "kern" },
- { LOG_USER, "user" },
- { LOG_MAIL, "mail" },
- { LOG_DAEMON, "daemon" },
- { LOG_AUTH, "auth" },
- { LOG_SYSLOG, "syslog" },
- { LOG_LPR, "lpr" },
-#ifdef LOG_NEWS
- { LOG_NEWS, "news" },
-#endif
-#ifdef LOG_UUCP
- { LOG_UUCP, "uucp" },
-#endif
-#ifdef LOG_CRON
- { LOG_CRON, "cron" },
-#endif
-#ifdef LOG_AUTHPRIV
- { LOG_AUTHPRIV, "authpriv" },
-#endif
-#ifdef LOG_FTP
- { LOG_FTP, "ftp" },
-#endif
- { LOG_LOCAL0, "local0"},
- { LOG_LOCAL1, "local1"},
- { LOG_LOCAL2, "local2"},
- { LOG_LOCAL3, "local3"},
- { LOG_LOCAL4, "local4"},
- { LOG_LOCAL5, "local5"},
- { LOG_LOCAL6, "local6"},
- { LOG_LOCAL7, "local7"},
- { 0, NULL }
-};
-
-#if 0
-BOOL
-isc_syslog_facilityfromstring(const char *str, int *facilityp) {
- int i;
-
- REQUIRE(str != NULL);
- REQUIRE(facilityp != NULL);
-
- for (i = 0 ; facilities[i].strval != NULL ; i++) {
- if (strcasecmp(facilities[i].strval, str) == 0) {
- *facilityp = facilities[i].val;
- return (TRUE);
- }
- }
- return (FALSE);
-}
-#endif
-/*
- * Log to the NT Event Log
- */
-void
-syslog(int level, const char *fmt, ...) {
- va_list ap;
- char buf[1024];
- char *str[1];
-
- str[0] = buf;
-
- va_start(ap, fmt);
- vsnprintf(buf, sizeof(buf), fmt, ap);
- va_end(ap);
-
- /* Make sure that the channel is open to write the event */
- if (hAppLog == NULL) {
- openlog(progname, LOG_PID);
- }
- switch (level) {
- case LOG_INFO:
- case LOG_NOTICE:
- case LOG_DEBUG:
- ReportEvent(hAppLog, EVENTLOG_INFORMATION_TYPE, 0,
- NTP_INFO, NULL, 1, 0, str, NULL);
- break;
- case LOG_WARNING:
- ReportEvent(hAppLog, EVENTLOG_WARNING_TYPE, 0,
- NTP_WARNING, NULL, 1, 0, str, NULL);
- break;
- default:
- ReportEvent(hAppLog, EVENTLOG_ERROR_TYPE, 0,
- NTP_ERROR, NULL, 1, 0, str, NULL);
- break;
- }
-}
-
-/*
- * Initialize event logging
- */
-void
-openlog(const char *name, int flags, ...) {
- /* Get a handle to the Application event log */
- hAppLog = RegisterEventSource(NULL, progname);
- strlcpy(progname, name, sizeof(progname));
-}
-
-/*
- * Close the Handle to the application Event Log
- * We don't care whether or not we succeeded so ignore return values
- * In fact if we failed then we would have nowhere to put the message
- */
-void
-closelog() {
- DeregisterEventSource(hAppLog);
-}
-
-/*
- * Keep event logging synced with the current debug level
- */
-void
-ModifyLogLevel(int level) {
- debug_level = level;
-}
-/*
- * Set the log priority mask to the given value.
- * Return the previous priority mask
- * Note that this setting is ignored in Win32
- */
-int
-setlogmask(int maskpri) {
- int temp = logmask;
- logmask = maskpri;
- return (temp);
-}
-
-/*
- * Initialize logging for the port section of libbind.
- * Piggyback onto stream given.
- */
-void
-InitNTLogging(FILE *stream, int debug) {
- log_stream = stream;
- ModifyLogLevel(debug);
-}
-/*
- * This function is for reporting errors to the application
- * event log in case the regular syslog is not available
- * mainly during startup. It should not be used under normal
- * circumstances.
- */
-void
-NTReportError(const char *name, const char *str) {
- HANDLE hNTAppLog = NULL;
- const char *buf[1];
-
- buf[0] = str;
-
- hNTAppLog = RegisterEventSource(NULL, name);
-
- ReportEvent(hNTAppLog, EVENTLOG_ERROR_TYPE, 0,
- NTP_ERROR, NULL, 1, 0, buf, NULL);
-
- DeregisterEventSource(hNTAppLog);
-}
-
-
-/*
- * ntp_strerror() - provide strerror()-compatible wrapper for libisc's
- * isc__strerror(), which knows about Windows as well as
- * C runtime error messages.
- */
-
-char *
-ntp_strerror(
- int code
- )
-{
- char * buf;
-
- LIB_GETBUF(buf);
- isc__strerror(code, buf, LIB_BUFLENGTH);
-
- return buf;
-}
diff --git a/ports/winnt/libntp/termios.c b/ports/winnt/libntp/termios.c
deleted file mode 100644
index 3fe4e4859c01..000000000000
--- a/ports/winnt/libntp/termios.c
+++ /dev/null
@@ -1,789 +0,0 @@
-/* This file implements system calls that are not compatible with UNIX */
-/* Moved to libntp/termios.c */
-
-#include <config.h>
-#include <io.h>
-#include <stdio.h>
-
-#include "ntp.h"
-#include "ntp_tty.h"
-#include "lib_strbuf.h"
-#include "ntp_assert.h"
-#include "win32_io.h"
-
-#define MAX_SERIAL 255 /* COM1: - COM255: */
-
-typedef struct comhandles_tag {
- HANDLE h;
- size_t opens;
- HANDLE * dupes;
-} comhandles;
-
-comhandles * hnds; /* handle/dupes array */
-size_t c_hnds; /* current array size */
-
-/*
- * common_serial_open ensures duplicate opens of the same port
- * work by duplicating the handle for the 2nd open, allowing
- * refclock_atom to share a GPS refclock's comm port.
- */
-HANDLE common_serial_open(
- char * dev,
- char ** pwindev
- )
-{
- char * windev;
- HANDLE handle;
- size_t unit;
- size_t prev_c_hnds;
- size_t opens;
- char * pch;
-
- /*
- * This is odd, but we'll take any unix device path
- * by looking for the initial '/' and strip off everything
- * before the final digits, then translate that to COM__:
- * maintaining backward compatibility with NTP practice of
- * mapping unit 0 to the nonfunctional COM0:
- *
- * To ease the job of taking the windows COMx: device names
- * out of reference clocks, we'll also work with those
- * equanimously.
- */
-
- TRACE(1, ("common_serial_open given %s\n", dev));
-
- pch = NULL;
- if ('/' == dev[0]) {
- pch = dev + strlen(dev) - 1;
-
- if (isdigit(pch[0])) {
- while (isdigit(pch[0])) {
- pch--;
- }
- pch++;
- }
- TRACE(1, ("common_serial_open skipped to ending digits leaving %s\n", pch));
- } else if ('c' == tolower(dev[0])
- && 'o' == tolower(dev[1])
- && 'm' == tolower(dev[2])) {
- pch = dev + 3;
- TRACE(1, ("common_serial_open skipped COM leaving %s\n", pch));
- }
-
- if (!pch || !isdigit(pch[0])) {
- TRACE(1, ("not a digit: %s\n", pch ? pch : "[NULL]"));
- return INVALID_HANDLE_VALUE;
- }
-
- if (1 != sscanf(pch, "%d", &unit)
- || unit > MAX_SERIAL
- || unit < 0) {
- TRACE(1, ("sscanf failure of %s\n", pch));
- return INVALID_HANDLE_VALUE;
- }
-
-
- if (c_hnds < unit + 1) {
- prev_c_hnds = c_hnds;
- c_hnds = unit + 1;
- /* round up to closest multiple of 4 to avoid churn */
- c_hnds = (c_hnds + 3) & ~3;
- hnds = erealloc_zero(hnds, c_hnds * sizeof(hnds[0]),
- prev_c_hnds * sizeof(hnds[0]));
- }
-
- if (NULL == hnds[unit].h) {
- NTP_ENSURE(0 == hnds[unit].opens);
- LIB_GETBUF(windev);
- snprintf(windev, LIB_BUFLENGTH, "\\\\.\\COM%d", unit);
- TRACE(1, ("windows device %s\n", windev));
- *pwindev = windev;
- hnds[unit].h =
- CreateFile(
- windev,
- GENERIC_READ | GENERIC_WRITE,
- 0, /* sharing prohibited */
- NULL, /* default security */
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
- NULL);
- if (INVALID_HANDLE_VALUE == hnds[unit].h)
- hnds[unit].h = NULL;
- }
-
- if (NULL != hnds[unit].h) {
- /* think handle = dup(hnds[unit].h); */
- DuplicateHandle(
- GetCurrentProcess(),
- hnds[unit].h,
- GetCurrentProcess(),
- &handle,
- 0,
- FALSE,
- DUPLICATE_SAME_ACCESS
- );
- hnds[unit].opens++;
- opens = hnds[unit].opens;
- hnds[unit].dupes = erealloc(hnds[unit].dupes, opens *
- sizeof(hnds[unit].dupes[0]));
- hnds[unit].dupes[opens - 1] = handle;
- return handle;
- }
-
- return INVALID_HANDLE_VALUE;
-}
-
-
-/*
- * closeserial() is used in place of close by ntpd refclock I/O for ttys
- */
-int
-closeserial(int fd)
-{
- HANDLE h;
- BOOL found;
- size_t u;
- size_t d;
-
- h = (HANDLE)_get_osfhandle(fd);
- if (INVALID_HANDLE_VALUE == h) {
- errno = EBADF;
- return -1;
- }
-
- d = 0; /* silence potent. uninit. warning */
- found = FALSE;
- for (u = 0; u < c_hnds; u++) {
- for (d = 0; d < hnds[u].opens; d++) {
- if (hnds[u].dupes[d] == h) {
- found = TRUE;
- break;
- }
- }
- if (found)
- break;
- }
- if (found) {
- hnds[u].opens--;
- if (d < hnds[u].opens)
- memmove(&hnds[u].dupes[d],
- &hnds[u].dupes[d + 1],
- hnds[u].opens - d *
- sizeof(hnds[u].dupes[d]));
- if (0 == hnds[u].opens) {
- CloseHandle(hnds[u].h);
- hnds[u].h = NULL;
- }
- }
-
- return close(fd);
-}
-
-/*
- * isserialhandle() -- check if a handle is a COM port handle
- */
-int isserialhandle(
- HANDLE h
- )
-{
- size_t u;
- size_t d;
-
-
- for (u = 0; u < c_hnds; u++)
- for (d = 0; d < hnds[u].opens; d++)
- if (hnds[u].dupes[d] == h)
- return TRUE;
- return FALSE;
-}
-
-
-/*
- * tty_open - open serial port for refclock special uses
- *
- * This routine opens a serial port for and returns the
- * file descriptor if success and -1 if failure.
- */
-int tty_open(
- char *dev, /* device name pointer */
- int access, /* O_RDWR */
- int mode /* unused */
- )
-{
- HANDLE Handle;
- char * windev;
-
- /*
- * open communication port handle
- */
- windev = NULL;
- Handle = common_serial_open(dev, &windev);
- windev = (windev)
- ? windev
- : dev;
-
- if (Handle == INVALID_HANDLE_VALUE) {
- msyslog(LOG_ERR, "tty_open: device %s CreateFile error: %m", windev);
- errno = EMFILE; /* lie, lacking conversion from GetLastError() */
- return -1;
- }
-
- return (int)_open_osfhandle((int)Handle, _O_TEXT);
-}
-
-
-/*
- * refclock_open - open serial port for reference clock
- *
- * This routine opens a serial port for I/O and sets default options. It
- * returns the file descriptor or -1 indicating failure.
- */
-int refclock_open(
- char * dev, /* device name pointer */
- u_int speed, /* serial port speed (code) */
- u_int flags /* line discipline flags */
- )
-{
- char * windev;
- HANDLE h;
- COMMTIMEOUTS timeouts;
- DCB dcb;
- DWORD dwEvtMask;
- int fd;
- int translate;
-
- /*
- * open communication port handle
- */
- windev = NULL;
- h = common_serial_open(dev, &windev);
- windev = (windev) ? windev : dev;
-
- if (INVALID_HANDLE_VALUE == h) {
- SAVE_ERRNO(
- msyslog(LOG_ERR, "CreateFile(%s) error: %m",
- windev);
- )
- return -1;
- }
-
- /* Change the input/output buffers to be large. */
- if (!SetupComm(h, 1024, 1024)) {
- SAVE_ERRNO(
- msyslog(LOG_ERR, "SetupComm(%s) error: %m",
- windev);
- )
- return -1;
- }
-
- dcb.DCBlength = sizeof(dcb);
-
- if (!GetCommState(h, &dcb)) {
- SAVE_ERRNO(
- msyslog(LOG_ERR,
- "GetCommState(%s) error: %m",
- windev);
- )
- return -1;
- }
-
- switch (speed) {
-
- case B300:
- dcb.BaudRate = 300;
- break;
-
- case B1200:
- dcb.BaudRate = 1200;
- break;
-
- case B2400:
- dcb.BaudRate = 2400;
- break;
-
- case B4800:
- dcb.BaudRate = 4800;
- break;
-
- case B9600:
- dcb.BaudRate = 9600;
- break;
-
- case B19200:
- dcb.BaudRate = 19200;
- break;
-
- case B38400:
- dcb.BaudRate = 38400;
- break;
-
- case B57600:
- dcb.BaudRate = 57600;
- break;
-
- case B115200:
- dcb.BaudRate = 115200;
- break;
-
- default:
- msyslog(LOG_ERR, "%s unsupported bps code %u", windev,
- speed);
- SetLastError(ERROR_INVALID_PARAMETER);
- return -1;
- }
-
- dcb.fBinary = TRUE;
- dcb.fParity = TRUE;
- dcb.fOutxCtsFlow = 0;
- dcb.fOutxDsrFlow = 0;
- dcb.fDtrControl = DTR_CONTROL_ENABLE;
- dcb.fDsrSensitivity = 0;
- dcb.fTXContinueOnXoff = TRUE;
- dcb.fOutX = 0;
- dcb.fInX = 0;
- dcb.fErrorChar = 0;
- dcb.fNull = 0;
- dcb.fRtsControl = RTS_CONTROL_DISABLE;
- dcb.fAbortOnError = 0;
- dcb.ByteSize = 8;
- dcb.StopBits = ONESTOPBIT;
- dcb.Parity = NOPARITY;
- dcb.ErrorChar = 0;
- dcb.EofChar = 0;
- if (LDISC_RAW & flags)
- dcb.EvtChar = 0;
- else
- dcb.EvtChar = '\r';
-
- if (!SetCommState(h, &dcb)) {
- SAVE_ERRNO(
- msyslog(LOG_ERR, "SetCommState(%s) error: %m",
- windev);
- )
- return -1;
- }
-
- /* watch out for CR (dcb.EvtChar) as well as the CD line */
- dwEvtMask = EV_RLSD;
- if (LDISC_RAW & flags)
- dwEvtMask |= EV_RXCHAR;
- else
- dwEvtMask |= EV_RXFLAG;
- if (!SetCommMask(h, dwEvtMask)) {
- SAVE_ERRNO(
- msyslog(LOG_ERR, "SetCommMask(%s) error: %m",
- windev);
- )
- return -1;
- }
-
- /* configure the handle to never block */
- timeouts.ReadIntervalTimeout = MAXDWORD;
- timeouts.ReadTotalTimeoutMultiplier = 0;
- timeouts.ReadTotalTimeoutConstant = 0;
- timeouts.WriteTotalTimeoutMultiplier = 0;
- timeouts.WriteTotalTimeoutConstant = 0;
-
- if (!SetCommTimeouts(h, &timeouts)) {
- SAVE_ERRNO(
- msyslog(LOG_ERR,
- "Device %s SetCommTimeouts error: %m",
- windev);
- )
- return -1;
- }
-
- translate = (LDISC_RAW & flags)
- ? 0
- : _O_TEXT;
- fd = _open_osfhandle((int)h, translate);
- /* refclock_open() long returned 0 on failure, avoid it. */
- if (0 == fd) {
- fd = _dup(0);
- _close(0);
- }
-
- return fd;
-}
-
-
-int
-ioctl_tiocmget(
- HANDLE h,
- int *pi
- )
-{
- DWORD dw;
-
- if (!GetCommModemStatus(h, &dw)) {
- errno = ENOTTY;
- return -1;
- }
-
- *pi = ((dw & MS_CTS_ON) ? TIOCM_CTS : 0)
- | ((dw & MS_DSR_ON) ? TIOCM_DSR : 0)
- | ((dw & MS_RLSD_ON) ? TIOCM_CAR : 0)
- | ((dw & MS_RING_ON) ? TIOCM_RI : 0);
-
- return 0;
-}
-
-
-int
-ioctl_tiocmset(
- HANDLE h,
- int *pi
- )
-{
- BOOL failed;
- int result;
-
- failed = !EscapeCommFunction(
- h,
- (*pi & TIOCM_RTS)
- ? SETRTS
- : CLRRTS
- );
-
- if (!failed)
- failed = !EscapeCommFunction(
- h,
- (*pi & TIOCM_DTR)
- ? SETDTR
- : CLRDTR
- );
-
- if (failed) {
- errno = ENOTTY;
- result = -1;
- } else
- result = 0;
-
- return result;
-}
-
-
-int
-ioctl(
- int fd,
- int op,
- int *pi
- )
-{
- HANDLE h;
- int result;
- int modctl;
-
- h = (HANDLE)_get_osfhandle(fd);
-
- if (INVALID_HANDLE_VALUE == h) {
- /* errno already set */
- return -1;
- }
-
- switch (op) {
-
- case TIOCMGET:
- result = ioctl_tiocmget(h, pi);
- break;
-
- case TIOCMSET:
- result = ioctl_tiocmset(h, pi);
- break;
-
- case TIOCMBIC:
- result = ioctl_tiocmget(h, &modctl);
- if (result < 0)
- return result;
- modctl &= ~(*pi);
- result = ioctl_tiocmset(h, &modctl);
- break;
-
- case TIOCMBIS:
- result = ioctl_tiocmget(h, &modctl);
- if (result < 0)
- return result;
- modctl |= *pi;
- result = ioctl_tiocmset(h, &modctl);
- break;
-
- default:
- errno = EINVAL;
- result = -1;
- }
-
- return result;
-}
-
-
-int
-tcsetattr(
- int fd,
- int optional_actions,
- const struct termios * tios
- )
-{
- DCB dcb;
- HANDLE h;
-
- UNUSED_ARG(optional_actions);
-
- h = (HANDLE)_get_osfhandle(fd);
-
- if (INVALID_HANDLE_VALUE == h) {
- /* errno already set */
- return -1;
- }
-
- dcb.DCBlength = sizeof(dcb);
- if (!GetCommState(h, &dcb)) {
- errno = ENOTTY;
- return -1;
- }
-
- switch (max(tios->c_ospeed, tios->c_ispeed)) {
-
- case B300:
- dcb.BaudRate = 300;
- break;
-
- case B1200:
- dcb.BaudRate = 1200;
- break;
-
- case B2400:
- dcb.BaudRate = 2400;
- break;
-
- case B4800:
- dcb.BaudRate = 4800;
- break;
-
- case B9600:
- dcb.BaudRate = 9600;
- break;
-
- case B19200:
- dcb.BaudRate = 19200;
- break;
-
- case B38400:
- dcb.BaudRate = 38400;
- break;
-
- case B57600:
- dcb.BaudRate = 57600;
- break;
-
- case B115200:
- dcb.BaudRate = 115200;
- break;
-
- default:
- msyslog(LOG_ERR, "unsupported serial baud rate");
- errno = EINVAL;
- return -1;
- }
-
- switch (tios->c_cflag & CSIZE) {
-
- case CS5:
- dcb.ByteSize = 5;
- break;
-
- case CS6:
- dcb.ByteSize = 6;
- break;
-
- case CS7:
- dcb.ByteSize = 7;
- break;
-
- case CS8:
- dcb.ByteSize = 8;
- break;
-
- default:
- msyslog(LOG_ERR, "unsupported serial word size");
- errno = EINVAL;
- return FALSE;
- }
-
- if (PARENB & tios->c_cflag) {
- dcb.fParity = TRUE;
- dcb.Parity = (tios->c_cflag & PARODD)
- ? ODDPARITY
- : EVENPARITY;
- } else {
- dcb.fParity = FALSE;
- dcb.Parity = NOPARITY;
- }
-
- dcb.StopBits = (CSTOPB & tios->c_cflag)
- ? TWOSTOPBITS
- : ONESTOPBIT;
-
- if (!SetCommState(h, &dcb)) {
- errno = ENOTTY;
- return -1;
- }
-
- return 0;
-}
-
-
-int
-tcgetattr(
- int fd,
- struct termios *tios
- )
-{
- DCB dcb;
- HANDLE h;
-
- h = (HANDLE)_get_osfhandle(fd);
-
- if (INVALID_HANDLE_VALUE == h) {
- /* errno already set */
- return -1;
- }
-
- dcb.DCBlength = sizeof(dcb);
-
- if (!GetCommState(h, &dcb)) {
- errno = ENOTTY;
- return -1;
- }
-
- /* Set c_ispeed & c_ospeed */
-
- switch (dcb.BaudRate) {
-
- case 300:
- tios->c_ispeed = tios->c_ospeed = B300;
- break;
-
- case 1200:
- tios->c_ispeed = tios->c_ospeed = B1200;
- break;
-
- case 2400:
- tios->c_ispeed = tios->c_ospeed = B2400;
- break;
-
- case 4800:
- tios->c_ispeed = tios->c_ospeed = B4800;
- break;
-
- case 9600:
- tios->c_ispeed = tios->c_ospeed = B9600;
- break;
-
- case 19200:
- tios->c_ispeed = tios->c_ospeed = B19200;
- break;
-
- case 38400:
- tios->c_ispeed = tios->c_ospeed = B38400;
- break;
-
- case 57600:
- tios->c_ispeed = tios->c_ospeed = B57600;
- break;
-
- case 115200:
- tios->c_ispeed = tios->c_ospeed = B115200;
- break;
-
- default:
- tios->c_ispeed = tios->c_ospeed = B9600;
- }
-
-
- switch (dcb.ByteSize) {
- case 5:
- tios->c_cflag = CS5;
- break;
-
- case 6:
- tios->c_cflag = CS6;
- break;
-
- case 7:
- tios->c_cflag = CS7;
- break;
-
- case 8:
- default:
- tios->c_cflag = CS8;
- }
-
- if (dcb.fParity) {
- tios->c_cflag |= PARENB;
-
- if (ODDPARITY == dcb.Parity)
- tios->c_cflag |= PARODD;
- }
-
- if (TWOSTOPBITS == dcb.StopBits)
- tios->c_cflag |= CSTOPB;
-
- tios->c_iflag = 0;
- tios->c_lflag = 0;
- tios->c_line = 0;
- tios->c_oflag = 0;
-
- return 0;
-}
-
-
-int
-tcflush(
- int fd,
- int mode
- )
-{
- HANDLE h;
- BOOL success;
- DWORD flags;
- int result;
-
- h = (HANDLE)_get_osfhandle(fd);
-
- if (INVALID_HANDLE_VALUE == h) {
- /* errno already set */
- return -1;
- }
-
- switch (mode) {
-
- case TCIFLUSH:
- flags = PURGE_RXCLEAR;
- break;
-
- case TCOFLUSH:
- flags = PURGE_TXABORT;
- break;
-
- case TCIOFLUSH:
- flags = PURGE_RXCLEAR | PURGE_TXABORT;
- break;
-
- default:
- errno = EINVAL;
- return -1;
- }
-
- success = PurgeComm(h, flags);
-
- if (success)
- result = 0;
- else {
- errno = ENOTTY;
- result = -1;
- }
-
- return result;
-}
-
diff --git a/ports/winnt/libntp/util_clockstuff.c b/ports/winnt/libntp/util_clockstuff.c
deleted file mode 100644
index e4bd0de3dd24..000000000000
--- a/ports/winnt/libntp/util_clockstuff.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-#include "clockstuff.h"
-
-int
-gettimeofday(
- struct timeval * tv,
- void * ignored
- )
-{
- struct timespec ts;
-
- UNUSED_ARG(ignored);
-
- getclock(TIMEOFDAY, &ts);
-
- tv->tv_sec = ts.tv_sec;
- tv->tv_usec = ts.tv_nsec / 10;
-
- return 0;
-}
diff --git a/ports/winnt/libntp/win32_io.c b/ports/winnt/libntp/win32_io.c
deleted file mode 100644
index 9e7a86179853..000000000000
--- a/ports/winnt/libntp/win32_io.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* This file implements i/o calls that are specific to Windows */
-
-#include <config.h>
-#include <stdio.h>
-#include "ntp_fp.h"
-#include "ntp_net.h"
-#include "ntp_stdlib.h"
-#include "ntp_syslog.h"
-#include "win32_io.h"
-#include <isc/win32os.h>
-
-/*
- * Define this macro to control the behavior of connection
- * resets on UDP sockets. See Microsoft KnowledgeBase Article Q263823
- * for details.
- * Based on that article, it is surprising that a much newer winsock2.h
- * does not define SIO_UDP_CONNRESET (the one that comes with VS 2008).
- * NOTE: This requires that Windows 2000 systems install Service Pack 2
- * or later.
- */
-#ifndef SIO_UDP_CONNRESET
-#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
-#endif
-
-void
-InitSockets(
- void
- )
-{
- WORD wVersionRequested;
- WSADATA wsaData;
- int err;
-
- /* Need Winsock 2.0 or better */
- wVersionRequested = MAKEWORD(2, 0);
-
- err = WSAStartup(wVersionRequested, &wsaData);
- if ( err != 0 ) {
- SetLastError(err);
- mfprintf(stderr, "No usable winsock: %m\n");
- SetLastError(err);
- msyslog(LOG_ERR, "No usable winsock: %m");
- exit(1);
- }
-}
-
-/*
- * Windows 2000 systems incorrectly cause UDP sockets using WASRecvFrom
- * to not work correctly, returning a WSACONNRESET error when a WSASendTo
- * fails with an "ICMP port unreachable" response and preventing the
- * socket from using the WSARecvFrom in subsequent operations.
- * The function below fixes this, but requires that Windows 2000
- * Service Pack 2 or later be installed on the system. NT 4.0
- * systems are not affected by this and work correctly.
- * See Microsoft Knowledge Base Article Q263823 for details of this.
- */
-void
-connection_reset_fix(
- SOCKET fd,
- sockaddr_u * addr
- )
-{
- DWORD dw;
- BOOL bNewBehavior = FALSE;
- DWORD status;
-
- /*
- * disable bad behavior using IOCTL: SIO_UDP_CONNRESET
- * NT 4.0 has no problem
- */
- if (isc_win32os_majorversion() >= 5) {
- status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior,
- sizeof(bNewBehavior), NULL, 0,
- &dw, NULL, NULL);
- if (SOCKET_ERROR == status)
- msyslog(LOG_ERR,
- "connection_reset_fix() failed for address %s: %m",
- stoa(addr));
- }
-}
-
diff --git a/ports/winnt/ntpd/hopf_PCI_io.c b/ports/winnt/ntpd/hopf_PCI_io.c
deleted file mode 100644
index a1ba200f1171..000000000000
--- a/ports/winnt/ntpd/hopf_PCI_io.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * hopf_PCI_io.c
- * Read data from a hopf PCI clock using the ATLSoft WinNT driver.
- *
- * Date: 21.03.2000 Revision: 01.10
- *
- * Copyright (C) 1999, 2000 by Bernd Altmeier altmeier@ATLSoft.de
- *
- */
-
-/*
- * Ignore nonstandard extension warning.
- * This happens when including winioctl.h
- */
-#pragma warning(disable: 4201)
-#define _FILESYSTEMFSCTL_
-
-#include <config.h>
-#include <windows.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <winioctl.h>
-
-#include "ntp_stdlib.h"
-#include "hopf_PCI_io.h"
-
-
-#define ATL_PASSTHROUGH_READ_TOSIZE (3 * sizeof(ULONG))
-#define ATL_PASSTHROUGH_READ_FROMSIZE 0
-#define IOCTL_ATLSOFT_PASSTHROUGH_READ CTL_CODE( \
- FILE_DEVICE_UNKNOWN, \
- 0x805, \
- METHOD_BUFFERED, \
- FILE_ANY_ACCESS)
-
-
-HANDLE hDevice = NULL; // this is the handle to the PCI Device
-
-HANDLE hRdEvent;
-OVERLAPPED Rdoverlapped;
-OVERLAPPED * pRdOverlapped;
-
-ULONG iobuffer[256];
-DWORD cbReturned;
-BOOL HaveBoard = FALSE;
-
-struct {
- ULONG region;
- ULONG offset;
- ULONG count;
-} io_params;
-
-
-BOOL
-OpenHopfDevice(void)
-{
- OSVERSIONINFO VersionInfo;
- ULONG deviceNumber;
- CHAR deviceName[255];
-
- VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&VersionInfo);
- switch (VersionInfo.dwPlatformId) {
-
- case VER_PLATFORM_WIN32_WINDOWS: // Win95/98
- return FALSE; // "NTP does not support Win 95-98."
- break;
-
- case VER_PLATFORM_WIN32_NT: // WinNT
- deviceNumber = 0;
- snprintf(deviceName, sizeof(deviceName),
- "\\\\.\\hclk6039%d", deviceNumber + 1);
- hDevice = CreateFile(
- deviceName,
- GENERIC_WRITE | GENERIC_READ,
- FILE_SHARE_WRITE | FILE_SHARE_READ,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_DELETE_ON_CLOSE | FILE_FLAG_OVERLAPPED,
- NULL);
- break;
-
- default:
- hDevice = INVALID_HANDLE_VALUE;
- break;
- } // end switch
-
- if (INVALID_HANDLE_VALUE == hDevice) // the system didn't return a handle
- return FALSE; //"A handle to the driver could not be obtained properly"
-
- // an event to be used for async transfers
- hRdEvent = CreateEvent(
- NULL,
- TRUE,
- FALSE,
- NULL);
-
- if (INVALID_HANDLE_VALUE == hRdEvent)
- return FALSE; // the system didn't return a handle
-
- pRdOverlapped = &Rdoverlapped;
- pRdOverlapped->hEvent = hRdEvent;
-
- HaveBoard = TRUE; // board installed and we have access
-
- return TRUE;
-} // end of OpenHopfDevice()
-
-
-BOOL
-CloseHopfDevice(void)
-{
- CloseHandle(hRdEvent);// When done, close the handle to the driver
-
- return CloseHandle(hDevice);
-} // end of CloseHopfDevice()
-
-
-void
-ReadHopfDevice(void)
-{
- if (!HaveBoard)
- return;
-
- DeviceIoControl(
- hDevice,
- IOCTL_ATLSOFT_PASSTHROUGH_READ,
- &io_params,
- ATL_PASSTHROUGH_READ_TOSIZE,
- iobuffer,
- ATL_PASSTHROUGH_READ_FROMSIZE
- + io_params.count * sizeof(ULONG),
- &cbReturned,
- pRdOverlapped
- );
-}
-
-
-#ifdef NOTUSED
-void
-GetHardwareData(
- LPDWORD Data32,
- WORD Ofs
- )
-{
- io_params.region = 1;
- io_params.offset = Ofs;
- io_params.count = 1;
- ReadHopfDevice();
- *Data32 = iobuffer[0];
-}
-#endif /* NOTUSED */
-
-
-void
-GetHopfTime(
- LPHOPFTIME Data,
- DWORD Offset
- )
-{
- io_params.region = 1;
- io_params.offset = Offset;
- io_params.count = 4;
-
- ReadHopfDevice();
-
- Data->wHour = 0;
- Data->wMinute = 0;
- Data->wSecond = 0;
- while (iobuffer[0] >= 60 * 60 * 1000) {
- iobuffer[0] = iobuffer[0] - 60 * 60 * 1000;
- Data->wHour++;
- }
- while (iobuffer[0] >= 60 * 1000) {
- iobuffer[0] = iobuffer[0] - 60 * 1000;
- Data->wMinute++;
- }
- while (iobuffer[0] >= 1000) {
- iobuffer[0] = iobuffer[0] - 1000;
- Data->wSecond++;
- }
- Data->wMilliseconds = LOWORD(iobuffer[0]);
- Data->wDay = HIBYTE(HIWORD(iobuffer[1]));
- Data->wMonth = LOBYTE(HIWORD(iobuffer[1]));
- Data->wYear = LOWORD(iobuffer[1]);
- Data->wDayOfWeek = HIBYTE(HIWORD(iobuffer[2]));
- if (Data->wDayOfWeek == 7) // Dow Korrektur
- Data->wDayOfWeek = 0;
-
- io_params.region = 1;
- io_params.offset += 0x08;
- io_params.count = 1;
-
- ReadHopfDevice();
-
- Data->wStatus = LOBYTE(HIWORD(iobuffer[0]));
-}
-
-
-#ifdef NOTUSED
-void
-GetHopfLocalTime(
- LPHOPFTIME Data
- )
-{
- DWORD Offset = 0;
-
- GetHopfTime(Data, Offset);
-}
-#endif /* NOTUSED */
-
-
-void
-GetHopfSystemTime(
- LPHOPFTIME Data
- )
-{
- DWORD Offset = 0x10;
-
- GetHopfTime(Data,Offset);
-}
-
-
-#ifdef NOTUSED
-void
-GetSatData(
- LPSATSTAT Data
- )
-{
- io_params.region = 1;
- io_params.offset = 0xb0;
- io_params.count = 5;
-
- ReadHopfDevice();
-
- Data->wVisible = HIBYTE(HIWORD(iobuffer[0]));
- Data->wMode = LOBYTE(LOWORD(iobuffer[0]));
- Data->wSat0 = HIBYTE(HIWORD(iobuffer[1]));
- Data->wRat0 = LOBYTE(HIWORD(iobuffer[1]));
- Data->wSat1 = HIBYTE(LOWORD(iobuffer[1]));
- Data->wRat1 = LOBYTE(LOWORD(iobuffer[1]));
- Data->wSat2 = HIBYTE(HIWORD(iobuffer[2]));
- Data->wRat2 = LOBYTE(HIWORD(iobuffer[2]));
- Data->wSat3 = HIBYTE(LOWORD(iobuffer[2]));
- Data->wRat3 = LOBYTE(LOWORD(iobuffer[2]));
- Data->wSat4 = HIBYTE(HIWORD(iobuffer[3]));
- Data->wRat4 = LOBYTE(HIWORD(iobuffer[3]));
- Data->wSat5 = HIBYTE(LOWORD(iobuffer[3]));
- Data->wRat5 = LOBYTE(LOWORD(iobuffer[3]));
- Data->wSat6 = HIBYTE(HIWORD(iobuffer[4]));
- Data->wRat6 = LOBYTE(HIWORD(iobuffer[4]));
- Data->wSat7 = HIBYTE(LOWORD(iobuffer[4]));
- Data->wRat7 = LOBYTE(LOWORD(iobuffer[4]));
-}
-
-
-void
-GetDiffTime(
- LPLONG Data
- )
-{
- io_params.region = 1;
- io_params.offset = 0x0c;
- io_params.count = 1;
-
- ReadHopfDevice();
-
- *Data = iobuffer[0];
-}
-
-
-void
-GetPosition(
- LPGPSPOS Data
- )
-{
- io_params.region = 1;
- io_params.offset = 0x90; // Positionsdaten Länge
- io_params.count = 1;
-
- ReadHopfDevice();
-
- Data->wLongitude = iobuffer[0]; //in Millisekunden
- io_params.region = 1;
- io_params.offset = 0xa0; // Positionsdaten Breite
- io_params.count = 1;
-
- ReadHopfDevice();
-
- Data->wLatitude = iobuffer[0];
- Data->wAltitude = 0;
-}
-
-
-void
-GetHardwareVersion(
- LPCLOCKVER Data
- )
-{
- int i;
-
- io_params.region = 1;
- io_params.offset = 0x50;
- io_params.count = 12;
-
- ReadHopfDevice();
-
- Data->cVersion[0] = '\0';
- iobuffer[13] = 0;
- for (i = 0; i < 13; i++) {
- Data->cVersion[i * 4 ] = HIBYTE(HIWORD(iobuffer[i]));
- Data->cVersion[i * 4 + 1] = LOBYTE(HIWORD(iobuffer[i]));
- Data->cVersion[i * 4 + 2] = HIBYTE(LOWORD(iobuffer[i]));
- Data->cVersion[i * 4 + 3] = LOBYTE(LOWORD(iobuffer[i]));
- }
-}
-
-
-void
-GetDCFAntenne(
- LPDCFANTENNE Data
- )
-{
- io_params.region = 1;
- io_params.offset = 0xcc;
- io_params.count = 1;
-
- ReadHopfDevice();
- Data->bStatus1 = HIBYTE(HIWORD(iobuffer[0]));
- Data->bStatus = LOBYTE(HIWORD(iobuffer[0]));
- Data->wAntValue = LOWORD(iobuffer[0]);
-}
-#endif /* NOTUSED */
-
diff --git a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c
deleted file mode 100644
index 052bfcd2d92b..000000000000
--- a/ports/winnt/ntpd/nt_clockstuff.c
+++ /dev/null
@@ -1,1743 +0,0 @@
-/* Windows NT Clock Routines
- *
- * Created by Sven Dietrich sven@inter-yacht.com
- *
- * New interpolation scheme by Dave Hart <davehart@davehart.com> in
- * February 2009 overcomes 500us-1ms inherent jitter with the older
- * scheme, first identified by Peter Rosin (nee Ekberg)
- * <peda@lysator.liu.se> in 2003 [Bug 216].
- *
- * Note: The Windows port of ntpd uses the C99-snprintf replacement for
- * (v)snprintf(), also used by msyslog(), which does not understand the
- * printf format specifier %I64d, only the more common %lld. With the
- * minimum supported compiler raised to Visual C++ 2005 in ntp-dev in
- * August 2011, all MS C runtime routines also understand %lld and %llu.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/resource.h> /* our private version */
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400 /* VS 2005 */
-#include <intrin.h> /* for __rdtsc() */
-#endif
-
-#ifdef HAVE_PPSAPI
-#include <timepps.h>
-/*
- * ports/winnt/include/timepps.h defines EOPNOTSUPP for compatibility
- * with PPSAPI on other platforms. ports/winnt/include/isc/net.h has
- * #define EOPNOTSUPP WSAEOPNOTSUPP, so to avoid a macro redefinition
- * warning undefine it.
- */
-#undef EOPNOTSUPP
-#endif /* HAVE_PPSAPI */
-
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-#include "ntp_timer.h"
-#include "ntp_assert.h"
-#include "ntp_leapsec.h"
-#include "clockstuff.h"
-#include "ntservice.h"
-#include "ntpd.h"
-#include "ntpd-opts.h"
-
-extern double sys_residual; /* residual from previous adjustment */
-
-/*
- * Include code to possibly modify the MM timer while the service is active.
- */
-
-/*
- * Whether or not MM timer modifications takes place is still controlled
- * by the variable below which is initialized by a default value but
- * might be changed depending on a command line switch.
- */
-static int modify_mm_timer = MM_TIMER_LORES;
-
-#define MM_TIMER_INTV 1 /* the interval we'd want to set the MM timer to [ms] */
-
-static UINT wTimerRes;
-
-BOOL init_randfile();
-
-static long last_Adj = 0;
-
-#define LS_CORR_INTV_SECS 2 /* seconds to apply leap second correction */
-#define LS_CORR_INTV ( (LONGLONG) HECTONANOSECONDS * LS_CORR_INTV_SECS )
-#define LS_CORR_LIMIT ( (LONGLONG) HECTONANOSECONDS / 2 ) // half a second
-
-typedef union ft_ull {
- FILETIME ft;
- ULONGLONG ull;
- LONGLONG ll;
- LARGE_INTEGER li;
-} FT_ULL;
-
-/* leap second stuff */
-static FT_ULL ls_ft;
-static DWORD ls_time_adjustment;
-static ULONGLONG ls_ref_perf_cnt;
-static LONGLONG ls_elapsed;
-
-static BOOL winnt_time_initialized = FALSE;
-static BOOL winnt_use_interpolation = FALSE;
-static unsigned clock_thread_id;
-
-
-void WINAPI GetInterpTimeAsFileTime(LPFILETIME pft);
-static void StartClockThread(void);
-static void tune_ctr_freq(LONGLONG, LONGLONG);
-void StopClockThread(void);
-void atexit_revert_mm_timer(void);
-void win_time_stepped(void);
-
-static HANDLE clock_thread = NULL;
-static HANDLE TimerThreadExitRequest = NULL;
-
-/*
- * interp_time estimates time in 100ns units
- * based on a performance counter value given.
- * The 2nd parameter indicates if this is
- * part of a current time-of-day calculation.
- */
-ULONGLONG interp_time(ULONGLONG, BOOL);
-
-/*
- * add_counter_time_pair is called by the
- * high priority clock thread with a new
- * sample.
- */
-void add_counter_time_pair(ULONGLONG, LONGLONG);
-
-/*
- * globals used by the above two functions to
- * implement the counter/time history
- */
-#define BASELINES_TOT 256
-#define BASELINES_USED 64
-
-static volatile int newest_baseline = 0;
-static volatile int newest_baseline_gen = 0;
-static ULONGLONG baseline_counts[BASELINES_TOT] = {0};
-static LONGLONG baseline_times[BASELINES_TOT] = {0};
-
-#define CLOCK_BACK_THRESHOLD 100 /* < 10us unremarkable */
-static ULONGLONG clock_backward_max = CLOCK_BACK_THRESHOLD;
-static int clock_backward_count;
-
-/**
- * A flag set on Windows versions which ignore small time adjustments.
- *
- * Windows Vista and Windows 7 ignore TimeAdjustment less than 16.
- * @note Has to be checked for Windows Server 2008/2012 and Windows 8.
- * Ref: http://support.microsoft.com/kb/2537623, bug #2328
- */
-static BOOL os_ignores_small_adjustment;
-
-/*
- * clockperiod is the period used for SetSystemTimeAdjustment
- * slewing calculations but does not necessarily correspond
- * to the precision of the OS clock. Prior to Windows Vista
- * (6.0) the two were identical. In 100ns units.
- */
-static DWORD clockperiod;
-
-/*
- * os_clock_precision is the observed precision of the OS
- * clock, meaning the increment between discrete values. This
- * is currently calculated once at startup. 100ns units.
- */
-static ULONGLONG os_clock_precision;
-
-/*
- * NomPerfCtrFreq is from QueryPerformanceFrequency and is the
- * number of performance counter beats per second. PerfCtrFreq
- * starts from NomPerfCtrFreq but is maintained using a sliding
- * window average based on actual performance counter behavior,
- * to allow us to better tolerate powersaving measures that
- * alter the effective frequency of the processor cycle counter
- * (TSC) which sometimes underlies QueryPerformanceCounter.
- *
- * Note that the OS is unlikely to be so subtle in its internal
- * scheduling of waitable timers, presumably done using the
- * performance counter. Therefore our calculations for
- * interpolated time should be based on PerfCtrFreq but our
- * calculations for SetWaitableTimer should assume the OS will
- * convert from FILETIME 100ns units to performance counter
- * beats using the nominal frequency.
- */
-
-volatile ULONGLONG PerfCtrFreq = 0;
- ULONGLONG NomPerfCtrFreq = 0;
-
-/*
- * If we're using RDTSC beating at the same rate as
- * QueryPerformanceCounter, there is a systemic
- * offset we need to account for when using
- * counterstamps from serialpps.sys, which are
- * always from QPC (actually KeQueryPerformanceCounter).
- */
-static LONGLONG QPC_offset = 0;
-
-/*
- * Substitute RDTSC for QueryPerformanceCounter()?
- */
-static int use_pcc = -1;
-
-/*
- * Restrict threads that call QPC/RDTSC to one CPU?
- */
-static int lock_interp_threads = -1;
-
-/*
- * ppm_per_adjust_unit is parts per million effect on the OS
- * clock per slewing adjustment unit per second. Per haps.
- */
-static DOUBLE ppm_per_adjust_unit;
-
-/*
- * wintickadj emulates the functionality provided by unix tickadj,
- * providing a baseline clock correction if needed to get the
- * clock within a few hundred PPM of correct frequency.
- */
-static long wintickadj;
-
-static void choose_interp_counter(void);
-static int is_qpc_built_on_pcc(void);
-
-/*
- * performance counter frequency observations
- */
-#define TUNE_CTR_DEPTH 3 /* running avg depth */
-
-static HANDLE ctr_freq_timer = INVALID_HANDLE_VALUE;
-static ULONGLONG tune_ctr_freq_max_interval;
-static unsigned tune_ctr_period;
-void start_ctr_freq_timer(ULONGLONG now_time);
-void reset_ctr_freq_timer(ULONGLONG when, ULONGLONG now);
-void reset_ctr_freq_timer_abs(ULONGLONG when);
-
-/* round a Windows time to the next bottom of the second */
-
-#define ROUND_TO_NEXT_SEC_BOTTOM(t) \
-do { \
- (t) += 3 * HECTONANOSECONDS / 2 - 1; \
- (t) /= HECTONANOSECONDS; \
- (t) *= HECTONANOSECONDS; \
- (t) -= HECTONANOSECONDS / 2; \
-} while (0)
-
-/*
- * NT native time format is 100's of nanoseconds since 1601-01-01.
- * Helpers for converting between "hectonanoseconds" and the
- * performance counter scale from which interpolated time is
- * derived.
- */
-#define HNS2PERF(hns) ((hns) * PerfCtrFreq / HECTONANOSECONDS)
-#define PERF2HNS(ctr) ((ctr) * HECTONANOSECONDS / PerfCtrFreq)
-
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400 /* VS 2005 */
-#define get_pcc() __rdtsc()
-#else
-/*
- * something like this can be used for a compiler without __rdtsc()
- */
-ULONGLONG __forceinline
-get_pcc(void)
-{
- /* RDTSC returns in EDX:EAX, same as C compiler */
- __asm {
- RDTSC
- }
-}
-#endif
-
-
-/*
- * perf_ctr() returns the current performance counter value,
- * from QueryPerformanceCounter or RDTSC.
- */
-ULONGLONG WINAPI
-perf_ctr(void)
-{
- FT_ULL ft;
-
- if (use_pcc)
- return get_pcc();
- else {
- QueryPerformanceCounter(&ft.li);
- return ft.ull;
- }
-}
-
-
-/*
- * init_small_adjustment
- *
- * Set variable os_ignores_small_adjustment
- *
- */
-static void init_small_adjustment(void)
-{
- OSVERSIONINFO vi;
- memset(&vi, 0, sizeof(vi));
- vi.dwOSVersionInfoSize = sizeof(vi);
-
- if (!GetVersionEx(&vi)) {
- msyslog(LOG_WARNING, "GetVersionEx failed with error code %d.", GetLastError());
- os_ignores_small_adjustment = FALSE;
- return;
- }
-
- if (vi.dwMajorVersion == 6 && vi.dwMinorVersion == 1) {
- // Windows 7 and Windows Server 2008 R2
- //
- // Windows 7 is documented as affected.
- // Windows Server 2008 R2 is assumed affected.
- os_ignores_small_adjustment = TRUE;
- } else if (vi.dwMajorVersion == 6 && vi.dwMinorVersion == 0) {
- // Windows Vista and Windows Server 2008
- //
- // Windows Vista is documented as affected.
- // Windows Server 2008 is assumed affected.
- os_ignores_small_adjustment = TRUE;
- } else {
- os_ignores_small_adjustment = FALSE;
- }
-}
-
-
-/*
- * choose_interp_counter - select between QueryPerformanceCounter and
- * the x86 processor cycle counter (TSC).
- */
-static void
-choose_interp_counter(void)
-{
- const char * ntpd_pcc_freq_text;
- int qpc_built_on_pcc;
-
- /*
- * Regardless of whether we actually use RDTSC, first determine
- * if QueryPerformanceCounter is built on it, so that we can
- * decide whether it's prudent to lock QPC-consuming threads to
- * a particular CPU.
- */
- qpc_built_on_pcc = is_qpc_built_on_pcc();
- lock_interp_threads = qpc_built_on_pcc;
-
- /*
- * It's time to make some more permanent knobs,
- * but for right now the RDTSC aka PCC dance on x86 is:
- *
- * 1. With none of these variables defined, only QPC
- * is used because there is no reliable way to
- * detect counter frequency variation after ntpd
- * startup implemented.
- * 2. We need a better knob, but for now if you know
- * your RDTSC / CPU frequency is invariant, set
- * NTPD_PCC and assuming your QPC is based on the
- * PCC as well, RDTSC will be substituted.
- * 3. More forcefully, you can jam in a desired exact
- * processor frequency, expressed in cycles per
- * second by setting NTPD_PCC_FREQ=398125000, for
- * example, if yor actual known CPU frequency is
- * 398.125 MHz, and NTPD_PCC doesn't work because
- * QueryPerformanceCounter is implemented using
- * another counter. It is very easy to make ntpd
- * fall down if the NTPD_PCC_FREQ value isn't very
- * close to the observed RDTSC units per second.
- *
- * Items 2 and 3 could probably best be combined into one
- * new windows-specific command line switch such as
- * ntpd --pcc
- * or
- * ntpd --pcc=398125000
- *
- * They are currently tied to Windows because that is
- * the only ntpd port with its own interpolation, and
- * to x86/x64 because no one has ported the Windows
- * ntpd port to the sole remaining alternative, Intel
- * Itanium.
- */
- if (HAVE_OPT(PCCFREQ))
- ntpd_pcc_freq_text = OPT_ARG(PCCFREQ);
- else
- ntpd_pcc_freq_text = getenv("NTPD_PCC_FREQ");
-
- if (!HAVE_OPT(USEPCC)
- && NULL == ntpd_pcc_freq_text
- && NULL == getenv("NTPD_PCC")) {
- use_pcc = 0;
- return;
- }
-
- if (!qpc_built_on_pcc && NULL == ntpd_pcc_freq_text) {
- use_pcc = 0;
- return;
- }
-
- use_pcc = 1;
- if (ntpd_pcc_freq_text != NULL)
- sscanf(ntpd_pcc_freq_text,
- "%llu",
- &NomPerfCtrFreq);
-
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_INFO,
- "using processor cycle counter "
- "%.3f MHz",
- NomPerfCtrFreq / 1e6);
- return;
-}
-
-
-/*
- * is_qpc_built_on_pcc - test if QueryPerformanceCounter runs at the
- * same rate as the processor cycle counter (TSC).
- */
-static int
-is_qpc_built_on_pcc(void)
-{
- LONGLONG offset;
- FT_ULL ft1;
- FT_ULL ft2;
- FT_ULL ft3;
- FT_ULL ft4;
- FT_ULL ft5;
-
- NTP_REQUIRE(NomPerfCtrFreq != 0);
-
- QueryPerformanceCounter(&ft1.li);
- ft2.ull = get_pcc();
- Sleep(1);
- QueryPerformanceCounter(&ft3.li);
- Sleep(1);
- ft4.ull = get_pcc();
- Sleep(1);
- QueryPerformanceCounter(&ft5.li);
-
- offset = ft2.ull - ft1.ull;
- ft3.ull += offset;
- ft5.ull += offset;
-
- if (ft2.ull <= ft3.ull &&
- ft3.ull <= ft4.ull &&
- ft4.ull <= ft5.ull) {
-
- QPC_offset = offset;
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-/*
- * Request Multimedia Timer
- */
-void
-set_mm_timer(
- int timerres
- )
-{
- modify_mm_timer = timerres;
-}
-
-/*
- * adj_systime - called once every second to discipline system clock.
- * Normally, the offset passed in (parameter now) is in the range
- * [-NTP_MAXFREQ, NTP_MAXFREQ]. However, at EVNT_NSET, a much larger
- * slew is requested if the initial offset is less than the step
- * threshold, in the range [-step, step] where step is the step
- * threshold, 128 msec by default. For the remainder of the frequency
- * training interval, adj_systime is called with 0 offset each second
- * and slew the large offset at 500 PPM (500 usec/sec).
- * Returns 1 if okay, 0 if trouble.
- */
-int
-adj_systime(
- double now
- )
-{
- /* ntp time scale origin as ticks since 1601-01-01 */
- static const ULONGLONG HNS_JAN_1900 = 94354848000000000ull;
-
- static double adjtime_carry;
- double dtemp;
- u_char isneg;
- BOOL rc;
- long TimeAdjustment;
- SYSTEMTIME st;
- ULONGLONG this_perf_count;
- FT_ULL curr_ft;
- leap_result_t lsi;
-
- /*
- * Add the residual from the previous adjustment to the new
- * adjustment, bound and round.
- */
- dtemp = adjtime_carry + sys_residual + now;
- adjtime_carry = 0.;
- sys_residual = 0.;
- if (dtemp < 0) {
- isneg = TRUE;
- dtemp = -dtemp;
- } else {
- isneg = FALSE;
- }
-
- if (dtemp > NTP_MAXFREQ) {
- adjtime_carry = dtemp - NTP_MAXFREQ;
- dtemp = NTP_MAXFREQ;
- }
-
- if (isneg) {
- dtemp = -dtemp;
- adjtime_carry = -adjtime_carry;
- }
-
- dtemp = dtemp * 1e6;
-
- /*
- * dtemp is in micro seconds. NT uses 100 ns units,
- * so a unit change in TimeAdjustment corresponds
- * to slewing 10 ppm on a 100 Hz system. Calculate
- * the number of 100ns units to add, using OS tick
- * frequency as per suggestion from Harry Pyle,
- * and leave the remainder in dtemp
- */
- TimeAdjustment = (long)(dtemp / ppm_per_adjust_unit +
- ((isneg)
- ? -0.5
- : 0.5));
-
- if (os_ignores_small_adjustment) {
- /*
- * As the OS ignores adjustments smaller than 16, we need to
- * leave these small adjustments in sys_residual, causing
- * the small values to be averaged over time.
- */
- if (TimeAdjustment > -16 && TimeAdjustment < 16) {
- TimeAdjustment = 0;
- }
- }
-
- dtemp -= TimeAdjustment * ppm_per_adjust_unit;
-
-
- /* If a piping-hot close leap second is pending for the end
- * of this day, determine the UTC time stamp when the transition
- * must take place. (Calculated in the current leap era!)
- */
- if (leapsec >= LSPROX_ALERT) {
- if (0 == ls_ft.ull && leapsec_frame(&lsi)) {
- if (lsi.tai_diff > 0) {
- /* A leap second insert is scheduled at the end
- * of the day. Since we have not yet computed the
- * time stamp, do it now. Signal electric mode
- * for this insert.
- */
- ls_ft.ull = lsi.ttime.Q_s * HECTONANOSECONDS
- + HNS_JAN_1900;
- FileTimeToSystemTime(&ls_ft.ft, &st);
- msyslog(LOG_NOTICE,
- "Detected positive leap second announcement "
- "for %04d-%02d-%02d %02d:%02d:%02d UTC",
- st.wYear, st.wMonth, st.wDay,
- st.wHour, st.wMinute, st.wSecond);
- leapsec_electric(TRUE);
- } else if (lsi.tai_diff < 0) {
- /* Do not handle negative leap seconds here. If this
- * happens, let the system step.
- */
- leapsec_electric(FALSE);
- }
- }
- } else {
- /* The leap second announcement is gone. Happens primarily after
- * the leap transition, but can also be due to a clock step.
- * Disarm the leap second, but only if there is one scheduled
- * and not currently in progress!
- */
- if (ls_ft.ull != 0 && ls_time_adjustment == 0) {
- ls_ft.ull = 0;
- msyslog(LOG_NOTICE, "Leap second announcement disarmed");
- }
- }
-
- /*
- * If the time stamp for the next leap second has been set
- * then check if the leap second must be handled
- */
- if (ls_ft.ull != 0) {
- this_perf_count = perf_ctr();
-
- if (0 == ls_time_adjustment) { /* has not yet been scheduled */
-
- GetSystemTimeAsFileTime(&curr_ft.ft);
- if (curr_ft.ull >= ls_ft.ull) {
- ls_time_adjustment = clockperiod / LS_CORR_INTV_SECS;
- ls_ref_perf_cnt = this_perf_count;
- ls_elapsed = 0;
- msyslog(LOG_NOTICE, "Inserting positive leap second.");
- }
- } else { /* leap sec adjustment has been scheduled previously */
- ls_elapsed = (this_perf_count - ls_ref_perf_cnt)
- * HECTONANOSECONDS / PerfCtrFreq;
- }
-
- if (ls_time_adjustment != 0) { /* leap second adjustment is currently active */
- if (ls_elapsed > (LS_CORR_INTV - LS_CORR_LIMIT)) {
- ls_time_adjustment = 0; /* leap second adjustment done */
- ls_ft.ull = 0;
- }
-
- /*
- * NOTE: While the system time is slewed during the leap second
- * the interpolation function which is based on the performance
- * counter does not account for the slew.
- */
- TimeAdjustment -= ls_time_adjustment;
- }
- }
-
-
- sys_residual = dtemp / 1e6;
- DPRINTF(3, ("adj_systime: %.9f -> %.9f residual %.9f",
- now, 1e-6 * (TimeAdjustment * ppm_per_adjust_unit),
- sys_residual));
- if (0. == adjtime_carry)
- DPRINTF(3, ("\n"));
- else
- DPRINTF(3, (" adjtime %.9f\n", adjtime_carry));
-
- /* only adjust the clock if adjustment changes */
- TimeAdjustment += wintickadj;
- if (last_Adj != TimeAdjustment) {
- last_Adj = TimeAdjustment;
- DPRINTF(2, ("SetSystemTimeAdjustment(%+ld)\n", TimeAdjustment));
- rc = SetSystemTimeAdjustment(clockperiod + TimeAdjustment, FALSE);
- if (!rc)
- msyslog(LOG_ERR, "Can't adjust time: %m");
- } else {
- rc = TRUE;
- }
-
- return rc;
-}
-
-
-void
-init_winnt_time(void)
-{
- static const char settod[] = "settimeofday=\"SetSystemTime\"";
- char szMsgPath[MAX_PATH+1];
- HANDLE hToken = INVALID_HANDLE_VALUE;
- TOKEN_PRIVILEGES tkp;
- TIMECAPS tc;
- BOOL noslew;
- DWORD adjclockperiod;
- LARGE_INTEGER Freq;
- FT_ULL initial_hectonanosecs;
- FT_ULL next_hectonanosecs;
- double adjppm;
- double rawadj;
- char * pch;
-
- if (winnt_time_initialized)
- return;
-
- /*
- * Make sure the service is initialized
- * before we do anything else
- */
- ntservice_init();
-
- /* Set up the Console Handler */
- if (!SetConsoleCtrlHandler(OnConsoleEvent, TRUE)) {
- msyslog(LOG_ERR, "Can't set console control handler: %m");
- }
-
- /* Set the Event-ID message-file name. */
- if (!GetModuleFileName(NULL, szMsgPath, sizeof(szMsgPath))) {
- msyslog(LOG_ERR, "GetModuleFileName(PGM_EXE_FILE) failed: %m");
- exit(1);
- }
-
- /* Initialize random file before OpenSSL checks */
- if (!init_randfile())
- msyslog(LOG_ERR, "Unable to initialize .rnd file");
-
-#pragma warning(push)
-#pragma warning(disable: 4127) /* conditional expression is constant */
-
-#ifdef DEBUG
- if (SIZEOF_TIME_T != sizeof(time_t)
- || SIZEOF_INT != sizeof(int)
- || SIZEOF_SIGNED_CHAR != sizeof(char)) {
- msyslog(LOG_ERR, "config.h SIZEOF_* macros wrong, fatal");
- exit(1);
- }
-#endif
-
-#pragma warning(pop)
-
- init_small_adjustment();
- leapsec_electric(TRUE);
-
- /*
- * Get privileges needed for fiddling with the clock
- */
-
- /* get the current process token handle */
- if (!OpenProcessToken(
- GetCurrentProcess(),
- TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
- &hToken)) {
- msyslog(LOG_ERR, "OpenProcessToken failed: %m");
- exit(-1);
- }
- /* get the LUID for system-time privilege. */
- LookupPrivilegeValue(NULL, SE_SYSTEMTIME_NAME, &tkp.Privileges[0].Luid);
- tkp.PrivilegeCount = 1; /* one privilege to set */
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
-
- /* get set-time privilege for this process. */
- AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
- (PTOKEN_PRIVILEGES) NULL, 0);
-
- /* cannot use return value of AdjustTokenPrivileges. */
- /* (success does not indicate all privileges were set) */
- if (GetLastError() != ERROR_SUCCESS) {
- msyslog(LOG_ERR, "AdjustTokenPrivileges failed: %m");
- /* later set time call will probably fail */
- }
-
- CloseHandle(hToken);
- hToken = INVALID_HANDLE_VALUE;
-
- /*
- * Say how we're setting the time of day
- */
- set_sys_var(settod, sizeof(settod), RO);
-
- /*
- * ntpd on Windows has always raised its priority, without
- * requiring -N as on Unix. Since Windows ntpd doesn't share
- * the history of unix ntpd of once having no -N and therefore
- * needing to be invoked under nice, there is no reason to
- * bring it in line with the Unix version in this regard.
- * Instsrv assumes ntpd is invoked with no arguments, and
- * upgrading users would be negatively surprised by the
- * poor timekeeping if they failed to add -N as part of
- * upgrading were we to correct this platform difference.
- */
- if (-1 == setpriority(PRIO_PROCESS, 0, NTP_PRIO))
- exit(-1);
-
- /* Determine the existing system time slewing */
- if (!GetSystemTimeAdjustment(&adjclockperiod, &clockperiod, &noslew)) {
- msyslog(LOG_ERR, "GetSystemTimeAdjustment failed: %m");
- exit(-1);
- }
-
- /*
- * If there is no slewing before ntpd, adjclockperiod and clockperiod
- * will be equal. Any difference is carried into adj_systime's first
- * pass as the previous adjustment.
- */
- last_Adj = adjclockperiod - clockperiod;
-
- if (last_Adj)
- msyslog(LOG_INFO,
- "Clock interrupt period %.3f msec "
- "(startup slew %.1f usec/period)",
- clockperiod / 1e4,
- last_Adj / 10.);
- else
- msyslog(LOG_INFO,
- "Clock interrupt period %.3f msec",
- clockperiod / 1e4);
-
- /*
- * Calculate the time adjustment resulting from incrementing
- * units per tick by 1 unit for 1 second
- */
- ppm_per_adjust_unit = 1e6 / clockperiod;
-
- pch = getenv("NTPD_TICKADJ_PPM");
- if (pch != NULL && 1 == sscanf(pch, "%lf", &adjppm)) {
- rawadj = adjppm / ppm_per_adjust_unit;
- rawadj += (rawadj < 0)
- ? -0.5
- : 0.5;
- wintickadj = (long)rawadj;
- msyslog(LOG_INFO,
- "Using NTPD_TICKADJ_PPM %+g ppm (%+ld)",
- adjppm, wintickadj);
- }
-
- /* get the performance counter ticks per second */
- if (!QueryPerformanceFrequency(&Freq) || !Freq.QuadPart) {
- msyslog(LOG_ERR, "QueryPerformanceFrequency failed: %m");
- exit(-1);
- }
-
- NomPerfCtrFreq = PerfCtrFreq = Freq.QuadPart;
- msyslog(LOG_INFO,
- "Performance counter frequency %.3f MHz",
- PerfCtrFreq / 1e6);
-
- /*
- * With a precise system clock, our interpolation decision is
- * a slam dunk.
- */
- if (NULL != pGetSystemTimePreciseAsFileTime) {
- winnt_use_interpolation = FALSE;
- winnt_time_initialized = TRUE;
-
- return;
- }
-
- /*
- * Implement any multimedia timer manipulation requested via -M
- * option. This is rumored to be unneeded on Win8 with the
- * introduction of the precise (interpolated) system clock.
- */
- if (modify_mm_timer) {
- if (timeGetDevCaps(&tc, sizeof(tc)) == TIMERR_NOERROR) {
- wTimerRes = min(max(tc.wPeriodMin, MM_TIMER_INTV), tc.wPeriodMax);
- timeBeginPeriod(wTimerRes);
- atexit(atexit_revert_mm_timer);
-
- msyslog(LOG_INFO, "MM timer resolution: %u..%u msec, set to %u msec",
- tc.wPeriodMin, tc.wPeriodMax, wTimerRes );
- } else {
- msyslog(LOG_ERR, "Multimedia timer unavailable");
- }
- }
-
- /*
- * Spin on GetSystemTimeAsFileTime to determine its
- * granularity. Prior to Windows Vista this is
- * typically the same as the clock period.
- */
- GetSystemTimeAsFileTime(&initial_hectonanosecs.ft);
- do {
- GetSystemTimeAsFileTime(&next_hectonanosecs.ft);
- } while (initial_hectonanosecs.ull == next_hectonanosecs.ull);
-
- os_clock_precision = next_hectonanosecs.ull -
- initial_hectonanosecs.ull;
-
- msyslog(LOG_INFO,
- "Windows clock precision %.3f msec, min. slew %.3f ppm/s",
- os_clock_precision / 1e4, ppm_per_adjust_unit);
-
- winnt_time_initialized = TRUE;
-
- choose_interp_counter();
-
- if (getenv("NTPD_USE_SYSTEM_CLOCK") ||
- (os_clock_precision < 4 * 10000 &&
- !getenv("NTPD_USE_INTERP_DANGEROUS"))) {
- msyslog(LOG_INFO, "using Windows clock directly");
- } else {
- winnt_use_interpolation = TRUE;
- get_sys_time_as_filetime = GetInterpTimeAsFileTime;
- StartClockThread();
- }
-}
-
-
-void
-atexit_revert_mm_timer(void)
-{
- timeEndPeriod(wTimerRes);
- DPRINTF(1, ("MM timer resolution reset\n"));
-}
-
-
-void
-reset_winnt_time(void)
-{
- SYSTEMTIME st;
-
- /*
- * If we're in the 2-second slew right after a leap second,
- * we don't want to continue that extreme slew, in that case
- * disable our slewing and return clock discipline to the
- * kernel. Similarly if we are not yet synchronized,
- * our current slew may not be a good ongoing trim.
- * Otherwise, our leave in place the last SetSystemTimeAdjustment
- * as an ongoing frequency correction, better than nothing.
- * TODO:
- * Verify this will not call SetSystemTimeAdjustment if
- * ntpd is running in ntpdate mode.
- */
- if (sys_leap == LEAP_NOTINSYNC || ls_time_adjustment != 0)
- SetSystemTimeAdjustment(0, TRUE);
-
- /*
- * Read the current system time, and write it back to
- * force CMOS update, only if we are exiting because
- * the computer is shutting down and we are already
- * synchronized.
- */
- if (ntservice_systemisshuttingdown() && sys_leap != LEAP_NOTINSYNC) {
- GetSystemTime(&st);
- SetSystemTime(&st);
- NLOG(NLOG_SYSEVENT | NLOG_CLOCKINFO)
- msyslog(LOG_NOTICE, "system is shutting down, CMOS time reset.");
- }
-}
-
-
-/*
- * GetSystemTimeAsFileTime() interface clone is used by getclock() in ntpd.
- */
-
-void WINAPI
-GetInterpTimeAsFileTime(
- LPFILETIME pft
- )
-{
- static ULONGLONG last_interp_time;
- FT_ULL now_time;
- FT_ULL now_count;
- ULONGLONG clock_backward;
-
- /*
- * Mark a mark ASAP. The latency to here should be reasonably
- * deterministic
- */
-
- now_count.ull = perf_ctr();
- now_time.ull = interp_time(now_count.ull, TRUE);
-
- if (last_interp_time <= now_time.ull) {
- last_interp_time = now_time.ull;
- } else {
- clock_backward = last_interp_time - now_time.ull;
- if (clock_backward > clock_backward_max) {
- clock_backward_max = clock_backward;
- clock_backward_count++;
- }
- now_time.ull = last_interp_time;
- }
- *pft = now_time.ft;
-
- return;
-}
-
-
-/*
- * TimerApcFunction is invoked on the high-priority clock
- * thread to capture a new baseline system time and
- * performance counter correlation every 43 msec (64Hz
- * OS clock precision).
- */
-static void CALLBACK
-TimerApcFunction(
- LPVOID lpArgToCompletionRoutine,
- DWORD dwTimerLowValue,
- DWORD dwTimerHighValue
- )
-{
- static BOOL ctr_freq_timer_started = FALSE;
- static ULONGLONG prev_count;
- ULONGLONG now_time;
- FT_ULL now_count;
-
- /* Grab the counter first of all */
- now_count.ull = perf_ctr();
-
- now_time = (((ULONGLONG)dwTimerHighValue << 32) |
- dwTimerLowValue);
-
- /*
- * Save this correlation in the history.
- */
- add_counter_time_pair(now_count.ull, now_time);
-
- /*
- * Once we're synchronized start the counter frequency
- * tuning timer.
- */
- if (INVALID_HANDLE_VALUE == ctr_freq_timer &&
- LEAP_NOTINSYNC != sys_leap)
- start_ctr_freq_timer(now_time);
-}
-
-
-unsigned WINAPI
-ClockThread(
- void *arg
- )
-{
- LARGE_INTEGER DueTime;
- HANDLE timer;
- double HZ;
- double TimerHz;
- DWORD timer_period_msec;
- DWORD res;
- char *ntpd_int_int_text;
-
- UNUSED_ARG(arg);
-
- timer = CreateWaitableTimer(NULL, FALSE, NULL);
-
- ntpd_int_int_text = getenv("NTPD_INT_INT");
-
- HZ = (double)HECTONANOSECONDS / clockperiod;
-
- if (HZ > 63 && HZ < 65) {
- timer_period_msec = 43;
- } else if (HZ > 98 && HZ < 102) {
- timer_period_msec = 27;
- if (NULL == ntpd_int_int_text)
- msyslog(LOG_WARNING,
- "%.3f Hz system clock may benefit from "
- "custom NTPD_INT_INT env var timer interval "
- "override between approx. 20 and 50 msecs.",
- HZ);
- } else {
- timer_period_msec = (DWORD)(0.5 + (2.752 * clockperiod / 10000));
- if (NULL == ntpd_int_int_text)
- msyslog(LOG_WARNING,
- "unfamiliar %.3f Hz system clock may benefit "
- "from custom NTPD_INT_INT env var timer "
- "interval override between approx. 20 and 50 "
- "msecs.",
- HZ);
- }
-
- if (ntpd_int_int_text != NULL) {
- timer_period_msec = atoi(ntpd_int_int_text);
- timer_period_msec = max(9, timer_period_msec);
- msyslog(LOG_NOTICE,
- "using NTPD_INT_INT env var override %u",
- timer_period_msec);
- }
-
- TimerHz = 1e3 / timer_period_msec;
- msyslog(LOG_NOTICE, "HZ %.3f using %u msec timer %.3f Hz %d deep",
- HZ,
- timer_period_msec,
- TimerHz,
- BASELINES_USED);
-
- /* negative DueTime means relative to now */
- DueTime.QuadPart = -(int)timer_period_msec;
-
- SetWaitableTimer(
- timer,
- &DueTime, /* first fire */
- timer_period_msec, /* period thereafter */
- TimerApcFunction, /* callback routine */
- &timer, /* context for callback */
- FALSE); /* do not interfere with power saving */
-
- /*
- * The clock thread spends the rest of its life in the TimerApcFunction
- * and ctr_freq_timer_fired timer APC callbacks, which can only occur
- * while this thread is in an alertable wait. Note the Ex on
- * WaitForSingleObjectEx and TRUE for fAlertable. The wait will return
- * after each APC callback in which case we simply wait again. We will
- * break out of the loop when StopClockThread signals our exit event.
- */
- do res = WaitForSingleObjectEx(
- TimerThreadExitRequest,
- INFINITE,
- TRUE);
- while (WAIT_OBJECT_0 != res);
-
- CloseHandle(timer);
-
- if (ctr_freq_timer != INVALID_HANDLE_VALUE) {
- CloseHandle(ctr_freq_timer);
- ctr_freq_timer = INVALID_HANDLE_VALUE;
- }
-
- return 0;
-}
-
-
-static void
-StartClockThread(void)
-{
- static BOOL done_once = FALSE;
- FT_ULL StartTime;
-
- /* init variables with the time now */
- GetSystemTimeAsFileTime(&StartTime.ft);
- baseline_times[0] = StartTime.ull;
- baseline_counts[0] = perf_ctr();
-
- /* init sync objects */
- TimerThreadExitRequest = CreateEvent(NULL, FALSE, FALSE, NULL);
-
- clock_thread =
- (HANDLE)_beginthreadex(
- NULL,
- 0,
- ClockThread,
- NULL,
- CREATE_SUSPENDED,
- &clock_thread_id);
-
- if (clock_thread != NULL) {
- /* remember the thread priority is only within the process class */
- if (!SetThreadPriority(clock_thread, THREAD_PRIORITY_TIME_CRITICAL)) {
- DPRINTF(1, ("Error setting thread priority\n"));
- }
-
- lock_thread_to_processor(clock_thread);
- ResumeThread(clock_thread);
-
- if (FALSE == done_once) {
- done_once = TRUE;
- lock_thread_to_processor(GetCurrentThread());
- atexit( StopClockThread );
- }
-
- /*
- * Give the clock thread time to fill its counter/time
- * sample buffer. This will underfill the buffer a
- * bit for sample periods over 43 msec.
- */
- Sleep(BASELINES_USED * 43);
- }
-}
-
-
-void
-StopClockThread(void)
-{
- /*
- * if the clock thread exit()s this routine
- * will be called on the clock thread and
- * we need not (and can't) use the normal
- * TimerThreadExitRequest event.
- */
- if (GetCurrentThreadId() != clock_thread_id) {
-
- if (!SetEvent(TimerThreadExitRequest) ||
- WaitForSingleObject(clock_thread, 2 * 1000) !=
- WAIT_OBJECT_0) {
- msyslog(LOG_ERR, "Failed to stop clock thread.");
- }
- }
- CloseHandle(TimerThreadExitRequest);
- TimerThreadExitRequest = NULL;
- CloseHandle(clock_thread);
- clock_thread = NULL;
-}
-
-
-void
-lock_thread_to_processor(HANDLE thread)
-{
- static DWORD_PTR ProcessAffinityMask;
- static DWORD_PTR ThreadAffinityMask;
- DWORD_PTR SystemAffinityMask;
- char *cputext;
- unsigned int cpu;
-
- if ( ! winnt_time_initialized) {
- DPRINTF(1, ("init_winnt_time() must be called before "
- "lock_thread_to_processor(), exiting\n"));
- exit(-1);
- }
-
- if (!winnt_use_interpolation)
- return;
-
- if (-1 == lock_interp_threads) {
- DPRINTF(1, ("choose_interp_counter() is not called "
- "before lock_thread_to_processor()\n"));
- exit(-1);
- } else if (!lock_interp_threads)
- return;
-
- /*
- * Calculate the ThreadAffinityMask we'll use once on the
- * first invocation.
- */
- if (!ProcessAffinityMask) {
-
- /*
- * Choose which processor to nail the main and clock threads to.
- * If we have more than one, we simply choose the 2nd.
- * Randomly choosing from 2 to n would be better, but in
- * either case with clock and network interrupts more likely
- * to be serviced by the first procecssor, let's stay away
- * from it. QueryPerformanceCounter is not necessarily
- * consistent across CPUs, hence the need to nail the two
- * threads involved in QPC-based interpolation to the same
- * CPU.
- */
-
- GetProcessAffinityMask(
- GetCurrentProcess(),
- &ProcessAffinityMask,
- &SystemAffinityMask);
-
- /*
- * respect NTPD_CPU environment variable if present
- * for testing. NTPD_CPU=0 means use all CPUs, 1-64
- * means lock threads involved in interpolation to
- * that CPU. Default to 2nd if more than 1.
- */
-
- cpu = 2;
- cputext = getenv("NTPD_CPU");
- if (cputext) {
- cpu = (unsigned int) atoi(cputext);
- cpu = min((8 * sizeof(DWORD_PTR)), cpu);
- }
-
- /*
- * Clear all bits except the 2nd. If we have only one proc
- * that leaves ThreadAffinityMask zeroed and we won't bother
- * with SetThreadAffinityMask.
- */
-
- ThreadAffinityMask = (0 == cpu) ? 0 : (1 << (cpu - 1));
-
- if (ThreadAffinityMask &&
- !(ThreadAffinityMask & ProcessAffinityMask))
-
- DPRINTF(1, ("Selected CPU %u (mask %x) is outside "
- "process mask %x, using all CPUs.\n",
- cpu, ThreadAffinityMask,
- ProcessAffinityMask));
- else
- DPRINTF(1, ("Wiring to processor %u (0 means all) "
- "affinity mask %x\n",
- cpu, ThreadAffinityMask));
-
- ThreadAffinityMask &= ProcessAffinityMask;
- }
-
- if (ThreadAffinityMask &&
- !SetThreadAffinityMask(thread, ThreadAffinityMask))
- msyslog(LOG_ERR,
- "Unable to wire thread to mask %x: %m",
- ThreadAffinityMask);
-}
-
-
-#ifdef HAVE_PPSAPI
-static inline void ntp_timestamp_from_counter(l_fp *, ULONGLONG,
- ULONGLONG);
-
-/*
- * helper routine for serial PPS which returns QueryPerformanceCounter
- * timestamp and needs to interpolate it to an NTP timestamp.
- */
-void
-pps_ntp_timestamp_from_counter(
- ntp_fp_t *result,
- ULONGLONG Timestamp,
- ULONGLONG Counterstamp
- )
-{
- /*
- * convert between equivalent l_fp and PPSAPI ntp_fp_t
- */
- ntp_timestamp_from_counter(
- (l_fp *)result,
- Timestamp,
- Counterstamp);
-}
-
-
-static inline
-void
-ntp_timestamp_from_counter(
- l_fp *result,
- ULONGLONG Timestamp,
- ULONGLONG Counterstamp
- )
-{
- FT_ULL Now;
- FT_ULL Ctr;
- LONGLONG CtrDelta;
- double seconds;
- ULONGLONG InterpTimestamp;
-
- if (winnt_use_interpolation) {
- if (0 == Counterstamp) {
- DPRINTF(1, ("ntp_timestamp_from_counter rejecting 0 counter.\n"));
- ZERO(*result);
- return;
- }
-
- InterpTimestamp = interp_time(Counterstamp + QPC_offset, FALSE);
- } else { /* ! winnt_use_interpolation */
- if (NULL != pGetSystemTimePreciseAsFileTime &&
- 0 != Counterstamp) {
- QueryPerformanceCounter(&Ctr.li);
- (*pGetSystemTimePreciseAsFileTime)(&Now.ft);
- CtrDelta = Ctr.ull - Counterstamp;
- seconds = (double)CtrDelta / PerfCtrFreq;
- InterpTimestamp = Now.ull -
- (ULONGLONG)(seconds * HECTONANOSECONDS);
- } else {
- /* have to simply use the driver's system time timestamp */
- InterpTimestamp = Timestamp;
- GetSystemTimeAsFileTime(&Now.ft);
- }
- }
-
- /* convert from 100ns units to NTP fixed point format */
-
- InterpTimestamp -= FILETIME_1970;
- result->l_ui = JAN_1970 + (u_int32)(InterpTimestamp / HECTONANOSECONDS);
- result->l_uf = (u_int32)((InterpTimestamp % HECTONANOSECONDS) *
- (ULONGLONG)FRAC / HECTONANOSECONDS);
-}
-#endif /* HAVE_PPSAPI */
-
-
-void
-win_time_stepped(void)
-{
- /*
- * called back by ntp_set_tod after the system
- * time has been stepped (set).
- *
- * We normally prevent the reported time from going backwards
- * but need to allow it in this case.
- */
- if (FALSE == winnt_use_interpolation)
- return;
-
-
- /*
- * Restart the clock thread to get a new baseline
- * time/counter correlation.
- */
- StopClockThread();
-
- /*
- * newest_baseline_gen is a generation counter
- * incremented once each time newest_baseline
- * is reset.
- */
- newest_baseline_gen++;
-
- clock_backward_max = CLOCK_BACK_THRESHOLD;
- clock_backward_count = 0;
- newest_baseline = 0;
- ZERO(baseline_counts);
- ZERO(baseline_times);
-
- StartClockThread();
-}
-
-
-/*
- * log2ull - log base 2 of a unsigned 64-bit number
- */
-int
-log2ull(
- ULONGLONG n
- )
-{
- const ULONGLONG one = 1;
- int log = 0;
-
- if (n >= one<<32) { n >>= 32; log += 32; }
- if (n >= one<<16) { n >>= 16; log += 16; }
- if (n >= one<< 8) { n >>= 8; log += 8; }
- if (n >= one<< 4) { n >>= 4; log += 4; }
- if (n >= one<< 2) { n >>= 2; log += 2; }
- if (n >= one<< 1) { log += 1; }
-
- return (n) ? log : (-1);
-}
-
-
-/*
- * ctr_freq_timer_fired is called once a few seconds before
- * tune_ctr_period seconds have elapsed, to reset the timer
- * and hopefully minimize error due to the system using the
- * nominal performance counter frequency to set the timer
- * internally, which is typically dozens of PPM from the
- * actual performance counter rate. A few seconds later
- * it is called again to observe the counter and estimate the
- * counter frequency.
- */
-static void CALLBACK
-ctr_freq_timer_fired(
- LPVOID arg,
- DWORD dwTimeLow,
- DWORD dwTimeHigh
- )
-{
- static FT_ULL begin_time = {0};
- static FT_ULL begin_count = {0};
- static ULONGLONG next_period_time = 0;
- static ULONGLONG report_systemtime = 0;
- const ULONGLONG five_minutes = 5ui64 * 60 * HECTONANOSECONDS;
- FT_ULL now_time;
- FT_ULL now_count;
-
- if (!begin_time.ull) {
- begin_count.ull = perf_ctr();
- begin_time.ft.dwLowDateTime = dwTimeLow;
- begin_time.ft.dwHighDateTime = dwTimeHigh;
-
- /*
- * adapt perf ctr observation interval to the
- * counter frequency
- */
- tune_ctr_period = 22680 / log2ull(NomPerfCtrFreq);
-
- /*
- * reset timer 2s before period ends to minimize
- * error from OS timer routines using nominal
- * performance frequency internally.
- */
- tune_ctr_freq_max_interval = tune_ctr_period - 2;
-
- next_period_time = begin_time.ull +
- (ULONGLONG)tune_ctr_period * HECTONANOSECONDS;
-
- ROUND_TO_NEXT_SEC_BOTTOM(next_period_time);
-
- reset_ctr_freq_timer(next_period_time, begin_time.ull);
-
- return;
- }
-
- now_time.ft.dwLowDateTime = dwTimeLow;
- now_time.ft.dwHighDateTime = dwTimeHigh;
-
- if (now_time.ull >= next_period_time) {
- now_count.ull = perf_ctr();
- tune_ctr_freq(
- now_count.ull - begin_count.ull,
- now_time.ull - begin_time.ull);
- next_period_time += (ULONGLONG)tune_ctr_period * HECTONANOSECONDS;
- begin_count.ull = now_count.ull;
- begin_time.ull = now_time.ull;
- }
-
- /*
- * Log clock backward events no more often than 5 minutes.
- */
- if (!report_systemtime) {
- report_systemtime = now_time.ull + five_minutes;
- } else if (report_systemtime <= now_time.ull) {
- report_systemtime += five_minutes;
- if (clock_backward_count) {
- msyslog(LOG_WARNING,
- "clock would have gone backward %d times, "
- "max %.1f usec",
- clock_backward_count,
- clock_backward_max / 10.);
-
- clock_backward_max = CLOCK_BACK_THRESHOLD;
- clock_backward_count = 0;
- }
- }
- reset_ctr_freq_timer(next_period_time, now_time.ull);
-}
-
-
-void
-reset_ctr_freq_timer_abs(
- ULONGLONG when
- )
-{
- FT_ULL fire_time;
-
- fire_time.ull = when;
- SetWaitableTimer(
- ctr_freq_timer,
- &fire_time.li, /* first fire */
- 0, /* not periodic */
- ctr_freq_timer_fired, /* callback routine */
- NULL, /* context for callback */
- FALSE); /* do not interfere with power saving */
-}
-
-
-void
-reset_ctr_freq_timer(
- ULONGLONG when,
- ULONGLONG now
- )
-{
- if (when - now >
- (tune_ctr_freq_max_interval * HECTONANOSECONDS + HECTONANOSECONDS))
- when = now + tune_ctr_freq_max_interval * HECTONANOSECONDS;
-
- reset_ctr_freq_timer_abs(when);
-}
-
-
-void
-start_ctr_freq_timer(
- ULONGLONG now_time
- )
-{
- ULONGLONG when;
-
- ctr_freq_timer = CreateWaitableTimer(NULL, FALSE, NULL);
- when = now_time;
- ROUND_TO_NEXT_SEC_BOTTOM(when);
-
- reset_ctr_freq_timer_abs(when);
-}
-
-
-/*
- * tune_ctr_freq is called once per tune_ctr_period seconds
- * with a counter difference and time difference.
- */
-void
-tune_ctr_freq(
- LONGLONG ctr_delta,
- LONGLONG time_delta
- )
-{
- static unsigned count = 0;
- static unsigned dispcount = 0;
- static unsigned report_at_count = 0;
- static int disbelieved = 0;
- static int i = 0;
- static double nom_freq = 0;
- static LONGLONG diffs[TUNE_CTR_DEPTH] = {0};
- static LONGLONG sum = 0;
- char ctr_freq_eq[64];
- LONGLONG delta;
- LONGLONG deltadiff;
- ULONGLONG ObsPerfCtrFreq;
- double freq;
- double this_freq;
- BOOL isneg;
-
- /* one-time initialization */
- if (!report_at_count) {
- report_at_count = 24 * 60 * 60 / tune_ctr_period;
- nom_freq = NomPerfCtrFreq / 1e6;
- }
-
- /* delta is the per-second observed frequency this time */
- delta = (LONGLONG)((double)ctr_delta * HECTONANOSECONDS /
- time_delta);
-
- /* disbelieve any delta more than +/- 976 PPM from nominal */
- deltadiff = delta - NomPerfCtrFreq;
- if (0 > deltadiff) {
- isneg = TRUE;
- deltadiff = -deltadiff;
- } else {
- isneg = FALSE;
- }
-
- if ((ULONGLONG)deltadiff > (NomPerfCtrFreq / 1024)) {
- disbelieved++;
- dispcount++;
-#ifdef DEBUG
- msyslog(LOG_DEBUG, "ctr delta %s%lld exceeds limit %llu",
- (isneg) ? "-" : "",
- deltadiff,
- NomPerfCtrFreq / 1024);
-#endif
- } else {
-
- /*
- * collect average over TUNE_CTR_DEPTH samples
- * for our PerfCtrFreq trimming.
- */
-
- if (isneg)
- deltadiff = -deltadiff;
- sum -= diffs[i];
- diffs[i] = deltadiff;
- sum += deltadiff;
- i = (i + 1) % COUNTOF(diffs);
- count++;
- dispcount++;
- }
-
- this_freq = delta / 1e6;
-
- ObsPerfCtrFreq = NomPerfCtrFreq + (sum / COUNTOF(diffs));
-
-#if 1 /* #if 0 to disable changing freq used */
- /* get rid of ObsPerfCtrFreq when removing the #ifdef */
- PerfCtrFreq = ObsPerfCtrFreq;
-#endif
- freq = PerfCtrFreq / 1e6;
-
- /*
- * make the performance counter's frequency error from its
- * nominal rate, expressed in PPM, available via ntpq as
- * system variable "ctr_frequency". This is consistent with
- * "frequency" which is the system clock drift in PPM.
- */
- snprintf(ctr_freq_eq, sizeof(ctr_freq_eq), "ctr_frequency=%.2f",
- 1e6 * (freq - nom_freq) / nom_freq);
- set_sys_var(ctr_freq_eq, strlen(ctr_freq_eq) + 1, RO | DEF);
-
- /*
- * report observed ctr freq each time the estimate used during
- * startup moves toward the observed freq from the nominal.
- */
-
- if (count > COUNTOF(diffs) &&
- /* (count % COUNTOF(diffs)) && */ /* enables reporting each */
- dispcount < report_at_count) /* TUNE_CTR_DEPTH samples */
- return;
-
- NLOG(NLOG_CLOCKINFO)
- if (count <= COUNTOF(diffs))
- /* moving to observed freq. from nominal (startup) */
- msyslog(LOG_INFO,
- (freq > 100)
- ? "ctr %.3f MHz %+6.2f PPM using %.3f MHz %+6.2f PPM"
- : "ctr %.6f MHz %+6.2f PPM using %.6f MHz %+6.2f PPM",
- this_freq,
- 1e6 * (this_freq - nom_freq) / nom_freq,
- freq,
- 1e6 * (freq - nom_freq) / nom_freq);
- else
- /* steady state */
- msyslog(LOG_INFO,
- (freq > 100)
- ? "ctr %.3f MHz %+.2f PPM"
- : "ctr %.6f MHz %+.2f PPM",
- freq,
- 1e6 * (freq - nom_freq) / nom_freq);
-
- if (disbelieved) {
- msyslog(LOG_ERR,
- "%d ctr samples exceed +/- 976 PPM range gate",
- disbelieved);
- disbelieved = 0;
- }
-
- dispcount = 0;
-}
-
-
-/*
- * add_counter_time_pair is called by the
- * high priority clock thread with each new
- * baseline counter/time correlation.
- */
-void
-add_counter_time_pair(
- ULONGLONG ctr,
- LONGLONG time
- )
-{
- int i;
-
- i = (newest_baseline + 1) % BASELINES_TOT;
-
- baseline_counts[i] = ctr;
- baseline_times[i] = time;
-
- newest_baseline = i;
-}
-
-
-/*
- * interp_time estimates NT time in 100ns units
- * based on a performance counter value given.
- * This must tolerate recent historical counters
- * as well as current. When current is FALSE
- * we can't assume ctr is the latest/highest
- * seen.
- */
-ULONGLONG
-interp_time(
- ULONGLONG ctr,
- BOOL current
- )
-{
- static __declspec(thread) int last_newest = -1;
- static __declspec(thread) int last_newest_gen;
- static __declspec(thread) int best_index;
- ULONGLONG this_ctr;
- LONGLONG this_time;
- LONGLONG latest_time;
- LONGLONG ctr_diff;
- int i;
- int i_gen;
- int c;
-
- /*
- * Use the system time (roughly synchronised to the tick, and
- * extrapolated using the system performance counter.
- *
- * Cache the results per thread and only repeat the
- * calculation when new data has arrived.
- */
- i = newest_baseline;
- i_gen = newest_baseline_gen;
-
- if (last_newest == i && last_newest_gen == i_gen) {
- this_time = baseline_times[best_index];
- ctr_diff = ctr - baseline_counts[best_index];
- this_time += (LONGLONG)PERF2HNS((double)ctr_diff);
-
- return this_time;
- }
-
- last_newest = i;
- last_newest_gen = i_gen;
-
- latest_time = 0;
-
- /*
- * Run through the history calculating the interpolated
- * time based on each counter/time correlation in turn,
- * and believe the latest one. This is akin to the NTP
- * protocol minimum delay clock filter. Errors due to
- * counter/time correlations with stale time are all
- * negative.
- */
- for (c = 0; c < BASELINES_USED; c++) {
- if (baseline_times[i]) {
- this_time = baseline_times[i];
- this_ctr = baseline_counts[i];
-
- ctr_diff = ctr - this_ctr;
-
- if (current && ctr_diff < 0) {
- /*
- * The performance counter apparently went
- * backwards without rolling over. It might
- * be nice to complain but we don't want
- * to do it repeatedly.
- */
- ctr_diff = 0;
- }
-
- this_time += (LONGLONG)PERF2HNS((double)ctr_diff);
-
- if (this_time > latest_time) {
- latest_time = this_time;
- best_index = i;
- }
- }
- i = i ? (i - 1) : (BASELINES_TOT - 1);
- }
-
- return latest_time;
-}
diff --git a/ports/winnt/ntpd/ntp_iocompletionport.c b/ports/winnt/ntpd/ntp_iocompletionport.c
deleted file mode 100644
index 046d6cda1e2b..000000000000
--- a/ports/winnt/ntpd/ntp_iocompletionport.c
+++ /dev/null
@@ -1,1639 +0,0 @@
-/*
------------------------------------------------------------------------
-This is the IO completion port handling for async/overlapped IO on
-Windows >= Win2000.
-
-Some notes on the implementation:
-
-+ Only one thread is used to serve the IO completion port, for several
- reasons:
-
- * First, there seems to be (have been?) trouble that locked up NTPD
- when more than one thread was used for IOCPL.
-
- * Second, for the sake of the time stamp interpolation the threads
- must run on the same CPU as the time interpolation thread. This
- makes using more than one thread useless, as they would compete for
- the same core and create contention.
-
-+ Some IO operations need a possibly lengthy postprocessing. Emulating
- the UN*X line discipline is currently the only but prominent example.
- To avoid the processing in the time-critical IOCPL thread, longer
- processing is offloaded the worker thread pool.
-
-+ A fact that seems not as well-known as it should be is that all
- ressources passed to an overlapped IO operation must be considered
- owned by the OS until the result has been fetched/dequeued. This
- includes all overlapped structures and buffers involved, so cleaning
- up on shutdown must be carefully constructed. (This includes closing
- all the IO handles and waiting for the results to be dequeued.
- 'CancleIo()' cannot be used since it's broken beyond repair.)
-
- If this is not possible, then all ressources should be dropped into
- oblivion -- otherwise "bad things (tm)" are bound to happen.
-
- Using a private heap that is silently dropped but not deleted is a
- good way to avoid cluttering memory stats with IO context related
- objects. Leak tracing becomes more interesting, though.
-
-
-The current implementation is based on the work of Danny Mayer who improved
-the original implementation and Dave Hart who improved on the serial I/O
-routines. The true roots of this file seem to be shrouded by the mist of time...
-
-
-This version still provides the 'user space PPS' emulation
-feature.
-
-Juergen Perlinger (perlinger@ntp.org) Feb 2012
-
------------------------------------------------------------------------
-*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_IO_COMPLETION_PORT
-
-#include <stddef.h>
-#include <stdio.h>
-#include <process.h>
-#include <syslog.h>
-
-#include "ntpd.h"
-#include "ntp_machine.h"
-#include "ntp_iocompletionport.h"
-#include "ntp_request.h"
-#include "ntp_assert.h"
-#include "ntp_io.h"
-#include "ntp_lists.h"
-
-
-#define CONTAINEROF(p, type, member) \
- ((type *)((char *)(p) - offsetof(type, member)))
-
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable: 201) /* nonstd extension nameless union */
-#endif
-
-/*
- * ---------------------------------------------------------------------
- * storage type for PPS data (DCD change counts & times)
- * ---------------------------------------------------------------------
- */
-struct PpsData {
- u_long cc_assert;
- u_long cc_clear;
- l_fp ts_assert;
- l_fp ts_clear;
-};
-typedef struct PpsData PPSData_t;
-
-struct PpsDataEx {
- u_long cov_count;
- PPSData_t data;
-};
-typedef volatile struct PpsDataEx PPSDataEx_t;
-
-/*
- * ---------------------------------------------------------------------
- * device context; uses reference counting to avoid nasty surprises.
- * Currently this stores only the PPS time stamps, but it could be
- * easily extended.
- * ---------------------------------------------------------------------
- */
-#define PPS_QUEUE_LEN 8u /* must be power of two! */
-#define PPS_QUEUE_MSK (PPS_QUEUE_LEN-1) /* mask for easy MOD ops */
-
-struct DeviceContext {
- volatile long ref_count;
- volatile u_long cov_count;
- PPSData_t pps_data;
- PPSDataEx_t pps_buff[PPS_QUEUE_LEN];
-};
-
-typedef struct DeviceContext DevCtx_t;
-
-/*
- * ---------------------------------------------------------------------
- * I/O context structure
- *
- * This is an extended overlapped structure. Some fields are only used
- * for serial I/O, others are used for all operations. The serial I/O is
- * more interesting since the same context object is used for waiting,
- * actual I/O and possibly offload processing in a worker thread until
- * a complete operation cycle is done.
- *
- * In this case the I/O context is used to gather all the bits that are
- * finally needed for the processing of the buffer.
- * ---------------------------------------------------------------------
- */
-//struct IoCtx;
-typedef struct IoCtx IoCtx_t;
-typedef struct refclockio RIO_t;
-
-typedef void (*IoCompleteFunc)(ULONG_PTR, IoCtx_t *);
-
-struct IoCtx {
- OVERLAPPED ol; /* 'kernel' part of the context */
- union {
- recvbuf_t * recv_buf; /* incoming -> buffer structure */
- void * trans_buf; /* outgoing -> char array */
- PPSData_t * pps_buf; /* for reading PPS seq/stamps */
- HANDLE ppswake; /* pps wakeup for attach */
- };
- IoCompleteFunc onIoDone; /* HL callback to execute */
- RIO_t * rio; /* RIO backlink (for offload) */
- DevCtx_t * devCtx;
- l_fp DCDSTime; /* PPS-hack: time of DCD ON */
- l_fp FlagTime; /* timestamp of flag/event char */
- l_fp RecvTime; /* timestamp of callback */
- DWORD errCode; /* error code of last I/O */
- DWORD byteCount; /* byte count " */
- DWORD com_events; /* buffer for COM events */
- unsigned int flRawMem : 1; /* buffer is raw memory -> free */
- unsigned int flTsDCDS : 1; /* DCDSTime valid? */
- unsigned int flTsFlag : 1; /* FlagTime valid? */
-};
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-/*
- * local function definitions
- */
-static void ntpd_addremove_semaphore(HANDLE, int);
-static inline void set_serial_recv_time (recvbuf_t *, IoCtx_t *);
-
-/* Initiate/Request async IO operations */
-static BOOL QueueSerialWait (RIO_t *, recvbuf_t *, IoCtx_t *);
-static BOOL QueueSerialRead (RIO_t *, recvbuf_t *, IoCtx_t *);
-static BOOL QueueRawSerialRead(RIO_t *, recvbuf_t *, IoCtx_t *);
-static BOOL QueueSocketRecv (SOCKET , recvbuf_t *, IoCtx_t *);
-
-
-/* High-level IO callback functions */
-static void OnSocketRecv (ULONG_PTR, IoCtx_t *);
-static void OnSerialWaitComplete (ULONG_PTR, IoCtx_t *);
-static void OnSerialReadComplete (ULONG_PTR, IoCtx_t *);
-static void OnRawSerialReadComplete(ULONG_PTR, IoCtx_t *);
-static void OnSerialWriteComplete (ULONG_PTR, IoCtx_t *);
-
-/* worker pool offload functions */
-static DWORD WINAPI OnSerialReadWorker(void * ctx);
-
-
-/* keep a list to traverse to free memory on debug builds */
-#ifdef DEBUG
-static void free_io_completion_port_mem(void);
-#endif
-
-
- HANDLE WaitableExitEventHandle;
- HANDLE WaitableIoEventHandle;
-static HANDLE hIoCompletionPort;
-
-DWORD ActiveWaitHandles;
-HANDLE WaitHandles[16];
-
-/*
- * -------------------------------------------------------------------
- * We make a pool of our own for IO context objects -- the are owned by
- * the system until a completion result is pulled from the queue, and
- * they seriously go into the way of memory tracking until we can safely
- * cancel an IO request.
- * -------------------------------------------------------------------
- */
-static HANDLE hHeapHandle;
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Create a new heap for IO context objects
- */
-static void
-IoCtxPoolInit(
- size_t initObjs
- )
-{
- hHeapHandle = HeapCreate(0, initObjs * sizeof(IoCtx_t), 0);
- if (hHeapHandle == NULL) {
- msyslog(LOG_ERR, "Can't initialize Heap: %m");
- exit(1);
- }
-}
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- *
- * Delete the IO context heap
- *
- * Since we do not know what callbacks are pending, we just drop the
- * pool into oblivion. New allocs and frees will fail from this moment,
- * but we simply don't care. At least the normal heap dump stats will
- * show no leaks from IO context blocks. On the downside, we have to
- * track them ourselves if something goes wrong.
- */
-static void
-IoCtxPoolDone(void)
-{
- hHeapHandle = NULL;
-}
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Alloc & Free on local heap
- *
- * When the heap handle is NULL, these both will fail; Alloc with a NULL
- * return and Free silently.
- */
-static void * __fastcall
-LocalPoolAlloc(
- size_t size,
- const char * desc
-)
-{
- void * ptr;
-
- /* Windows heaps can't grok zero byte allocation.
- * We just get one byte.
- */
- if (size == 0)
- size = 1;
- if (hHeapHandle != NULL)
- ptr = HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, size);
- else
- ptr = NULL;
- DPRINTF(3, ("Allocate '%s', heap=%p, ptr=%p\n",
- desc, hHeapHandle, ptr));
-
- return ptr;
-}
-
-static void __fastcall
-LocalPoolFree(
- void * ptr,
- const char * desc
- )
-{
- DPRINTF(3, ("Free '%s', heap=%p, ptr=%p\n",
- desc, hHeapHandle, ptr));
- if (ptr != NULL && hHeapHandle != NULL)
- HeapFree(hHeapHandle, 0, ptr);
-}
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Alloc & Free of Device context
- *
- * When the heap handle is NULL, these both will fail; Alloc with a NULL
- * return and Free silently.
- */
-static DevCtx_t * __fastcall
-DevCtxAlloc(void)
-{
- DevCtx_t * devCtx;
- u_long slot;
-
- /* allocate struct and tag all slots as invalid */
- devCtx = (DevCtx_t *)LocalPoolAlloc(sizeof(DevCtx_t), "DEV ctx");
- if (devCtx != NULL)
- {
- /* The initial COV values make sure there is no busy
- * loop on unused/empty slots.
- */
- devCtx->cov_count = 0;
- for (slot = 0; slot < PPS_QUEUE_LEN; slot++)
- devCtx->pps_buff[slot].cov_count = ~slot;
- }
- return devCtx;
-}
-
-static void __fastcall
-DevCtxFree(
- DevCtx_t * devCtx
- )
-{
- /* this would be the place to get rid of managed ressources. */
- LocalPoolFree(devCtx, "DEV ctx");
-}
-
-static DevCtx_t * __fastcall
-DevCtxAttach(
- DevCtx_t * devCtx
- )
-{
- if (devCtx != NULL)
- InterlockedIncrement(&devCtx->ref_count);
- return devCtx;
-}
-
-static void __fastcall
-DevCtxDetach(
- DevCtx_t * devCtx
- )
-{
- if (devCtx && !InterlockedDecrement(&devCtx->ref_count))
- DevCtxFree(devCtx);
-}
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Alloc & Free of I/O context
- *
- * When the heap handle is NULL, these both will fail; Alloc with a NULL
- * return and Free silently.
- */
-static IoCtx_t * __fastcall
-IoCtxAlloc(
- DevCtx_t * devCtx
- )
-{
- IoCtx_t * ioCtx;
-
- ioCtx = (IoCtx_t *)LocalPoolAlloc(sizeof(IoCtx_t), "IO ctx");
- if (ioCtx != NULL)
- ioCtx->devCtx = DevCtxAttach(devCtx);
- return ioCtx;
-}
-
-static void __fastcall
-IoCtxFree(
- IoCtx_t * ctx
- )
-{
- if (ctx)
- DevCtxDetach(ctx->devCtx);
- LocalPoolFree(ctx, "IO ctx");
-}
-
-static void __fastcall
-IoCtxReset(
- IoCtx_t * ctx
- )
-{
- RIO_t * rio;
- DevCtx_t * dev;
- if (ctx) {
- rio = ctx->rio;
- dev = ctx->devCtx;
- ZERO(*ctx);
- ctx->rio = rio;
- ctx->devCtx = dev;
- }
-}
-
-/*
- * -------------------------------------------------------------------
- * The IO completion thread and support functions
- *
- * There is only one completion thread, because it is locked to the same
- * core as the time interpolation. Having more than one causes core
- * contention and is not useful.
- * -------------------------------------------------------------------
- */
-static HANDLE hIoCompletionThread;
-static UINT tidCompletionThread;
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * The IO completion worker thread
- *
- * Note that this thread does not enter an alertable wait state and that
- * the only waiting point is the IO completion port. If stopping this
- * thread with a special queued result packet does not work,
- * 'TerminateThread()' is the only remaining weapon in the arsenal. A
- * dangerous weapon -- it's like SIGKILL.
- */
-static unsigned WINAPI
-iocompletionthread(void *NotUsed)
-{
- DWORD err;
- DWORD octets;
- ULONG_PTR key;
- OVERLAPPED * pol;
- IoCtx_t * lpo;
-
- UNUSED_ARG(NotUsed);
-
- /*
- * Socket and refclock receive call gettimeofday() so the I/O
- * thread needs to be on the same processor as the main and
- * timing threads to ensure consistent QueryPerformanceCounter()
- * results.
- *
- * This gets seriously into the way of efficient thread pooling
- * on multicore systems.
- */
- lock_thread_to_processor(GetCurrentThread());
-
- /*
- * Set the thread priority high enough so I/O will preempt
- * normal recv packet processing, but not higher than the timer
- * sync thread.
- */
- if (!SetThreadPriority(GetCurrentThread(),
- THREAD_PRIORITY_ABOVE_NORMAL))
- msyslog(LOG_ERR, "Can't set thread priority: %m");
-
- for(;;) {
- if (GetQueuedCompletionStatus(
- hIoCompletionPort,
- &octets,
- &key,
- &pol,
- INFINITE)) {
- err = ERROR_SUCCESS;
- } else {
- err = GetLastError();
- }
- if (NULL == pol) {
- DPRINTF(2, ("Overlapped IO Thread Exiting\n"));
- break; /* fail */
- }
- lpo = CONTAINEROF(pol, IoCtx_t, ol);
- get_systime(&lpo->RecvTime);
- lpo->byteCount = octets;
- lpo->errCode = err;
- handler_calls++;
- (*lpo->onIoDone)(key, lpo);
- }
-
- return 0;
-}
-
-/*
- * -------------------------------------------------------------------
- * Create/initialise the I/O creation port
- */
-void
-init_io_completion_port(void)
-{
-#ifdef DEBUG
- atexit(&free_io_completion_port_mem);
-#endif
-
- /* Create the context pool first. */
- IoCtxPoolInit(20);
-
- /* Create the event used to signal an IO event */
- WaitableIoEventHandle = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (WaitableIoEventHandle == NULL) {
- msyslog(LOG_ERR, "Can't create I/O event handle: %m");
- exit(1);
- }
- /* Create the event used to signal an exit event */
- WaitableExitEventHandle = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (WaitableExitEventHandle == NULL) {
- msyslog(LOG_ERR, "Can't create exit event handle: %m");
- exit(1);
- }
-
- /* Create the IO completion port */
- hIoCompletionPort = CreateIoCompletionPort(
- INVALID_HANDLE_VALUE, NULL, 0, 0);
- if (hIoCompletionPort == NULL) {
- msyslog(LOG_ERR, "Can't create I/O completion port: %m");
- exit(1);
- }
-
- /* Initialize the Wait Handles table */
- WaitHandles[0] = WaitableIoEventHandle;
- WaitHandles[1] = WaitableExitEventHandle; /* exit request */
- WaitHandles[2] = WaitableTimerHandle;
- ActiveWaitHandles = 3;
-
- /*
- * Supply ntp_worker.c with function to add or remove a
- * semaphore to the ntpd I/O loop which is signalled by a worker
- * when a response is ready. The callback is invoked in the
- * parent.
- */
- addremove_io_semaphore = &ntpd_addremove_semaphore;
-
- /*
- * Have one thread servicing I/O. See rationale in front matter.
- */
- hIoCompletionThread = (HANDLE)_beginthreadex(
- NULL,
- 0,
- iocompletionthread,
- NULL,
- 0,
- &tidCompletionThread);
-}
-
-
-/*
- * -------------------------------------------------------------------
- * completion port teardown
- */
-void
-uninit_io_completion_port(
- void
- )
-{
- DWORD rc;
-
- /* do noting if completion port already gone. */
- if (NULL == hIoCompletionPort)
- return;
-
- /*
- * Service thread seems running. Terminate him with grace
- * first and force later...
- */
- if (tidCompletionThread != GetCurrentThreadId()) {
- PostQueuedCompletionStatus(hIoCompletionPort, 0, 0, 0);
- rc = WaitForSingleObject(hIoCompletionThread, 5000);
- if (rc == WAIT_TIMEOUT) {
- /* Thread lost. Kill off with TerminateThread. */
- msyslog(LOG_ERR,
- "IO completion thread refuses to terminate");
- TerminateThread(hIoCompletionThread, ~0UL);
- }
- }
-
- /* stop using the memory pool */
- IoCtxPoolDone();
-
- /* now reap all handles... */
- CloseHandle(hIoCompletionThread);
- hIoCompletionThread = NULL;
- CloseHandle(hIoCompletionPort);
- hIoCompletionPort = NULL;
-}
-
-
-/*
- * -------------------------------------------------------------------
- * external worker thread support (wait handle stuff)
- *
- * !Attention!
- *
- * - This function must only be called from the main thread. Changing
- * a set of wait handles while someone is waiting on it creates
- * undefined behaviour. Also there's no provision for mutual
- * exclusion when accessing global values.
- *
- * - It's not possible to register a handle that is already in the table.
- */
-static void
-ntpd_addremove_semaphore(
- HANDLE sem,
- int remove
- )
-{
- DWORD hi;
-
- /* search for a matching entry first. */
- for (hi = 3; hi < ActiveWaitHandles; hi++)
- if (sem == WaitHandles[hi])
- break;
-
- if (remove) {
- /*
- * If found, eventually swap with last entry to keep
- * the table dense.
- */
- if (hi < ActiveWaitHandles) {
- ActiveWaitHandles--;
- if (hi < ActiveWaitHandles)
- WaitHandles[hi] =
- WaitHandles[ActiveWaitHandles];
- WaitHandles[ActiveWaitHandles] = NULL;
- }
- } else {
- /*
- * Make sure the entry is not found and there is enough
- * room, then append to the table array.
- */
- if (hi >= ActiveWaitHandles) {
- NTP_INSIST(ActiveWaitHandles < COUNTOF(WaitHandles));
- WaitHandles[ActiveWaitHandles] = sem;
- ActiveWaitHandles++;
- }
- }
-}
-
-
-#ifdef DEBUG
-static void
-free_io_completion_port_mem(
- void
- )
-{
- /*
- * At the moment, do absolutely nothing. Returning memory here
- * requires NO PENDING OVERLAPPED OPERATIONS AT ALL at this
- * point in time, and as long we cannot be reasonable sure about
- * that the simple advice is:
- *
- * HANDS OFF!
- */
-}
-#endif /* DEBUG */
-
-
-/*
- * -------------------------------------------------------------------
- * Serial IO stuff
- *
- * Prelude -- common error checking code
- * -------------------------------------------------------------------
- */
-extern char * NTstrerror(int err, BOOL *bfreebuf);
-
-static BOOL
-IoResultCheck(
- DWORD err,
- IoCtx_t * ctx,
- const char * msg
- )
-{
- char * msgbuf;
- BOOL dynbuf;
-
- /* If the clock is not / no longer active, assume
- * 'ERROR_OPERATION_ABORTED' and do the necessary cleanup.
- */
- if (ctx->rio && !ctx->rio->active)
- err = ERROR_OPERATION_ABORTED;
-
- switch (err)
- {
- /* The first ones are no real errors. */
- case ERROR_SUCCESS: /* all is good */
- case ERROR_IO_PENDING: /* callback pending */
- return TRUE;
-
- /* the next ones go silently -- only cleanup is done */
- case ERROR_INVALID_PARAMETER: /* handle already closed */
- case ERROR_OPERATION_ABORTED: /* handle closed while wait */
- break;
-
-
- default:
- /*
- * We have to resort to the low level error formatting
- * functions here, since the error code can be an
- * overlapped result. Relying the value to be the same
- * as the 'GetLastError()' result at this point of
- * execution is shaky at best, and using SetLastError()
- * to force it seems too nasty.
- */
- msgbuf = NTstrerror(err, &dynbuf);
- msyslog(LOG_ERR, "%s: err=%u, '%s'", msg, err, msgbuf);
- if (dynbuf)
- LocalFree(msgbuf);
- break;
- }
-
- /* If we end here, we have to mop up the buffer and context */
- if (ctx->flRawMem) {
- if (ctx->trans_buf)
- free(ctx->trans_buf);
- } else {
- if (ctx->recv_buf)
- freerecvbuf(ctx->recv_buf);
- }
- IoCtxFree(ctx);
- return FALSE;
-}
-
-/*
- * -------------------------------------------------------------------
- * Serial IO stuff
- *
- * Part 1 -- COMM event handling
- * -------------------------------------------------------------------
- */
-
-static BOOL
-QueueSerialWait(
- RIO_t * rio,
- recvbuf_t * buff,
- IoCtx_t * lpo
- )
-{
- BOOL rc;
-
- lpo->onIoDone = OnSerialWaitComplete;
- lpo->recv_buf = buff;
- lpo->flRawMem = 0;
- lpo->rio = rio;
- buff->fd = rio->fd;
-
- rc = WaitCommEvent((HANDLE)_get_osfhandle(rio->fd),
- &lpo->com_events, &lpo->ol);
- if (!rc)
- return IoResultCheck(GetLastError(), lpo,
- "Can't wait on Refclock");
- return TRUE;
-}
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-
-static void
-OnSerialWaitComplete(
- ULONG_PTR key,
- IoCtx_t * lpo
- )
-{
- RIO_t * rio;
- DevCtx_t * dev;
- recvbuf_t * buff;
- PPSDataEx_t * ppsbuf;
- DWORD modem_status;
- u_long covc;
-
- /* check and bail out if operation failed */
- if (!IoResultCheck(lpo->errCode, lpo,
- "WaitCommEvent failed"))
- return;
-
- /* get & validate context and buffer. */
- rio = (RIO_t *)key;
- buff = lpo->recv_buf;
- dev = lpo->devCtx;
-
- NTP_INSIST(rio == lpo->rio);
-
-#ifdef DEBUG
- if (~(EV_RXFLAG | EV_RLSD | EV_RXCHAR) & lpo->com_events) {
- msyslog(LOG_ERR, "WaitCommEvent returned unexpected mask %x",
- lpo->com_events);
- exit(-1);
- }
-#endif
- /*
- * Take note of changes on DCD; 'user mode PPS hack'.
- * perlinger@ntp.org suggested a way of solving several problems with
- * this code that makes a lot of sense: move to a putative
- * dcdpps-ppsapi-provider.dll.
- */
- if (EV_RLSD & lpo->com_events) {
- modem_status = 0;
- GetCommModemStatus((HANDLE)_get_osfhandle(rio->fd),
- &modem_status);
-
- if (dev != NULL) {
- /* PPS-context available -- use it! */
- if (MS_RLSD_ON & modem_status) {
- dev->pps_data.cc_assert++;
- dev->pps_data.ts_assert = lpo->RecvTime;
- DPRINTF(2, ("upps-real: fd %d DCD PPS Rise at %s\n", rio->fd,
- ulfptoa(&lpo->RecvTime, 6)));
- } else {
- dev->pps_data.cc_clear++;
- dev->pps_data.ts_clear = lpo->RecvTime;
- DPRINTF(2, ("upps-real: fd %d DCD PPS Fall at %s\n", rio->fd,
- ulfptoa(&lpo->RecvTime, 6)));
- }
- /*
- ** Update PPS buffer, writing from low to high, with index
- ** update as last action. We use interlocked ops and a
- ** volatile data destination to avoid reordering on compiler
- ** and CPU level. The interlocked instruction act as full
- ** barriers -- we need only release semantics, but we don't
- ** have them before VS2010.
- */
- covc = dev->cov_count + 1u;
- ppsbuf = dev->pps_buff + (covc & PPS_QUEUE_MSK);
- InterlockedExchange((PLONG)&ppsbuf->cov_count, covc);
- ppsbuf->data = dev->pps_data;
- InterlockedExchange((PLONG)&dev->cov_count, covc);
- }
- /* perlinger@ntp.org, 2012-11-19
- It can be argued that once you have the PPS API active, you can
- disable the old pps hack. This would give a behaviour that's much
- more like the behaviour under a UN*Xish OS. On the other hand, it
- will give a nasty surprise for people which have until now happily
- taken the pps hack for granted, and after the first complaint, I have
- decided to keep the old implementation unconditionally. So here it is:
-
- /* backward compat: 'usermode-pps-hack' */
- if (MS_RLSD_ON & modem_status) {
- lpo->DCDSTime = lpo->RecvTime;
- lpo->flTsDCDS = 1;
- DPRINTF(2, ("upps-hack: fd %d DCD PPS Rise at %s\n", rio->fd,
- ulfptoa(&lpo->RecvTime, 6)));
- }
- }
-
- /* If IO ready, read data. Go back waiting else. */
- if (EV_RXFLAG & lpo->com_events) { /* line discipline */
- lpo->FlagTime = lpo->RecvTime;
- lpo->flTsFlag = 1;
- QueueSerialRead(rio, buff, lpo);
- } else if (EV_RXCHAR & lpo->com_events) { /* raw discipline */
- lpo->FlagTime = lpo->RecvTime;
- lpo->flTsFlag = 1;
- QueueRawSerialRead(rio, buff, lpo);
- } else { /* idle... */
- QueueSerialWait(rio, buff, lpo);
- }
-}
-
-/*
- * -------------------------------------------------------------------
- * Serial IO stuff
- *
- * Part 2 -- line discipline emulation
- *
- * Ideally this should *not* be done in the IO completion thread.
- * We use a worker pool thread to offload the low-level processing.
- * -------------------------------------------------------------------
- */
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Start & Queue a serial read for line discipline emulation.
- */
-static BOOL
-QueueSerialRead(
- RIO_t * rio,
- recvbuf_t * buff,
- IoCtx_t * lpo
- )
-{
- BOOL rc;
-
- lpo->onIoDone = &OnSerialReadComplete;
- lpo->recv_buf = buff;
- lpo->flRawMem = 0;
- lpo->rio = rio;
- buff->fd = rio->fd;
-
- rc = ReadFile((HANDLE)_get_osfhandle(rio->fd),
- (char*)buff->recv_buffer + buff->recv_length,
- sizeof(buff->recv_buffer) - buff->recv_length,
- NULL, &lpo->ol);
- if (!rc)
- return IoResultCheck(GetLastError(), lpo,
- "Can't read from Refclock");
- return TRUE;
-}
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * IO completion thread callback. Takes a time stamp and offloads the
- * real work to the worker pool ASAP.
- */
-static void
-OnSerialReadComplete(
- ULONG_PTR key,
- IoCtx_t * lpo
- )
-{
- RIO_t * rio;
- recvbuf_t * buff;
-
- /* check and bail out if operation failed */
- if (!IoResultCheck(lpo->errCode, lpo,
- "Read from Refclock failed"))
- return;
-
- /* get & validate context and buffer. */
- rio = lpo->rio;
- buff = lpo->recv_buf;
- NTP_INSIST((ULONG_PTR)rio == key);
-
- /* Offload to worker pool */
- if (!QueueUserWorkItem(&OnSerialReadWorker, lpo, WT_EXECUTEDEFAULT)) {
- msyslog(LOG_ERR,
- "Can't offload to worker thread, will skip data: %m");
- IoCtxReset(lpo);
- buff->recv_length = 0;
- QueueSerialWait(rio, buff, lpo);
- }
-}
-
-
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Worker pool offload function -- avoid lengthy operations in the IO
- * completion thread (affects timing...)
- *
- * This function does the real work of emulating the UN*X line
- * discipline. Since this involves allocation of additional buffers and
- * string parsing/copying, it is offloaded to the worker thread pool so
- * the IO completion thread can resume faster.
- */
-static DWORD WINAPI
-OnSerialReadWorker(void * ctx)
-{
- IoCtx_t * lpo;
- recvbuf_t * buff, *obuf;
- RIO_t * rio;
- char *sptr, *send, *dptr;
- BOOL eol;
- char ch;
-
- /* Get context back */
- lpo = (IoCtx_t*)ctx;
- buff = lpo->recv_buf;
- rio = lpo->rio;
- /*
- * ignore 0 bytes read due to closure on fd.
- * Eat the first line of input as it's possibly partial.
- */
- if (lpo->byteCount && rio->recvcount++) {
- /* account for additional input */
- buff->recv_length += (int)lpo->byteCount;
-
- /*
- * Now mimic the Unix line discipline.
- */
- sptr = (char *)buff->recv_buffer;
- send = sptr + buff->recv_length;
- obuf = NULL;
- dptr = NULL;
-
- /* hack #1: eat away leading CR/LF if here is any */
- while (sptr != send) {
- ch = *sptr;
- if (ch != '\n' && ch != '\r')
- break;
- sptr++;
- }
-
- while (sptr != send)
- {
- /* get new buffer to store line */
- obuf = get_free_recv_buffer_alloc();
- obuf->fd = rio->fd;
- obuf->receiver = &process_refclock_packet;
- obuf->dstadr = NULL;
- obuf->recv_peer = rio->srcclock;
- set_serial_recv_time(obuf, lpo);
-
- /*
- * Copy data to new buffer, convert CR to LF on
- * the fly. Stop after either.
- */
- dptr = (char *)obuf->recv_buffer;
- eol = FALSE;
- while (sptr != send && !eol) {
- ch = *sptr++;
- if ('\r' == ch) {
- ch = '\n';
- }
- *dptr++ = ch;
- eol = ('\n' == ch);
- }
- obuf->recv_length =
- (int)(dptr - (char *)obuf->recv_buffer);
-
- /*
- * If NL found, push this buffer and prepare to
- * get a new one.
- */
- if (eol) {
- add_full_recv_buffer(obuf);
- SetEvent(WaitableIoEventHandle);
- obuf = NULL;
- }
- }
-
- /*
- * If we still have an output buffer, continue to fill
- * it again.
- */
- if (obuf) {
- obuf->recv_length =
- (int)(dptr - (char *)obuf->recv_buffer);
- freerecvbuf(buff);
- buff = obuf;
- } else {
- /* clear the current buffer, continue */
- buff->recv_length = 0;
- }
- } else {
- buff->recv_length = 0;
- }
-
- IoCtxReset(lpo);
- QueueSerialWait(rio, buff, lpo);
- return 0;
-}
-
-
-/*
- * -------------------------------------------------------------------
- * Serial IO stuff
- *
- * Part 3 -- raw data input
- *
- * Raw data processing is fast enough to do without offloading to the
- * worker pool, so this is rather short'n sweet...
- * -------------------------------------------------------------------
- */
-
-static BOOL
-QueueRawSerialRead(
- RIO_t * rio,
- recvbuf_t * buff,
- IoCtx_t * lpo
- )
-{
- BOOL rc;
-
- lpo->onIoDone = OnRawSerialReadComplete;
- lpo->recv_buf = buff;
- lpo->flRawMem = 0;
- lpo->rio = rio;
- buff->fd = rio->fd;
-
- rc = ReadFile((HANDLE)_get_osfhandle(rio->fd),
- buff->recv_buffer,
- sizeof(buff->recv_buffer),
- NULL, &lpo->ol);
- if (!rc)
- return IoResultCheck(GetLastError(), lpo,
- "Can't read raw from Refclock");
- return TRUE;
-}
-
-
-static void
-OnRawSerialReadComplete(
- ULONG_PTR key,
- IoCtx_t * lpo
- )
-{
- RIO_t * rio;
- recvbuf_t * buff;
-
- /* check and bail out if operation failed */
- if (!IoResultCheck(lpo->errCode, lpo,
- "Raw read from Refclock failed"))
- return;
-
- /* get & validate context and buffer. */
- rio = lpo->rio;
- buff = lpo->recv_buf;
- NTP_INSIST((ULONG_PTR)rio == key);
-
- /* ignore 0 bytes read. */
- if (lpo->byteCount > 0) {
- buff->recv_length = (int)lpo->byteCount;
- buff->dstadr = NULL;
- buff->receiver = process_refclock_packet;
- buff->recv_peer = rio->srcclock;
- set_serial_recv_time(buff, lpo);
- add_full_recv_buffer(buff);
- SetEvent(WaitableIoEventHandle);
- buff = get_free_recv_buffer_alloc();
- }
-
- buff->recv_length = 0;
- QueueSerialWait(rio, buff, lpo);
-}
-
-
-static inline void
-set_serial_recv_time(
- recvbuf_t * obuf,
- IoCtx_t * lpo
- )
-{
- /*
- * Time stamp assignment is interesting. If we
- * have a DCD stamp, we use it, otherwise we use
- * the FLAG char event time, and if that is also
- * not / no longer available we use the arrival
- * time.
- */
- if (lpo->flTsDCDS)
- obuf->recv_time = lpo->DCDSTime;
- else if (lpo->flTsFlag)
- obuf->recv_time = lpo->FlagTime;
- else
- obuf->recv_time = lpo->RecvTime;
-
- lpo->flTsDCDS = lpo->flTsFlag = 0; /* use only once... */
-}
-
-
-/*
- * -------------------------------------------------------------------
- * Serial IO stuff
- *
- * Part 4 -- Overlapped serial output
- *
- * Again, no need to offload any work.
- * -------------------------------------------------------------------
- */
-
-/*
- * async_write, clone of write(), used by some reflock drivers
- */
-int
-async_write(
- int fd,
- const void * data,
- unsigned int count
- )
-{
- IoCtx_t * lpo;
- BOOL rc;
-
- lpo = IoCtxAlloc(NULL);
- if (lpo == NULL) {
- DPRINTF(1, ("async_write: out of memory\n"));
- errno = ENOMEM;
- return -1;
- }
-
- lpo->onIoDone = OnSerialWriteComplete;
- lpo->trans_buf = emalloc(count);
- lpo->flRawMem = 1;
- memcpy(lpo->trans_buf, data, count);
-
- rc = WriteFile((HANDLE)_get_osfhandle(fd),
- lpo->trans_buf, count,
- NULL, &lpo->ol);
- if (!rc && !IoResultCheck(GetLastError(), lpo,
- "Can't write to Refclock")) {
- errno = EBADF;
- return -1;
- }
- return count;
-}
-
-static void
-OnSerialWriteComplete(
- ULONG_PTR key,
- IoCtx_t * lpo
- )
-{
- /* set RIO and force silent cleanup if no error */
- lpo->rio = (RIO_t *)key;
- if (ERROR_SUCCESS == lpo->errCode)
- lpo->errCode = ERROR_OPERATION_ABORTED;
- IoResultCheck(lpo->errCode, lpo,
- "Write to Refclock failed");
-}
-
-
-/*
- * -------------------------------------------------------------------
- * Serial IO stuff
- *
- * Part 5 -- read PPS time stamps
- *
- * -------------------------------------------------------------------
- */
-
-/* The dummy read procedure is used for getting the device context
- * into the IO completion thread, using the IO completion queue for
- * transport. There are other ways to accomplish what we need here,
- * but using the IO machine is handy and avoids a lot of trouble.
- */
-static void
-OnPpsDummyRead(
- ULONG_PTR key,
- IoCtx_t * lpo
- )
-{
- RIO_t * rio;
-
- rio = (RIO_t *)key;
- lpo->devCtx = DevCtxAttach(rio->device_context);
- SetEvent(lpo->ppswake);
-}
-
-__declspec(dllexport) void* __stdcall
-ntp_pps_attach_device(
- HANDLE hndIo
- )
-{
- IoCtx_t myIoCtx;
- HANDLE myEvt;
- DevCtx_t * dev;
- DWORD rc;
-
- if (!isserialhandle(hndIo)) {
- SetLastError(ERROR_INVALID_HANDLE);
- return NULL;
- }
-
- ZERO(myIoCtx);
- dev = NULL;
- myEvt = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (NULL == myEvt)
- goto done;
-
- myIoCtx.ppswake = myEvt;
- myIoCtx.onIoDone = OnPpsDummyRead;
- rc = ReadFile(hndIo, &myIoCtx.byteCount, 0,
- &myIoCtx.byteCount, &myIoCtx.ol);
- if (!rc && (GetLastError() != ERROR_IO_PENDING))
- goto done;
- if (WaitForSingleObject(myEvt, INFINITE) == WAIT_OBJECT_0)
- if (NULL == (dev = myIoCtx.devCtx))
- SetLastError(ERROR_INVALID_HANDLE);
-done:
- rc = GetLastError();
- CloseHandle(myEvt);
- SetLastError(rc);
- return dev;
-}
-
-__declspec(dllexport) void __stdcall
-ntp_pps_detach_device(
- DevCtx_t * dev
- )
-{
- DevCtxDetach(dev);
-}
-
-__declspec(dllexport) BOOL __stdcall
-ntp_pps_read(
- DevCtx_t * dev,
- PPSData_t * data,
- size_t dlen
- )
-{
- u_long guard, covc;
- int repc;
- PPSDataEx_t * ppsbuf;
-
-
- if (dev == NULL) {
- SetLastError(ERROR_INVALID_HANDLE);
- return FALSE;
- }
- if (data == NULL || dlen != sizeof(PPSData_t)) {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
- /*
- ** Reading from shared memory in a lock-free fashion can be
- ** a bit tricky, since we have to read the components in the
- ** opposite direction from the write, and the compiler must
- ** not reorder the read sequence.
- ** We use interlocked ops and a volatile data source to avoid
- ** reordering on compiler and CPU level. The interlocked
- ** instruction act as full barriers -- we need only aquire
- ** semantics, but we don't have them before VS2010.
- */
- repc = 3;
- do {
- InterlockedExchange((PLONG)&covc, dev->cov_count);
- ppsbuf = dev->pps_buff + (covc & PPS_QUEUE_MSK);
- *data = ppsbuf->data;
- InterlockedExchange((PLONG)&guard, ppsbuf->cov_count);
- guard ^= covc;
- } while (guard && ~guard && --repc);
-
- if (guard) {
- SetLastError(ERROR_INVALID_DATA);
- return FALSE;
- }
- return TRUE;
-}
-
-/*
- * Add a reference clock data structures I/O handles to
- * the I/O completion port. Return 1 if any error.
- */
-int
-io_completion_port_add_clock_io(
- RIO_t *rio
- )
-{
- IoCtx_t * lpo;
- DevCtx_t * dev;
- recvbuf_t * buff;
- HANDLE h;
-
- h = (HANDLE)_get_osfhandle(rio->fd);
- if (NULL == CreateIoCompletionPort(
- h,
- hIoCompletionPort,
- (ULONG_PTR)rio,
- 0)) {
- msyslog(LOG_ERR, "Can't add COM port to i/o completion port: %m");
- return 1;
- }
-
- dev = DevCtxAlloc();
- if (NULL == dev) {
- msyslog(LOG_ERR, "Can't allocate device context for i/o completion port: %m");
- return 1;
- }
- rio->device_context = DevCtxAttach(dev);
- lpo = IoCtxAlloc(dev);
- if (NULL == lpo) {
- msyslog(LOG_ERR, "Can't allocate heap for completion port: %m");
- return 1;
- }
- buff = get_free_recv_buffer_alloc();
- buff->recv_length = 0;
- QueueSerialWait(rio, buff, lpo);
-
- return 0;
-}
-
-void
-io_completion_port_remove_clock_io(
- RIO_t *rio
- )
-{
- if (rio)
- DevCtxDetach((DevCtx_t *)rio->device_context);
-}
-
-/*
- * Queue a receiver on a socket. Returns 0 if no buffer can be queued
- *
- * Note: As per the winsock documentation, we use WSARecvFrom. Using
- * ReadFile() is less efficient.
- */
-static BOOL
-QueueSocketRecv(
- SOCKET s,
- recvbuf_t * buff,
- IoCtx_t * lpo
- )
-{
- WSABUF wsabuf;
- DWORD Flags;
- int rc;
-
- lpo->onIoDone = OnSocketRecv;
- lpo->recv_buf = buff;
- lpo->flRawMem = 0;
- lpo->rio = NULL;
-
- Flags = 0;
- buff->fd = s;
- buff->recv_srcadr_len = sizeof(buff->recv_srcadr);
- wsabuf.buf = (char *)buff->recv_buffer;
- wsabuf.len = sizeof(buff->recv_buffer);
-
- rc = WSARecvFrom(buff->fd, &wsabuf, 1, NULL, &Flags,
- &buff->recv_srcadr.sa, &buff->recv_srcadr_len,
- &lpo->ol, NULL);
- if (SOCKET_ERROR == rc)
- return IoResultCheck(GetLastError(), lpo,
- "Can't read from Socket");
- return TRUE;
-}
-
-
-static void
-OnSocketRecv(
- ULONG_PTR key,
- IoCtx_t * lpo
- )
-{
- recvbuf_t * buff;
- recvbuf_t * newbuff;
- struct interface * inter = (struct interface *)key;
-
- NTP_REQUIRE(NULL != lpo);
- NTP_REQUIRE(NULL != lpo->recv_buf);
-
- /* check and bail out if operation failed */
- if (!IoResultCheck(lpo->errCode, lpo,
- "Read from Socket failed"))
- return;
-
- /*
- * Convert the overlapped pointer back to a recvbuf pointer.
- * Fetch items that are lost when the context is queued again.
- */
- buff = lpo->recv_buf;
- buff->recv_time = lpo->RecvTime;
- buff->recv_length = (int)lpo->byteCount;
-
- /*
- * Get a new recv buffer for the replacement socket receive
- */
- newbuff = get_free_recv_buffer_alloc();
- if (NULL != newbuff) {
- QueueSocketRecv(inter->fd, newbuff, lpo);
- } else {
- IoCtxFree(lpo);
- msyslog(LOG_ERR, "Can't add I/O request to socket");
- }
- DPRINTF(4, ("%sfd %d %s recv packet mode is %d\n",
- (MODE_BROADCAST == get_packet_mode(buff))
- ? " **** Broadcast "
- : "",
- (int)buff->fd, stoa(&buff->recv_srcadr),
- get_packet_mode(buff)));
-
- /*
- * If we keep it add some info to the structure
- */
- if (buff->recv_length && !inter->ignore_packets) {
- NTP_INSIST(buff->recv_srcadr_len <=
- sizeof(buff->recv_srcadr));
- buff->receiver = &receive;
- buff->dstadr = inter;
- packets_received++;
- handler_pkts++;
- inter->received++;
- add_full_recv_buffer(buff);
-
- DPRINTF(2, ("Received %d bytes fd %d in buffer %p from %s\n",
- buff->recv_length, (int)buff->fd, buff,
- stoa(&buff->recv_srcadr)));
-
- /*
- * Now signal we have something to process
- */
- SetEvent(WaitableIoEventHandle);
- } else
- freerecvbuf(buff);
-}
-
-
-/*
- * Add a socket handle to the I/O completion port, and send
- * NTP_RECVS_PER_SOCKET recv requests to the kernel.
- */
-int
-io_completion_port_add_socket(
- SOCKET fd,
- struct interface * inter
- )
-{
- IoCtx_t * lpo;
- recvbuf_t * buff;
- int n;
-
- if (fd != INVALID_SOCKET) {
- if (NULL == CreateIoCompletionPort((HANDLE)fd,
- hIoCompletionPort, (ULONG_PTR)inter, 0)) {
- msyslog(LOG_ERR,
- "Can't add socket to i/o completion port: %m");
- return 1;
- }
- }
-
- /*
- * Windows 2000 bluescreens with bugcheck 0x76
- * PROCESS_HAS_LOCKED_PAGES at ntpd process
- * termination when using more than one pending
- * receive per socket. A runtime version test
- * would allow using more on newer versions
- * of Windows.
- */
-
-#define WINDOWS_RECVS_PER_SOCKET 1
-
- for (n = 0; n < WINDOWS_RECVS_PER_SOCKET; n++) {
-
- buff = get_free_recv_buffer_alloc();
- lpo = IoCtxAlloc(NULL);
- if (lpo == NULL)
- {
- msyslog(LOG_ERR
- , "Can't allocate IO completion context: %m");
- return 1;
- }
-
- QueueSocketRecv(fd, buff, lpo);
-
- }
- return 0;
-}
-
-
-/*
- * io_completion_port_sendto() -- sendto() replacement for Windows
- *
- * Returns len after successful send.
- * Returns -1 for any error, with the error code available via
- * msyslog() %m, or GetLastError().
- */
-int
-io_completion_port_sendto(
- int fd,
- void * pkt,
- size_t len,
- sockaddr_u * dest
- )
-{
- static u_long time_next_ifscan_after_error;
- WSABUF wsabuf;
- DWORD octets_sent;
- DWORD Result;
- int errval;
- int AddrLen;
-
- wsabuf.buf = (void *)pkt;
- wsabuf.len = len;
- AddrLen = SOCKLEN(dest);
- octets_sent = 0;
-
- Result = WSASendTo(fd, &wsabuf, 1, &octets_sent, 0,
- &dest->sa, AddrLen, NULL, NULL);
- errval = GetLastError();
- if (SOCKET_ERROR == Result) {
- if (ERROR_UNEXP_NET_ERR == errval) {
- /*
- * We get this error when trying to send if the
- * network interface is gone or has lost link.
- * Rescan interfaces to catch on sooner, but no
- * more often than once per minute. Once ntpd
- * is able to detect changes without polling
- * this should be unneccessary
- */
- if (time_next_ifscan_after_error < current_time) {
- time_next_ifscan_after_error = current_time + 60;
- timer_interfacetimeout(current_time);
- }
- DPRINTF(4, ("sendto unexpected network error, interface may be down\n"));
- } else {
- msyslog(LOG_ERR, "WSASendTo(%s) error %m",
- stoa(dest));
- }
- SetLastError(errval);
- return -1;
- }
-
- if (len != (int)octets_sent) {
- msyslog(LOG_ERR, "WSASendTo(%s) sent %u of %d octets",
- stoa(dest), octets_sent, len);
- SetLastError(ERROR_BAD_LENGTH);
- return -1;
- }
-
- DPRINTF(4, ("sendto %s %d octets\n", stoa(dest), len));
-
- return len;
-}
-
-
-
-/*
- * GetReceivedBuffers
- * Note that this is in effect the main loop for processing requests
- * both send and receive. This should be reimplemented
- */
-int
-GetReceivedBuffers()
-{
- DWORD index;
- HANDLE ready;
- int have_packet;
-
- have_packet = FALSE;
- while (!have_packet) {
- index = WaitForMultipleObjects(ActiveWaitHandles,
- WaitHandles, FALSE,
- INFINITE);
- switch (index) {
-
- case WAIT_OBJECT_0 + 0: /* Io event */
- DPRINTF(4, ("IoEvent occurred\n"));
- have_packet = TRUE;
- break;
-
- case WAIT_OBJECT_0 + 1: /* exit request */
- exit(0);
- break;
-
- case WAIT_OBJECT_0 + 2: /* timer */
- timer();
- break;
-
- case WAIT_IO_COMPLETION: /* loop */
- break;
-
- case WAIT_TIMEOUT:
- msyslog(LOG_ERR,
- "WaitForMultipleObjects INFINITE timed out.");
- exit(1);
- break;
-
- case WAIT_FAILED:
- msyslog(LOG_ERR,
- "WaitForMultipleObjects Failed: Error: %m");
- exit(1);
- break;
-
- default:
- DEBUG_INSIST((index - WAIT_OBJECT_0) <
- ActiveWaitHandles);
- ready = WaitHandles[index - WAIT_OBJECT_0];
- handle_blocking_resp_sem(ready);
- break;
-
- } /* switch */
- }
-
- return (full_recvbuffs()); /* get received buffers */
-}
-
-#else
- static int NonEmptyCompilationUnit;
-#endif
-
diff --git a/ports/winnt/ntpd/ntservice.c b/ports/winnt/ntpd/ntservice.c
deleted file mode 100644
index f0840bdb9d6a..000000000000
--- a/ports/winnt/ntpd/ntservice.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-
-#include <ntp_stdlib.h>
-#include "syslog.h"
-#include "ntpd.h"
-#include "ntservice.h"
-#include "clockstuff.h"
-#include "ntp_iocompletionport.h"
-#include "ntpd-opts.h"
-#include "isc/win32os.h"
-#include <ssl_applink.c>
-
-
-/*
- * Globals
- */
-static SERVICE_STATUS_HANDLE hServiceStatus = 0;
-static BOOL foreground = FALSE;
-static BOOL computer_shutting_down = FALSE;
-static int glb_argc;
-static char **glb_argv;
-HANDLE hServDoneEvent = NULL;
-extern int accept_wildcard_if_for_winnt;
-
-/*
- * Forward declarations
- */
-void uninit_io_completion_port();
-int ntpdmain(int argc, char *argv[]);
-void WINAPI ServiceControl(DWORD dwCtrlCode);
-void ntservice_exit(void);
-
-#ifdef WRAP_DBG_MALLOC
-void *wrap_dbg_malloc(size_t s, const char *f, int l);
-void *wrap_dbg_realloc(void *p, size_t s, const char *f, int l);
-void wrap_dbg_free(void *p);
-#endif
-
-void WINAPI
-service_main(
- DWORD argc,
- LPTSTR *argv
- )
-{
- if (argc > 1) {
- /*
- * Let command line parameters from the Windows SCM GUI
- * override the standard parameters from the ImagePath registry key.
- */
- glb_argc = argc;
- glb_argv = argv;
- }
-
- ntpdmain(glb_argc, glb_argv);
-}
-
-
-/*
- * This is the entry point for the executable
- * We can call ntpdmain() explicitly or via StartServiceCtrlDispatcher()
- * as we need to.
- */
-int main(
- int argc,
- char ** argv
- )
-{
- int rc;
- int argc_after_opts;
- char ** argv_after_opts;
-
- ssl_applink();
-
- /* Save the command line parameters */
- glb_argc = argc;
- glb_argv = argv;
-
- /* Under original Windows NT we must not discard the wildcard */
- /* socket to workaround a bug in NT's getsockname(). */
- if (isc_win32os_majorversion() <= 4)
- accept_wildcard_if_for_winnt = TRUE;
-
- argc_after_opts = argc;
- argv_after_opts = argv;
- parse_cmdline_opts(&argc_after_opts, &argv_after_opts);
-
- if (HAVE_OPT(QUIT)
- || HAVE_OPT(SAVECONFIGQUIT)
- || HAVE_OPT(HELP)
-#ifdef DEBUG
- || OPT_VALUE_SET_DEBUG_LEVEL != 0
-#endif
- || HAVE_OPT(NOFORK))
- foreground = TRUE;
-
- if (foreground) /* run in console window */
- rc = ntpdmain(argc, argv);
- else {
- /* Start up as service */
-
- SERVICE_TABLE_ENTRY dispatchTable[] = {
- { TEXT(NTP_DISPLAY_NAME), service_main },
- { NULL, NULL }
- };
-
- rc = StartServiceCtrlDispatcher(dispatchTable);
- if (rc)
- rc = 0;
- else {
- rc = GetLastError();
- fprintf(stderr,
- "%s: unable to start as service:\n"
- "%s\n"
- "Use -d, -q, -n, -?, --help or "
- "--saveconfigquit to run "
- "interactive.\n",
- argv[0], ntp_strerror(rc));
- }
- }
- return rc;
-}
-
-
-/*
- * Initialize the Service by registering it.
- */
-void
-ntservice_init() {
- char ConsoleTitle[256];
-
- if (!foreground) {
- /* Register handler with the SCM */
- hServiceStatus = RegisterServiceCtrlHandler(NTP_DISPLAY_NAME,
- ServiceControl);
- if (!hServiceStatus) {
- NTReportError(NTP_SERVICE_NAME,
- "could not register service control handler");
- exit(1);
- }
- UpdateSCM(SERVICE_RUNNING);
- } else {
- snprintf(ConsoleTitle, sizeof(ConsoleTitle),
- "NTP Version %s", Version);
- ConsoleTitle[sizeof(ConsoleTitle) - 1] = '\0';
- SetConsoleTitle(ConsoleTitle);
- }
-
-#ifdef _CRTDBG_MAP_ALLOC
- /* ask the runtime to dump memory leaks at exit */
- _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF
- | _CRTDBG_LEAK_CHECK_DF /* report on leaks at exit */
- | _CRTDBG_CHECK_ALWAYS_DF /* Check heap every alloc/dealloc */
-#ifdef MALLOC_LINT
- | _CRTDBG_DELAY_FREE_MEM_DF /* Don't actually free memory */
-#endif
- );
-#ifdef DOES_NOT_WORK
- /*
- * hart: I haven't seen this work, running ntpd.exe -n from a shell
- * to both a file and the debugger output window. Docs indicate it
- * should cause leak report to go to stderr, but it's only seen if
- * ntpd runs under a debugger (in the debugger's output), even with
- * this block of code enabled.
- */
- _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
- _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
-#endif
-#endif /* using MS debug C runtime heap, _CRTDBG_MAP_ALLOC */
-
- atexit( ntservice_exit );
-}
-
-
-/*
- * Routine to check if the service is stopping
- * because the computer is shutting down
- */
-BOOL
-ntservice_systemisshuttingdown() {
- return computer_shutting_down;
-}
-
-void
-ntservice_exit( void )
-{
- uninit_io_completion_port();
- Sleep( 200 ); //##++
-
- reset_winnt_time();
-
- msyslog(LOG_INFO, "ntservice: The Network Time Protocol Service is stopping.");
-
- if (!foreground) {
- /* service mode, need to have the service_main routine
- * register with the service control manager that the
- * service has stopped running, before exiting
- */
- UpdateSCM(SERVICE_STOPPED);
- }
-}
-
-/*
- * ServiceControl(): Handles requests from the SCM and passes them on
- * to the service.
- */
-void WINAPI
-ServiceControl(
- DWORD dwCtrlCode
- )
-{
- switch (dwCtrlCode) {
-
- case SERVICE_CONTROL_SHUTDOWN:
- computer_shutting_down = TRUE;
- /* fall through to stop case */
-
- case SERVICE_CONTROL_STOP:
- if (WaitableExitEventHandle != NULL) {
- SetEvent(WaitableExitEventHandle);
- UpdateSCM(SERVICE_STOP_PENDING);
- Sleep(100); //##++
- }
- return;
-
- case SERVICE_CONTROL_PAUSE:
- case SERVICE_CONTROL_CONTINUE:
- case SERVICE_CONTROL_INTERROGATE:
- default:
- break;
- }
- UpdateSCM(SERVICE_RUNNING);
-}
-
-/*
- * Tell the Service Control Manager the state of the service.
- */
-void UpdateSCM(DWORD state) {
- SERVICE_STATUS ss;
- static DWORD dwState = SERVICE_STOPPED;
-
- if (hServiceStatus) {
- if (state)
- dwState = state;
-
- ZERO(ss);
- ss.dwServiceType |= SERVICE_WIN32_OWN_PROCESS;
- ss.dwCurrentState = dwState;
- ss.dwControlsAccepted = SERVICE_ACCEPT_STOP |
- SERVICE_ACCEPT_SHUTDOWN;
- ss.dwCheckPoint = 0;
- ss.dwServiceSpecificExitCode = 0;
- ss.dwWin32ExitCode = NO_ERROR;
- ss.dwWaitHint = dwState == SERVICE_STOP_PENDING ? 5000 : 1000;
-
- SetServiceStatus(hServiceStatus, &ss);
- }
-}
-
-BOOL WINAPI
-OnConsoleEvent(
- DWORD dwCtrlType
- )
-{
- switch (dwCtrlType) {
-#ifdef DEBUG
- case CTRL_BREAK_EVENT:
- if (debug > 0) {
- debug <<= 1;
- }
- else {
- debug = 1;
- }
- if (debug > 8) {
- debug = 0;
- }
- msyslog(LOG_DEBUG, "debug level %d", debug);
- break;
-#else
- case CTRL_BREAK_EVENT:
- break;
-#endif
-
- case CTRL_C_EVENT:
- case CTRL_CLOSE_EVENT:
- case CTRL_SHUTDOWN_EVENT:
- if (WaitableExitEventHandle != NULL) {
- SetEvent(WaitableExitEventHandle);
- Sleep(100); //##++
- }
- break;
-
- default :
- /* pass to next handler */
- return FALSE;
- }
-
- /* we've handled it, no more handlers should be called */
- return TRUE;
-}
-
diff --git a/ports/winnt/ntptrace/ntptrace.dsp b/ports/winnt/ntptrace/ntptrace.dsp
deleted file mode 100644
index ed8616a37802..000000000000
--- a/ports/winnt/ntptrace/ntptrace.dsp
+++ /dev/null
@@ -1,153 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ntptrace" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=ntptrace - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ntptrace.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ntptrace.mak" CFG="ntptrace - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ntptrace - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "ntptrace - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""$/ntp/dev/ports/winnt/ntptrace", AXBAAAAA"
-# PROP Scc_LocalPath "."
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ntptrace - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W4 /GX /O2 /I "\\" /I "$(OPENSSL)\inc32" /I "." /I "..\include" /I "..\..\..\include" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "__STDC__" /D "SYS_WINNT" /D "HAVE_CONFIG_H" /D _WIN32_WINNT=0x400 /YX"windows.h" /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "ntptrace - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "." /I "..\include" /I "..\..\..\include" /I "$(OPENSSL)\inc32" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "__STDC__" /D "SYS_WINNT" /D "HAVE_CONFIG_H" /D _WIN32_WINNT=0x400 /FR /YX"windows.h" /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/Debug/ntptrace.exe" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "ntptrace - Win32 Release"
-# Name "ntptrace - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\..\ntptrace\ntptrace.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\libntp\util_clockstuff.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\version.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\include\sys\ioctl.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\ntptrace\ntptrace.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\sys\resource.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Source File
-
-SOURCE=..\..\..\configure
-
-!IF "$(CFG)" == "ntptrace - Win32 Release"
-
-# Begin Custom Build
-ProjDir=.
-InputPath=..\..\..\configure
-
-"$(ProjDir)\version.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- echo Using NT Shell Script to generate version.c
- ..\scripts\mkver.bat -P ntptrace
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ntptrace - Win32 Debug"
-
-# Begin Custom Build
-ProjDir=.
-InputPath=..\..\..\configure
-
-"$(ProjDir)\version.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- echo Using NT Shell Script to generate version.c
- ..\scripts\mkver.bat -P ntptrace
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Target
-# End Project
diff --git a/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h b/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h
deleted file mode 100644
index 1007ccdd90c3..000000000000
--- a/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h
+++ /dev/null
@@ -1,714 +0,0 @@
-/***********************************************************************
- * *
- * Copyright (c) David L. Mills 1999-2000 *
- * *
- * Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and with or without fee is hereby *
- * granted, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission *
- * notice appear in supporting documentation, and that the name *
- * University of Delaware not be used in advertising or publicity *
- * pertaining to distribution of the software without specific, *
- * written prior permission. The University of Delaware makes no *
- * representations about the suitability this software for any *
- * purpose. It is provided "as is" without express or implied *
- * warranty. *
- * *
- ***********************************************************************
- * *
- * This header file complies with "Pulse-Per-Second API for UNIX-like *
- * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
- * and Marc Brett, from whom much of this code was shamelessly stolen. *
- * *
- * This modified timepps.h can be used to provide a PPSAPI interface *
- * to a machine running Windows with a suitably modified *
- * serialpps.sys being used in place of serial.sys. It can *
- * be extended to support a modified parallel port driver once *
- * available. *
- * *
- * This Windows version was derived by Dave Hart *
- * <davehart@davehart.com> from Mills' timepps-Solaris.h *
- * *
- ***********************************************************************
- * *
- * Some of this include file *
- * Copyright (c) 1999 by Ulrich Windl, *
- * based on code by Reg Clemens <reg@dwf.com> *
- * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
- * *
- ***********************************************************************
- * *
- * "THE BEER-WARE LICENSE" (Revision 42): *
- * <phk@FreeBSD.org> wrote this file. As long as you retain this *
- * notice you can do whatever you want with this stuff. If we meet some*
- * day, and you think this stuff is worth it, you can buy me a beer *
- * in return. Poul-Henning Kamp *
- * *
- **********************************************************************/
-
-#ifndef _SYS_TIMEPPS_H_
-#define _SYS_TIMEPPS_H_
-
-/* Implementation note: the logical states ``assert'' and ``clear''
- * are implemented in terms of the UART register, i.e. ``assert''
- * means the bit is set.
- */
-
-/*
- * The following definitions are architecture independent
- */
-
-#define PPS_API_VERS_1 1 /* API version number */
-#define PPS_JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
-#define PPS_NANOSECOND 1000000000L /* one nanosecond in decimal */
-#define PPS_FRAC 4294967296. /* 2^32 as a double */
-#define PPS_HECTONANOSECONDS 10000000 /* 100ns units in a second */
-#define PPS_FILETIME_1970 0x019db1ded53e8000 /* unix epoch to Windows */
-
-#define PPS_NORMALIZE(x) /* normalize timespec */ \
- do { \
- if ((x).tv_nsec >= PPS_NANOSECOND) { \
- (x).tv_nsec -= PPS_NANOSECOND; \
- (x).tv_sec++; \
- } else if ((x).tv_nsec < 0) { \
- (x).tv_nsec += PPS_NANOSECOND; \
- (x).tv_sec--; \
- } \
- } while (0)
-
-#define PPS_TSPECTONTP(x) /* convert timespec to ntp_fp */ \
- do { \
- double d_temp; \
- \
- (x).integral += (unsigned int)PPS_JAN_1970; \
- d_temp = (x).fractional * PPS_FRAC / PPS_NANOSECOND; \
- if (d_temp >= PPS_FRAC) \
- (x).integral++; \
- (x).fractional = (unsigned int)d_temp; \
- } while (0)
-
-#define PPS_NTPTOTSPEC(x) /* convert ntp_fp to timespec */ \
- do { \
- double d_temp; \
- \
- (x).tv_sec -= (time_t)PPS_JAN_1970; \
- d_temp = (double)((x).tv_nsec); \
- d_temp *= PPS_NANOSECOND; \
- d_temp /= PPS_FRAC; \
- (x).tv_nsec = (long)d_temp; \
- } while (0)
-
-
-/*
- * Device/implementation parameters (mode)
- */
-
-#define PPS_CAPTUREASSERT 0x01 /* capture assert events */
-#define PPS_CAPTURECLEAR 0x02 /* capture clear events */
-#define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */
-
-#define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */
-#define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */
-#define PPS_OFFSETBOTH 0x30 /* apply compensation for both */
-
-#define PPS_CANWAIT 0x100 /* Can we wait for an event? */
-#define PPS_CANPOLL 0x200 /* "This bit is reserved for */
-
-/*
- * Kernel actions (mode)
- */
-
-#define PPS_ECHOASSERT 0x40 /* feed back assert event to output */
-#define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */
-
-/*
- * Timestamp formats (tsformat)
- */
-
-#define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */
-#define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */
-
-/*
- * Kernel discipline actions (not used in Windows yet)
- */
-
-#define PPS_KC_HARDPPS 0 /* enable kernel consumer */
-#define PPS_KC_HARDPPS_PLL 1 /* phase-lock mode */
-#define PPS_KC_HARDPPS_FLL 2 /* frequency-lock mode */
-
-/*
- * Type definitions
- */
-
-typedef unsigned long pps_seq_t; /* sequence number */
-
-#pragma warning(push)
-#pragma warning(disable: 201) /* nonstd extension nameless union */
-
-typedef struct ntp_fp {
- union ntp_fp_sec {
- unsigned int integral;
- int s_integral;
- };
- unsigned int fractional;
-} ntp_fp_t; /* NTP-compatible time stamp */
-
-#pragma warning(pop)
-
-typedef union pps_timeu { /* timestamp format */
- struct timespec tspec;
- ntp_fp_t ntpfp;
- unsigned long longpad[3];
-} pps_timeu_t; /* generic data type to represent time stamps */
-
-/* addition of NTP fixed-point format */
-
-#define NTPFP_M_ADD(r_i, r_f, a_i, a_f) /* r += a */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- lo_tmp = ((r_f) & 0xffff) + ((a_f) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) + (((a_f) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_i) += (a_i); \
- if (hi_tmp & 0x10000) \
- (r_i)++; \
- } while (0)
-
-#define NTPFP_L_ADDS(r, a) NTPFP_M_ADD((r)->integral, (r)->fractional, \
- (a)->s_integral, (a)->fractional)
-
-
-/*
- * Timestamp information structure
- */
-
-typedef struct pps_info {
- pps_seq_t assert_sequence; /* seq. num. of assert event */
- pps_seq_t clear_sequence; /* seq. num. of clear event */
- pps_timeu_t assert_tu; /* time of assert event */
- pps_timeu_t clear_tu; /* time of clear event */
- int current_mode; /* current mode bits */
-} pps_info_t;
-
-#define assert_timestamp assert_tu.tspec
-#define clear_timestamp clear_tu.tspec
-
-#define assert_timestamp_ntpfp assert_tu.ntpfp
-#define clear_timestamp_ntpfp clear_tu.ntpfp
-
-/*
- * Parameter structure
- */
-
-typedef struct pps_params {
- int api_version; /* API version # */
- int mode; /* mode bits */
- pps_timeu_t assert_off_tu; /* offset compensation for assert */
- pps_timeu_t clear_off_tu; /* offset compensation for clear */
-} pps_params_t;
-
-#define assert_offset assert_off_tu.tspec
-#define clear_offset clear_off_tu.tspec
-
-#define assert_offset_ntpfp assert_off_tu.ntpfp
-#define clear_offset_ntpfp clear_off_tu.ntpfp
-
-/*
- * The following definitions are architecture-dependent
- */
-
-#define PPS_CAP (PPS_CAPTUREASSERT | PPS_OFFSETASSERT | PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)
-#define PPS_RO (PPS_CANWAIT | PPS_CANPOLL)
-
-typedef struct {
- int filedes; /* file descriptor */
- OVERLAPPED ol; /* caches ol.hEvent for DeviceIoControl */
- pps_params_t params; /* PPS parameters set by user */
-} pps_unit_t;
-
-typedef pps_unit_t* pps_handle_t; /* pps handlebars */
-
-/*
- *------ Here begins the implementation-specific part! ------
- */
-
-#include <windows.h>
-#include <errno.h>
-
-#ifndef EOPNOTSUPP
-#define EOPNOTSUPP 45
-#endif
-
-typedef struct _OLD_SERIAL_PPS_STAMPS {
- LARGE_INTEGER Timestamp;
- LARGE_INTEGER Counterstamp;
-} OLD_SERIAL_PPS_STAMPS, *POLDSERIAL_PPS_STAMPS;
-
-typedef struct _SERIAL_PPS_STAMPS {
- LARGE_INTEGER Timestamp;
- LARGE_INTEGER Counterstamp;
- DWORD SeqNum;
-} SERIAL_PPS_STAMPS, *PSERIAL_PPS_STAMPS;
-
-#define IOCTL_SERIAL_GET_PPS_STAMPS CTL_CODE(FILE_DEVICE_SERIAL_PORT,114,METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-/* byte offset of member m in struct typedef s */
-#define PPS_OFFSETOF(m,s) (size_t)(&((s *)0)->m)
-
-/*
- * ntpd on Windows only looks to errno after finding
- * GetLastError returns NO_ERROR. To accomodate its
- * use of msyslog in portable code such as refclock_atom.c,
- * this implementation always clears the Windows
- * error code using SetLastError(NO_ERROR) when
- * returning an errno. This is also a good idea
- * for any non-ntpd clients as they should use only
- * the errno for PPSAPI functions.
- */
-#define RETURN_PPS_ERRNO(e) \
-do { \
- SetLastError(NO_ERROR); \
- errno = (e); \
- return -1; \
-} while (0)
-
-
-#ifdef OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER
-extern void pps_ntp_timestamp_from_counter(ntp_fp_t *, ULONGLONG, ULONGLONG);
-#else
-/*
- * helper routine for serialpps.sys ioctl which returns
- * performance counter "timestamp" as well as a system
- * FILETIME timestamp. Converts one of the inputs to
- * NTP fixed-point format.
- */
-static inline void
-pps_ntp_timestamp_from_counter(
- ntp_fp_t *result,
- ULONGLONG Timestamp,
- ULONGLONG Counterstamp)
-{
- ULONGLONG BiasedTimestamp;
-
- /* convert from 100ns units to NTP fixed point format */
-
- BiasedTimestamp = Timestamp - PPS_FILETIME_1970;
- result->integral = PPS_JAN_1970 +
- (unsigned)(BiasedTimestamp / PPS_HECTONANOSECONDS);
- result->fractional =
- (unsigned) ((BiasedTimestamp % PPS_HECTONANOSECONDS) *
- (PPS_FRAC / PPS_HECTONANOSECONDS));
-}
-#endif
-
-
-/*
- * create PPS handle from file descriptor
- */
-
-static inline int
-time_pps_create(
- int filedes, /* file descriptor */
- pps_handle_t *handle /* returned handle */
- )
-{
- OLD_SERIAL_PPS_STAMPS old_pps_stamps;
- DWORD bytes;
- OVERLAPPED ol;
-
- /*
- * Check for valid arguments and attach PPS signal.
- */
-
- if (!handle)
- RETURN_PPS_ERRNO(EFAULT);
-
- if (PPS_OFFSETOF(tspec.tv_nsec, pps_timeu_t) !=
- PPS_OFFSETOF(ntpfp.fractional, pps_timeu_t)) {
- fprintf(stderr,
- "timepps.h needs work, union of \n"
- "unsigned int ntp_fp.integral and\n"
- "time_t timespec.tv_sec accessed\n"
- "interchangeably.\n");
- RETURN_PPS_ERRNO(EFAULT);
- }
-
- /*
- * For this ioctl which will never block, we don't want to go
- * through the overhead of a completion port, so we use an
- * event handle in the overlapped structure with its 1 bit set.
- *
- * From GetQueuedCompletionStatus docs:
- * Even if you have passed the function a file handle associated
- * with a completion port and a valid OVERLAPPED structure, an
- * application can prevent completion port notification. This is
- * done by specifying a valid event handle for the hEvent member
- * of the OVERLAPPED structure, and setting its low-order bit. A
- * valid event handle whose low-order bit is set keeps I/O
- * completion from being queued to the completion port.
- */
-
- ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- ol.hEvent = (HANDLE) ((ULONG_PTR)ol.hEvent | 1);
-
- if (FALSE == DeviceIoControl(
- (HANDLE)_get_osfhandle(filedes),
- IOCTL_SERIAL_GET_PPS_STAMPS,
- NULL,
- 0,
- &old_pps_stamps,
- sizeof(old_pps_stamps),
- &bytes,
- &ol)
- || sizeof(old_pps_stamps) != bytes) {
-
- /*
- * If you want to write some dead code this could detect the
- * IOCTL being pended, but the driver always has the info
- * instantly, so ERROR_IO_PENDING isn't a concern.
- */
-
- CloseHandle(ol.hEvent);
- fprintf(stderr,
- "time_pps_create: IOCTL_SERIAL_GET_PPS_STAMPS: %d %d\n",
- bytes,
- GetLastError());
- RETURN_PPS_ERRNO(ENXIO);
- }
-
- /*
- * Allocate and initialize default unit structure.
- */
-
- *handle = malloc(sizeof(pps_unit_t));
- if (!(*handle))
- RETURN_PPS_ERRNO(ENOMEM);
-
- memset(*handle, 0, sizeof(pps_unit_t));
- (*handle)->filedes = filedes;
- (*handle)->ol.hEvent = ol.hEvent;
- (*handle)->params.api_version = PPS_API_VERS_1;
- (*handle)->params.mode = PPS_CAPTUREASSERT | PPS_TSFMT_TSPEC;
- return (0);
-}
-
-/*
- * release PPS handle
- */
-
-static inline int
-time_pps_destroy(
- pps_handle_t handle
- )
-{
- /*
- * Check for valid arguments and detach PPS signal.
- */
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- CloseHandle(handle->ol.hEvent);
- free(handle);
- return (0);
-}
-
-/*
- * set parameters for handle
- */
-
-static inline int
-time_pps_setparams(
- pps_handle_t handle,
- const pps_params_t *params
- )
-{
- int mode, mode_in;
- /*
- * Check for valid arguments and set parameters.
- */
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- if (!params)
- RETURN_PPS_ERRNO(EFAULT);
-
- /*
- * There was no reasonable consensu in the API working group.
- * I require `api_version' to be set!
- */
-
- if (params->api_version != PPS_API_VERS_1)
- RETURN_PPS_ERRNO(EINVAL);
-
- /*
- * only settable modes are PPS_CAPTUREASSERT and PPS_OFFSETASSERT
- */
-
- mode_in = params->mode;
-
- /*
- * Only one of the time formats may be selected
- * if a nonzero assert offset is supplied.
- */
- if ((mode_in & (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) ==
- (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) {
-
- if (handle->params.assert_offset.tv_sec ||
- handle->params.assert_offset.tv_nsec)
-
- RETURN_PPS_ERRNO(EINVAL);
-
- /*
- * If no offset was specified but both time
- * format flags are used consider it harmless
- * but turn off PPS_TSFMT_NTPFP so getparams
- * will not show both formats lit.
- */
- mode_in &= ~PPS_TSFMT_NTPFP;
- }
-
- /* turn off read-only bits */
-
- mode_in &= ~PPS_RO;
-
- /*
- * test remaining bits, should only have captureassert,
- * offsetassert, and/or timestamp format bits.
- */
-
- if (mode_in & ~(PPS_CAPTUREASSERT | PPS_OFFSETASSERT |
- PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP))
- RETURN_PPS_ERRNO(EOPNOTSUPP);
-
- /*
- * ok, ready to go.
- */
-
- mode = handle->params.mode;
- handle->params = *params;
- handle->params.mode = mode | mode_in;
- handle->params.api_version = PPS_API_VERS_1;
- return (0);
-}
-
-/*
- * get parameters for handle
- */
-
-static inline int
-time_pps_getparams(
- pps_handle_t handle,
- pps_params_t *params
- )
-{
- /*
- * Check for valid arguments and get parameters.
- */
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- if (!params)
- RETURN_PPS_ERRNO(EFAULT);
-
- *params = handle->params;
- return (0);
-}
-
-/* (
- * get capabilities for handle
- */
-
-static inline int
-time_pps_getcap(
- pps_handle_t handle,
- int *mode
- )
-{
- /*
- * Check for valid arguments and get capabilities.
- */
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- if (!mode)
- RETURN_PPS_ERRNO(EFAULT);
-
- *mode = PPS_CAP;
- return (0);
-}
-
-/*
- * Fetch timestamps
- */
-
-static inline int
-time_pps_fetch(
- pps_handle_t handle,
- const int tsformat,
- pps_info_t *ppsinfo,
- const struct timespec *timeout
- )
-{
- SERIAL_PPS_STAMPS pps_stamps;
- pps_info_t infobuf;
- BOOL rc;
- DWORD bytes;
- DWORD lasterr;
-
- /*
- * Check for valid arguments and fetch timestamps
- */
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- if (!ppsinfo)
- RETURN_PPS_ERRNO(EFAULT);
-
- /*
- * nb. PPS_CANWAIT is NOT set by the implementation, we can totally
- * ignore the timeout variable.
- */
-
- memset(&infobuf, 0, sizeof(infobuf));
-
- /*
- * if not captureassert, nothing to return.
- */
-
- if (!handle->params.mode & PPS_CAPTUREASSERT) {
- *ppsinfo = infobuf;
- return (0);
- }
-
- /*
- * First rev of serialpps.sys didn't support the SeqNum field,
- * support it by simply returning constant 0 for serial in that case.
- */
- pps_stamps.SeqNum = 0;
-
- /*
- * interrogate (hopefully) serialpps.sys
- * if it's the standard serial.sys or another driver,
- * IOCTL_SERIAL_GET_PPS_STAMPS is most likely unknown
- * and will result in ERROR_INVALID_PARAMETER.
- */
- bytes = 0;
-
- rc = DeviceIoControl(
- (HANDLE)_get_osfhandle(handle->filedes),
- IOCTL_SERIAL_GET_PPS_STAMPS,
- NULL,
- 0,
- &pps_stamps,
- sizeof(pps_stamps),
- &bytes,
- &handle->ol);
-
- if (!rc) {
-
- lasterr = GetLastError();
- if (ERROR_INVALID_PARAMETER != lasterr)
- fprintf(stderr, "time_pps_fetch: ioctl err %d\n",
- lasterr);
- RETURN_PPS_ERRNO(EOPNOTSUPP);
-
- } else if (bytes != sizeof(pps_stamps) &&
- bytes != sizeof(OLD_SERIAL_PPS_STAMPS)) {
-
- fprintf(stderr,
- "time_pps_fetch: wanted %d or %d bytes got %d from "
- "IOCTL_SERIAL_GET_PPS_STAMPS 0x%x\n" ,
- sizeof(OLD_SERIAL_PPS_STAMPS),
- sizeof(SERIAL_PPS_STAMPS),
- bytes,
- IOCTL_SERIAL_GET_PPS_STAMPS);
- RETURN_PPS_ERRNO(ENXIO);
- }
-
- /*
- * pps_ntp_timestamp_from_counter takes the two flavors
- * of timestamp we have (counter and system time) and
- * uses whichever it can to give the best NTP fixed-point
- * conversion. In ntpd the Counterstamp is typically
- * used. A stub implementation in this file simply
- * converts from Windows Timestamp to NTP fixed-point.
- */
- pps_ntp_timestamp_from_counter(
- &infobuf.assert_timestamp_ntpfp,
- pps_stamps.Timestamp.QuadPart,
- pps_stamps.Counterstamp.QuadPart);
-
- /*
- * Note that only assert timestamps
- * are captured by this interface.
- */
-
- infobuf.assert_sequence = pps_stamps.SeqNum;
-
- /*
- * Apply offset and translate to specified format
- */
-
- switch (tsformat) {
- case PPS_TSFMT_NTPFP: /* NTP format requires no translation */
- if (handle->params.mode & PPS_OFFSETASSERT) {
- NTPFP_L_ADDS(&infobuf.assert_timestamp_ntpfp,
- &handle->params.assert_offset_ntpfp);
- }
- break;
-
- case PPS_TSFMT_TSPEC: /* timespec format requires conversion to nsecs form */
- PPS_NTPTOTSPEC(infobuf.assert_timestamp);
- if (handle->params.mode & PPS_OFFSETASSERT) {
- infobuf.assert_timestamp.tv_sec +=
- handle->params.assert_offset.tv_sec;
- infobuf.assert_timestamp.tv_nsec +=
- handle->params.assert_offset.tv_nsec;
- PPS_NORMALIZE(infobuf.assert_timestamp);
- }
- break;
-
- default:
- RETURN_PPS_ERRNO(EINVAL);
- }
-
- infobuf.current_mode = handle->params.mode;
- *ppsinfo = infobuf;
- return (0);
-}
-
-/*
- * time_pps_kcbind - specify kernel consumer
- *
- * Not supported so far by Windows.
- */
-
-static inline int
-time_pps_kcbind(
- pps_handle_t handle,
- const int kernel_consumer,
- const int edge, const int tsformat
- )
-{
- /*
- * Check for valid arguments before revealing the ugly truth
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- RETURN_PPS_ERRNO(EOPNOTSUPP);
-}
-
-
-
-#endif /* _SYS_TIMEPPS_H_ */
diff --git a/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt b/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt
deleted file mode 100644
index e335d4dfd9a1..000000000000
--- a/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-/***********************************************************************
- * *
- * Copyright (c) David L. Mills 1999-2000 *
- * *
- * Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and with or without fee is hereby *
- * granted, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission *
- * notice appear in supporting documentation, and that the name *
- * University of Delaware not be used in advertising or publicity *
- * pertaining to distribution of the software without specific, *
- * written prior permission. The University of Delaware makes no *
- * representations about the suitability this software for any *
- * purpose. It is provided "as is" without express or implied *
- * warranty. *
- * *
- ***********************************************************************
- * *
- * This header file complies with "Pulse-Per-Second API for UNIX-like *
- * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
- * and Marc Brett, from whom much of this code was shamelessly stolen. *
- * *
- * This modified timepps.h can be used to provide a PPSAPI interface *
- * to a machine running Windows with a suitably modified *
- * serialpps.sys being used in place of serial.sys. It can *
- * be extended to support a modified parallel port driver once *
- * available. *
- * *
- * This Windows version was derived by Dave Hart *
- * <davehart@davehart.com> from Mills' timepps-Solaris.h *
- * *
- ***********************************************************************
- * *
- * Some of this include file *
- * Copyright (c) 1999 by Ulrich Windl, *
- * based on code by Reg Clemens <reg@dwf.com> *
- * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
- * *
- ***********************************************************************
- * *
- * "THE BEER-WARE LICENSE" (Revision 42): *
- * <phk@FreeBSD.org> wrote this file. As long as you retain this *
- * notice you can do whatever you want with this stuff. If we meet some*
- * day, and you think this stuff is worth it, you can buy me a beer *
- * in return. Poul-Henning Kamp *
- * *
- **********************************************************************/
-
-timepps.h implements IETF RFC "Pulse-Per-Second API for UNIX-like
-Operating Systems, Version 1.0" for Microsoft Windows.
-
-
diff --git a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c
deleted file mode 100644
index 4a708f4c0b5b..000000000000
--- a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * loopback-ppsapi-provider.c - derived from monolithic timepps.h
- * for usermode PPS by Juergen Perlinger
- */
-
-/***********************************************************************
- * *
- * Copyright (c) David L. Mills 1999-2009 *
- * *
- * Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and without fee is hereby *
- * granted, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission *
- * notice appear in supporting documentation, and that the name *
- * University of Delaware not be used in advertising or publicity *
- * pertaining to distribution of the software without specific, *
- * written prior permission. The University of Delaware makes no *
- * representations about the suitability this software for any *
- * purpose. It is provided "as is" without express or implied *
- * warranty. *
- * *
- ***********************************************************************
- * *
- * This header file complies with "Pulse-Per-Second API for UNIX-like *
- * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
- * and Marc Brett, from whom much of this code was shamelessly stolen. *
- * *
- * This serialpps-ppsapi-provider.dll implements the PPSAPI provider *
- * for serialpps.sys, which is a very lightly patched Windows *
- * serial.sys with CD timestamping support.
- * *
- * This Windows version was derived by Dave Hart *
- * <davehart@davehart.com> from David L. Mills' timepps-Solaris.h *
- * *
- ***********************************************************************
- * *
- * Some of this include file *
- * Copyright (c) 1999 by Ulrich Windl, *
- * based on code by Reg Clemens <reg@dwf.com> *
- * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
- * *
- ***********************************************************************
- * *
- * "THE BEER-WARE LICENSE" (Revision 42): *
- * <phk@FreeBSD.org> wrote this file. As long as you retain this *
- * notice you can do whatever you want with this stuff. If we meet some*
- * day, and you think this stuff is worth it, you can buy me a beer *
- * in return. Poul-Henning Kamp *
- * *
- **********************************************************************/
-
-/*
- * Implementation note: the logical states ``assert'' and ``clear''
- * are implemented in terms of the UART register, i.e. ``assert''
- * means the bit is set. This follows the sense of the serial driver
- * of the Windows OS, and is opposite of the RS-232 spec for the
- * CD/DCD logical state.
- */
-
-
-#define PPSAPI_PROVIDER_EXPORTS
-#include "loopback-ppsapi.h"
-
-/*
-** global stuff
-*/
-
-pcreate_pps_handle p_create_pps_handle;
-
-#define SERIALPPS_CAPS (PPS_CAPTUREBOTH | PPS_OFFSETBOTH | PPS_TSFMT_BOTH)
-#define SERIALPPS_RO (PPS_CANWAIT | PPS_CANPOLL)
-
-
-/*
- * The ntp_timestamp_from_counter callback into timepps.h routines in
- * the host is saved in each unit separately, so that binaries that
- * inline timepps.h into multiple source files (such as refclock_atom.c
- * and a number of other ntpd refclocks including refclock_nmea.c) will
- * get called back in the correct instance for each unit. This assumes
- * that ppsapi_prov_init for subsequent instances happens only after the
- * first instance has completed all time_pps_create() calls it will
- * invoke, which is a safe assumption at least for ntpd.
- */
-struct loopback_unit {
- HANDLE hnd_dev; /* true device handle */
- HANDLE hnd_pps; /* loopback handle */
- ntp_fp_t ofs_assert; /* correction for assert*/
- ntp_fp_t ofs_clear; /* correction for clear */
-};
-typedef struct loopback_unit loopback_unit;
-
-/*
- * --------------------------------------------------------------------
- * DllMain - DLL entrypoint, no-op.
- * --------------------------------------------------------------------
- */
-BOOL APIENTRY DllMain(
- HMODULE hModule,
- DWORD why,
- LPVOID lpReserved
- )
-{
- UNUSED(hModule);
- UNUSED(lpReserved);
- UNUSED(why);
-
- return TRUE;
-}
-
-/*
- * --------------------------------------------------------------------
- * time conversion and other helpers
- * --------------------------------------------------------------------
- */
-
-/* --------------------------------------------------------------------
- * convert fixed point time stamp to struct timespec, with proper
- * Epoch/Era unfolding around the current time.
- */
-static struct timespec
-fp_stamp_to_tspec(
- ntp_fp_t x,
- time_t p
- )
-{
- struct timespec out;
- u_int64 tmp;
- u_int32 ntp;
-
- ntp = x.I.u;
- tmp = p;
- tmp -= 0x80000000u; /* unshift of half range */
- ntp -= (u_int32)PPS_JAN_1970; /* warp into UN*X domain */
- ntp -= (u_int32)tmp; /* cycle difference */
- tmp += (u_int64)ntp; /* get expanded time */
- out.tv_sec = (time_t)tmp;
- out.tv_nsec = ((long)(((u_int64)x.F.u * PPS_NANOSECOND + 0x80000000u) >> 32));
- if (out.tv_nsec >= PPS_NANOSECOND) {
- out.tv_nsec -= PPS_NANOSECOND;
- out.tv_sec++;
- }
-
- return out;
-}
-
-/* --------------------------------------------------------------------
- * convert a duration in struct timespec format to
- * fixed point representation.
- */
-static ntp_fp_t
-tspec_to_fp(
- const struct timespec * ts
- )
-{
- ntp_fp_t out;
- long tmp;
-
- out.I.u = (u_int32)ts->tv_sec;
- tmp = ts->tv_nsec;
- if (tmp < 0)
- do {
- tmp += PPS_NANOSECOND;
- out.I.u--;
- } while (tmp < 0);
- else if (tmp >= PPS_NANOSECOND)
- do {
- tmp -= PPS_NANOSECOND;
- out.I.u++;
- } while (tmp >= PPS_NANOSECOND);
- out.F.u = (u_int32)((u_int64)tmp << 32) + (PPS_NANOSECOND / 2) / PPS_NANOSECOND;
- return out;
-}
-
-/* --------------------------------------------------------------------
- * count number of '1' bits in a u_long
- */
-static size_t
-popcount(
- u_long val
- )
-{
- size_t res;
-
- for (res = 0; val; res++)
- val &= (val - 1);
- return res;
-}
-
-/*
- * --------------------------------------------------------------------
- * API function implementation
- * --------------------------------------------------------------------
- */
-
-/* --------------------------------------------------------------------
- * prov_time_pps_create - create PPS handle given underlying device
- */
-int WINAPI
-prov_time_pps_create(
- HANDLE device, /* underlying device */
- pps_handle_t * handle /* returned handle */
- )
-{
- loopback_unit * loopunit;
- pps_unit_t * punit;
-
- /*
- * Allocate and initialize loopback unit structure.
- */
- loopunit = (loopback_unit*)calloc(1, sizeof(loopback_unit));
- if (NULL == loopunit)
- return ENOMEM;
-
- /* Try to attach to NTPD internal data with the device handle.
- * Free unit buffer on failure.
- */
- loopunit->hnd_dev = device;
- loopunit->hnd_pps = ntp_pps_attach_device(device);
- if (NULL == loopunit->hnd_pps) {
- free(loopunit);
- return ENXIO;
- }
-
- /* create the outer PPS handle structure. Undo work done so far
- * if things go wrong.
- */
- *handle = (*p_create_pps_handle)(loopunit);
- if (!*handle) {
- ntp_pps_detach_device(loopunit->hnd_pps);
- free(loopunit);
- return ENOMEM;
- }
-
- /* All good so far. Store things to remember. */
- punit = (pps_unit_t *)*handle;
- punit->params.api_version = PPS_API_VERS_1;
- punit->params.mode = PPS_CAPTUREBOTH | PPS_TSFMT_BOTH;
- return 0;
-}
-
-
-/* --------------------------------------------------------------------
- * prov_time_pps_destroy - release PPS handle
- */
-int WINAPI
-prov_time_pps_destroy(
- pps_unit_t * unit,
- void * context
- )
-{
- loopback_unit * loopunit;
-
- loopunit = (loopback_unit*)context;
- if (unit->context == context)
- unit->context = NULL;
- if (NULL != loopunit)
- ntp_pps_detach_device(loopunit->hnd_pps);
- free(loopunit);
- return 0;
-}
-
-
-/* --------------------------------------------------------------------
- * prov_time_pps_setparams - set parameters for handle
- */
-int WINAPI
-prov_time_pps_setparams(
- pps_unit_t * unit,
- void * context,
- const pps_params_t * params
- )
-{
- loopback_unit * loopunit;
- int mode;
-
- loopunit = (loopback_unit*)context;
- mode = params->mode;
-
- /*
- * There was no reasonable consensus in the API working group.
- * I require `api_version' to be set!
- */
- if (params->api_version != PPS_API_VERS_1)
- return EINVAL;
-
- /*
- * We support all edges and formats plus offsets, but not
- * POLL or WAIT. And we are strict on the time stamp format:
- * Only one is permitted if we set offsets!
- */
-
- /*
- * Only one of the time formats may be selected.
- */
- if ((mode & PPS_OFFSETBOTH) != 0 &&
- popcount(mode & PPS_TSFMT_BOTH) != 1 )
- return EINVAL;
-
- /* turn off read-only bits */
- mode &= ~SERIALPPS_RO;
-
- /*
- * test remaining bits.
- */
- if (mode & ~(PPS_CAPTUREBOTH | PPS_OFFSETBOTH | PPS_TSFMT_BOTH))
- return EOPNOTSUPP;
-
- /*
- * ok, ready to go.
- *
- * calculate offsets as ntp_fp_t's and store them in unit as ntp_fp_t. They will
- * be always applied, since fetching the time stamps is not critical.
- */
- if (mode & PPS_OFFSETASSERT) {
- if (mode & PPS_TSFMT_TSPEC)
- loopunit->ofs_assert = tspec_to_fp(&params->assert_offset);
- else
- loopunit->ofs_assert = params->assert_offset_ntpfp;
- }
- if (mode & PPS_OFFSETCLEAR) {
- if (mode & PPS_TSFMT_TSPEC)
- loopunit->ofs_clear = tspec_to_fp(&params->clear_offset);
- else
- loopunit->ofs_clear = params->clear_offset_ntpfp;
- }
- /* save remaining bits */
- mode |= unit->params.mode;
- unit->params = *params;
- unit->params.mode = mode;
-
- return 0;
-}
-
-
-/* --------------------------------------------------------------------
- * prov_time_pps_fetch - Fetch timestamps
- */
-
-int WINAPI
-prov_time_pps_fetch(
- pps_unit_t * unit,
- void * context,
- const int tsformat,
- pps_info_t * pinfo,
- const struct timespec * timeout
- )
-{
- loopback_unit * loopunit;
- PPSData_t pps_stamps;
- pps_info_t infobuf;
- BOOL rc;
- time_t tnow;
-
- /*
- * nb. PPS_CANWAIT is NOT set by the implementation, we can totally
- * ignore the timeout variable.
- */
- UNUSED(timeout);
- loopunit = (loopback_unit*)context;
-
- /* read & check raw data from daemon */
- memset(&infobuf, 0, sizeof(infobuf));
- rc = ntp_pps_read(loopunit->hnd_pps, &pps_stamps, sizeof(pps_stamps));
- if (!rc) {
- switch (GetLastError())
- {
- case ERROR_INVALID_HANDLE:
- return EINVAL;
- case ERROR_INVALID_PARAMETER:
- return EOPNOTSUPP;
- case ERROR_INVALID_DATA:
- return ENXIO;
- default:
- return EINVAL;
- }
- }
-
- /* add offsets on raw data */
- NTPFP_L_ADDS(&pps_stamps.ts_assert, &loopunit->ofs_assert);
- NTPFP_L_ADDS(&pps_stamps.ts_clear , &loopunit->ofs_clear);
-
- /* store sequence numbers */
- infobuf.assert_sequence = pps_stamps.cc_assert;
- infobuf.clear_sequence = pps_stamps.cc_clear;
-
- /*
- * Translate or copy to specified format
- */
- switch (tsformat) {
- case PPS_TSFMT_NTPFP: /* NTP format requires no translation */
- infobuf.assert_timestamp_ntpfp = pps_stamps.ts_assert;
- infobuf.clear_timestamp_ntpfp = pps_stamps.ts_clear;
- break;
-
- case PPS_TSFMT_TSPEC: /* timespec format requires conversion to nsecs form */
- time(&tnow);
- infobuf.assert_timestamp = fp_stamp_to_tspec(pps_stamps.ts_assert, tnow);
- infobuf.clear_timestamp = fp_stamp_to_tspec(pps_stamps.ts_clear, tnow);
- break;
-
- default:
- return EINVAL;
- }
-
- infobuf.current_mode = unit->params.mode;
- *pinfo = infobuf;
-
- return 0;
-}
-
-
-/* --------------------------------------------------------------------
- * prov_time_pps_kcbind - specify kernel consumer
- *
- * Not supported so far by Windows.
- */
-int WINAPI
-prov_time_pps_kcbind(
- pps_unit_t * punit,
- void * context,
- const int kernel_consumer,
- const int edge,
- const int tsformat
- )
-{
- UNUSED(punit);
- UNUSED(context);
- UNUSED(kernel_consumer);
- UNUSED(edge);
- UNUSED(tsformat);
-
- return EOPNOTSUPP;
-}
-
-
-/* --------------------------------------------------------------------
- * prov_init - returns capabilities and provider name
- */
-int WINAPI
-ppsapi_prov_init(
- int ppsapi_timepps_prov_ver,
- pcreate_pps_handle create_pps_handle,
- ppps_ntp_timestamp_from_counter ntp_timestamp_from_counter,
- char * short_name_buf,
- size_t short_name_size,
- char * full_name_buf,
- size_t full_name_size
- )
-{
- UNUSED(ntp_timestamp_from_counter);
-
- if (ppsapi_timepps_prov_ver < PPSAPI_TIMEPPS_PROV_VER)
- return 0;
-
- p_create_pps_handle = create_pps_handle;
-
- strncpy(short_name_buf, "loopback", short_name_size);
- short_name_buf[short_name_size - 1] ='\0'; /* ensure ASCIIZ */
- strncpy(full_name_buf,
- "loopback user mode DCD change detection",
- full_name_size);
- full_name_buf[full_name_size - 1] ='\0'; /* ensure ASCIIZ */
-
- return SERIALPPS_CAPS;
-}
diff --git a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def
deleted file mode 100644
index 14573a25c3d7..000000000000
--- a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY "loopback-ppsapi-provider.dll"
-
-EXPORTS
- ppsapi_prov_init
- prov_time_pps_create
- prov_time_pps_destroy
- prov_time_pps_fetch
- prov_time_pps_kcbind
- prov_time_pps_setparams \ No newline at end of file
diff --git a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h
deleted file mode 100644
index 5541e333ed3b..000000000000
--- a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// serialpps-ppsapi-provider.h
-//
-// For this tiny project the single header serves as a precompiled header
-// as well, meaning all the bulky headers are included before or within it.
-// Within, in this case.
-//
-
-#define _CRT_SECURE_NO_WARNINGS
-#include <stdio.h>
-#include <windows.h>
-typedef __int32 int32;
-typedef unsigned __int32 u_int32;
-typedef __int64 int64;
-typedef unsigned __int64 u_int64;
-#include "timepps.h"
-
-#ifndef UNUSED
-#define UNUSED(item) ((void)(item))
-#endif
-
-/* PPS data structure as captured by the serial line I/O system. This
- * must match the local definition in 'ntp_iocompletionport.c' or
- * 'Bad Things (tm)' are bound to happen.
- */
-struct PpsData {
- u_long cc_assert;
- u_long cc_clear;
- ntp_fp_t ts_assert;
- ntp_fp_t ts_clear;
-};
-typedef struct PpsData PPSData_t;
-
-/* prototypes imported from the NTPD executable */
-__declspec(dllimport) HANDLE WINAPI ntp_pps_attach_device(HANDLE hndIo);
-__declspec(dllimport) void WINAPI ntp_pps_detach_device(HANDLE ppsHandle);
-__declspec(dllimport) BOOL WINAPI ntp_pps_read(HANDLE ppsHandle, void*, size_t);
-
-/* prototypes exported to the NTPD executable */
-__declspec(dllexport) int WINAPI prov_time_pps_create(HANDLE, pps_handle_t*);
-__declspec(dllexport) int WINAPI prov_time_pps_destroy(pps_unit_t*, void*);
-__declspec(dllexport) int WINAPI prov_time_pps_setparams(pps_unit_t*, void*,
- const pps_params_t*);
-__declspec(dllexport) int WINAPI prov_time_pps_fetch(pps_unit_t*, void*,
- const int, pps_info_t*, const struct timespec*);
-__declspec(dllexport) int WINAPI prov_time_pps_kcbind(pps_unit_t*, void*, const int, const int, const int);
-__declspec(dllexport) int WINAPI ppsapi_prov_init(int, pcreate_pps_handle,
- ppps_ntp_timestamp_from_counter, char*, size_t,
- char*, size_t);
diff --git a/ports/winnt/ppsapi/loopback/src/sys/time.h b/ports/winnt/ppsapi/loopback/src/sys/time.h
deleted file mode 100644
index 079e5b64431f..000000000000
--- a/ports/winnt/ppsapi/loopback/src/sys/time.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * This sys/time.h is part of ppsapi-prov skeleton sample source code
- * for a Windows PPSAPI provider DLL. It was adapted from
- * ports/winnt/include/sys/time.h in ntpd.
- */
-
-#ifndef SYS_TIME_H
-#define SYS_TIME_H
-
-#include <windows.h>
-#include <time.h>
-
-typedef struct timespec {
- time_t tv_sec;
- long tv_nsec;
-} timespec_t;
-
-#endif /* SYS_TIME_H */
diff --git a/ports/winnt/ppsapi/loopback/src/timepps.h b/ports/winnt/ppsapi/loopback/src/timepps.h
deleted file mode 100644
index 3a7e80662418..000000000000
--- a/ports/winnt/ppsapi/loopback/src/timepps.h
+++ /dev/null
@@ -1,805 +0,0 @@
-/***********************************************************************
- * *
- * Copyright (c) David L. Mills 1999-2009 *
- * *
- * Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and with or without fee is hereby *
- * granted, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission *
- * notice appear in supporting documentation, and that the name *
- * University of Delaware not be used in advertising or publicity *
- * pertaining to distribution of the software without specific, *
- * written prior permission. The University of Delaware makes no *
- * representations about the suitability this software for any *
- * purpose. It is provided "as is" without express or implied *
- * warranty. *
- * *
- ***********************************************************************
- * *
- * This header file complies with "Pulse-Per-Second API for UNIX-like *
- * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
- * and Marc Brett, from whom much of this code was shamelessly stolen. *
- * *
- * This modified timepps.h can be used to provide a PPSAPI interface *
- * to a machine running Windows with one or more backend provider DLLs *
- * implementing the provider interfaces defined herein. *
- * *
- * This Windows version was derived by Dave Hart *
- * <davehart@davehart.com> from Mills' timepps-Solaris.h *
- * *
- ***********************************************************************
- * *
- * Some of this include file *
- * Copyright (c) 1999 by Ulrich Windl, *
- * based on code by Reg Clemens <reg@dwf.com> *
- * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
- * *
- ***********************************************************************
- * *
- * "THE BEER-WARE LICENSE" (Revision 42): *
- * <phk@FreeBSD.org> wrote this file. As long as you retain this *
- * notice you can do whatever you want with this stuff. If we meet some*
- * day, and you think this stuff is worth it, you can buy me a beer *
- * in return. Poul-Henning Kamp *
- * *
- **********************************************************************/
-
-#ifndef TIMEPPS_H
-#define TIMEPPS_H
-
-#include "sys/time.h" /* in ntp ref source declares struct timespec */
-
-/*
- * The following definitions are architecture independent
- */
-
-#define PPS_API_VERS_1 1 /* API version number */
-#define PPS_JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
-#define PPS_NANOSECOND 1000000000L /* one nanosecond in decimal */
-#define PPS_FRAC 4294967296. /* 2^32 as a double */
-#define PPS_HECTONANOSECONDS 10000000 /* 100ns units in a second */
-#define PPS_FILETIME_1970 0x019db1ded53e8000 /* unix epoch to Windows */
-
-#define PPS_NORMALIZE(x) /* normalize timespec */ \
- do { \
- while ((x).tv_nsec >= PPS_NANOSECOND) { \
- (x).tv_nsec -= PPS_NANOSECOND; \
- (x).tv_sec++; \
- } \
- while ((x).tv_nsec < 0) { \
- (x).tv_nsec += PPS_NANOSECOND; \
- (x).tv_sec--; \
- } \
- } while (0)
-
-#define PPS_TSPECTONTP(x) /* convert timespec to ntp_fp */ \
- do { \
- double d_frac; \
- \
- d_frac = ((struct timespec)&(x))->tv_nsec \
- * PPS_FRAC / PPS_NANOSECOND; \
- (x).integral = ((struct timespec)&(x))->tv_sec \
- + PPS_JAN_1970; \
- (x).fractional = (unsigned int)d_frac; \
- if (d_frac >= PPS_FRAC) \
- (x).integral++; \
- } while (0)
-
-#define PPS_NTPTOTSPEC(x) /* convert ntp_fp to timespec */ \
- do { \
- double d_frac; \
- \
- /* careful, doing in place and tv_sec may be 64bit */ \
- d_frac = (double)((ntp_fp_t *)&(x))->F.u \
- * PPS_NANOSECOND / PPS_FRAC; \
- (x).tv_sec = ((ntp_fp_t *)&(x))->I.u \
- - (time_t)PPS_JAN_1970; \
- (x).tv_nsec = (long)d_frac; \
- } while (0)
-
-
-/*
- * Device/implementation parameters (mode)
- */
-
-#define PPS_CAPTUREASSERT 0x01 /* capture assert events */
-#define PPS_CAPTURECLEAR 0x02 /* capture clear events */
-#define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */
-
-#define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */
-#define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */
-#define PPS_OFFSETBOTH 0x30 /* apply compensation for both */
-
-#define PPS_CANWAIT 0x100 /* Can we wait for an event? */
-#define PPS_CANPOLL 0x200 /* "This bit is reserved for */
-
-/*
- * Kernel actions (mode)
- */
-
-#define PPS_ECHOASSERT 0x40 /* feed back assert event to output */
-#define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */
-
-/*
- * Timestamp formats (tsformat)
- */
-
-#define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */
-#define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */
-#define PPS_TSFMT_BOTH (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)
-
-/*
- * Kernel discipline actions (not used in Windows yet)
- */
-
-#define PPS_KC_HARDPPS 0 /* enable kernel consumer */
-#define PPS_KC_HARDPPS_PLL 1 /* phase-lock mode */
-#define PPS_KC_HARDPPS_FLL 2 /* frequency-lock mode */
-
-/*
- * Type definitions
- */
-
-typedef unsigned long pps_seq_t; /* sequence number */
-
-#pragma warning(push)
-//#pragma warning(disable: 201) /* nonstd extension nameless union */
-
-typedef struct ntp_fp {
- union {
- int32 s;
- u_int32 u;
- } I;
- union {
- int32 s;
- u_int32 u;
- } F;
-} ntp_fp_t; /* NTP-compatible time stamp */
-
-#pragma warning(pop)
-
-typedef union pps_timeu { /* timestamp format */
- struct timespec tspec;
- ntp_fp_t ntpfp;
- unsigned long longpad[3];
-} pps_timeu_t; /* generic data type to represent time stamps */
-
-/* addition of NTP fixed-point format */
-
-#define NTPFP_M_ADD(r_i, r_f, a_i, a_f) /* r += a */ \
- do { \
- r_f = (u_int32)(r_f) + (u_int32)(a_f); \
- r_i = (u_int32)(r_i) + (u_int32)(a_i) + \
- ((u_int32)(r_f) < (u_int32)(a_f)); \
- } while (0)
-
-#define NTPFP_L_ADDS(r, a) NTPFP_M_ADD((r)->I.u, (r)->F.u, (a)->I.u, (a)->F.u)
-
-
-/*
- * Timestamp information structure
- */
-
-typedef struct pps_info {
- pps_seq_t assert_sequence; /* seq. num. of assert event */
- pps_seq_t clear_sequence; /* seq. num. of clear event */
- pps_timeu_t assert_tu; /* time of assert event */
- pps_timeu_t clear_tu; /* time of clear event */
- int current_mode; /* current mode bits */
-} pps_info_t;
-
-#define assert_timestamp assert_tu.tspec
-#define clear_timestamp clear_tu.tspec
-
-#define assert_timestamp_ntpfp assert_tu.ntpfp
-#define clear_timestamp_ntpfp clear_tu.ntpfp
-
-/*
- * Parameter structure
- */
-
-typedef struct pps_params {
- int api_version; /* API version # */
- int mode; /* mode bits */
- pps_timeu_t assert_off_tu; /* offset compensation for assert */
- pps_timeu_t clear_off_tu; /* offset compensation for clear */
-} pps_params_t;
-
-#define assert_offset assert_off_tu.tspec
-#define clear_offset clear_off_tu.tspec
-
-#define assert_offset_ntpfp assert_off_tu.ntpfp
-#define clear_offset_ntpfp clear_off_tu.ntpfp
-
-/*
- *------ Here begins the implementation-specific part! ------
- */
-
-#include <windows.h>
-#include <errno.h>
-#include <stddef.h> /* offsetof() */
-#include <io.h> /* _get_osfhandle() */
-
-#ifndef EOPNOTSUPP
-#define EOPNOTSUPP 45
-#endif
-
-typedef UINT_PTR pps_handle_t; /* pps handlebars */
-
-#ifndef inline
-#define inline __inline
-#endif
-
-/*
- * ntpd on Windows is typically distributed as a binary as few users
- * have the tools needed to build from source. Rather than build
- * a single timepps.h for Windows which knows how to talk to all
- * PPS implementations frozen in time as of compiling, this timepps.h
- * allows one or more backend providers to be used by naming a DLL
- * which exports the provider interfaces defined here.
- */
-typedef enum ppsapi_magic_tag {
- PPSAPI_MAGIC_UNIT = 0x70707355, /* ppsU */
-} ppsapi_magic;
-
-typedef struct {
- struct pps_provider_tag *provider;
- void * context;/* provider's unit pointer */
- ppsapi_magic magic; /* to detect invalid handles */
- pps_params_t params; /* PPS parameters set by user */
-} pps_unit_t;
-
-typedef void (*ppps_ntp_timestamp_from_counter)(
- ntp_fp_t *result,
- ULONGLONG Timestamp,
- ULONGLONG Counterstamp
- );
-
-typedef pps_handle_t (*pcreate_pps_handle)(
- void * prov_context
- );
-
-/*
- * ppsapi_prov_init() - exported by backend DLLs
- *
- * Return value is pps capabilities available to PPSAPI consumers
- * via time_pps_getcaps().
- */
-#define PPSAPI_TIMEPPS_PROV_VER 2
-
-typedef int (WINAPI *pppsapi_prov_init)(
- int ppsapi_timepps_prov_ver,
- pcreate_pps_handle create_pps_handle,
- ppps_ntp_timestamp_from_counter ntp_timestamp_from_counter,
- char * short_name_buf,
- size_t short_name_size,
- char * full_name_buf,
- size_t full_name_size
- );
-
-typedef int (WINAPI *provtime_pps_create)(
- HANDLE winhandle, /* user device handle */
- pps_handle_t *phandle /* returned handle */
- );
-
-typedef int (WINAPI *provtime_pps_destroy)(
- pps_unit_t * unit,
- void * context
- );
-
-typedef int (WINAPI *provtime_pps_setparams)(
- pps_unit_t * unit,
- void * context,
- const pps_params_t * params
- );
-
-typedef int (WINAPI *provtime_pps_fetch)(
- pps_unit_t * unit,
- void * context,
- const int tsformat,
- pps_info_t * pinfo,
- const struct timespec * timeout
- );
-
-typedef int (WINAPI *provtime_pps_kcbind)(
- pps_unit_t * unit,
- void * context,
- const int kernel_consumer,
- const int edge,
- const int tsformat
- );
-
-typedef struct pps_provider_tag {
- struct pps_provider_tag *next;
- int caps;
- char * short_name;
- char * full_name;
- provtime_pps_create ptime_pps_create;
- provtime_pps_destroy ptime_pps_destroy;
- provtime_pps_setparams ptime_pps_setparams;
- provtime_pps_fetch ptime_pps_fetch;
- provtime_pps_kcbind ptime_pps_kcbind;
-} ppsapi_provider;
-
-static ppsapi_provider * g_provider_list;
-static ppsapi_provider * g_curr_provider;
-
-
-static inline pps_handle_t
-internal_create_pps_handle(
- void * prov_context
- )
-{
- pps_unit_t * punit;
-
- if (NULL == g_curr_provider) {
- fprintf(stderr, "create_pps_handle: provider backend called me outside time_pps_create\n");
- punit = NULL;
- } else
- punit = malloc(sizeof(*punit));
- if (punit != NULL) {
- punit->provider = g_curr_provider;
- punit->context = prov_context;
- punit->magic = PPSAPI_MAGIC_UNIT;
- memset(&punit->params, 0, sizeof(punit->params));
- }
- return (pps_handle_t)punit;
-}
-
-static inline pps_unit_t *
-unit_from_ppsapi_handle(
- pps_handle_t handle
- )
-{
- pps_unit_t *punit;
-
- punit = (pps_unit_t *)handle;
- if (PPSAPI_MAGIC_UNIT != punit->magic)
- punit = NULL;
- return punit;
-}
-
-/*
- * ntpd on Windows only looks to errno after finding
- * GetLastError returns NO_ERROR. To accomodate its
- * use of msyslog in portable code such as refclock_atom.c,
- * this implementation always clears the Windows
- * error code using SetLastError(NO_ERROR) when
- * returning an errno. This is also a good idea
- * for any non-ntpd clients as they should rely only
- * the errno for PPSAPI functions.
- */
-#define RETURN_PPS_ERRNO(e) \
-do { \
- SetLastError(NO_ERROR); \
- errno = (e); \
- return -1; \
-} while (0)
-
-
-#ifdef OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER
-extern void pps_ntp_timestamp_from_counter(ntp_fp_t *, ULONGLONG, ULONGLONG);
-#else
-/*
- * helper routine for serialpps.sys ioctl which returns
- * performance counter "timestamp" as well as a system
- * FILETIME timestamp. Converts one of the inputs to
- * NTP fixed-point format.
- *
- * You will probably want to supply your own and #define
- * OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER, as this stub
- * converts only the low-resolution system timestamp.
- *
- * When implementing a provider, use the pointer to this
- * conversion function supplied to your prov_init(), as
- * the copy in your DLL will likely be the stub below,
- * where you want the one provided by the PPSAPI client
- * such as ntpd.
- */
-static inline void
-pps_ntp_timestamp_from_counter(
- ntp_fp_t *result,
- ULONGLONG Timestamp,
- ULONGLONG Counterstamp)
-{
- ULONGLONG BiasedTimestamp;
-
- /* convert from 100ns units to NTP fixed point format */
-
- BiasedTimestamp = Timestamp - PPS_FILETIME_1970;
- result->I.u = PPS_JAN_1970 +
- (unsigned)(BiasedTimestamp / PPS_HECTONANOSECONDS);
- result->F.u =
- (unsigned) ((BiasedTimestamp % PPS_HECTONANOSECONDS) *
- (PPS_FRAC / PPS_HECTONANOSECONDS));
-}
-#endif
-
-
-static inline int
-load_pps_provider(
- char * dllpath
- )
-{
- char short_name[16];
- char full_name[64];
- ppsapi_provider * prov;
- HMODULE hmod;
- pppsapi_prov_init pprov_init;
-
- prov = malloc(sizeof(*prov));
- if (NULL == prov)
- return ENOMEM;
-
- hmod = LoadLibrary(dllpath);
- if (NULL == hmod) {
- fprintf(stderr, "load_pps_provider: LoadLibrary(%s) error %u\n", dllpath, GetLastError());
- free(prov);
- return ENOENT;
- }
-
- pprov_init = (pppsapi_prov_init)GetProcAddress(hmod, "ppsapi_prov_init");
- if (NULL == pprov_init) {
- fprintf(stderr, "load_pps_provider: entrypoint ppsapi_prov_init not found in %s\n", dllpath);
- free(prov);
- FreeLibrary(hmod);
- return EFAULT;
- }
-
- prov->caps = (*pprov_init)(PPSAPI_TIMEPPS_PROV_VER,
- &internal_create_pps_handle,
- &pps_ntp_timestamp_from_counter,
- short_name, sizeof(short_name),
- full_name, sizeof(full_name));
-
- if (!prov->caps) {
- free(prov);
- FreeLibrary(hmod);
- return EACCES;
- }
-
- prov->short_name = _strdup(short_name);
- prov->full_name = _strdup(full_name);
-
- if (NULL == prov->short_name || !prov->short_name[0]
- || NULL == prov->full_name || !prov->full_name[0]) {
-
- if (prov->short_name)
- free(prov->short_name);
- if (prov->full_name)
- free(prov->full_name);
- free(prov);
- FreeLibrary(hmod);
- return EINVAL;
- }
-
- prov->ptime_pps_create = (provtime_pps_create)
- GetProcAddress(hmod, "prov_time_pps_create");
- prov->ptime_pps_destroy = (provtime_pps_destroy)
- GetProcAddress(hmod, "prov_time_pps_destroy");
- prov->ptime_pps_setparams = (provtime_pps_setparams)
- GetProcAddress(hmod, "prov_time_pps_setparams");
- prov->ptime_pps_fetch = (provtime_pps_fetch)
- GetProcAddress(hmod, "prov_time_pps_fetch");
- prov->ptime_pps_kcbind = (provtime_pps_kcbind)
- GetProcAddress(hmod, "prov_time_pps_kcbind");
-
- if (NULL == prov->ptime_pps_create
- || NULL == prov->ptime_pps_destroy
- || NULL == prov->ptime_pps_setparams
- || NULL == prov->ptime_pps_fetch
- || NULL == prov->ptime_pps_kcbind) {
-
- fprintf(stderr, "PPSAPI provider %s missing entrypoint\n",
- prov->short_name);
- free(prov->short_name);
- free(prov->full_name);
- free(prov);
- FreeLibrary(hmod);
- return EINVAL;
- }
-
- fprintf(stderr, "loaded PPSAPI provider %s caps 0x%x provider %p\n",
- prov->full_name, prov->caps, prov);
-
- prov->next = g_provider_list;
- g_provider_list = prov;
-
- return 0;
-}
-
-
-/*
- * time_pps_create - create PPS handle from file descriptor
- *
- * This is the initial entrypoint of PPSAPI from the client. Note
- * to maintain source compatibility with Unix, the input file
- * descriptor really is a descriptor from the C runtime low-numbered
- * descriptor namespace, though it may have been converted from a
- * native Windows HANDLE using _open_osfhandle().
- */
-static inline int
-time_pps_create(
- int filedes,/* device file descriptor */
- pps_handle_t * phandle /* returned handle */
- )
-{
- HANDLE winhandle;
- char * dlls;
- char * dll;
- char * pch;
- ppsapi_provider * prov;
- pps_handle_t ppshandle;
- int err;
-
- if (NULL == phandle)
- RETURN_PPS_ERRNO(EFAULT);
-
- winhandle = (HANDLE)_get_osfhandle(filedes);
- fprintf(stderr, "time_pps_create(%d) got winhandle %p\n", filedes, winhandle);
- if (INVALID_HANDLE_VALUE == winhandle)
- RETURN_PPS_ERRNO(EBADF);
-
- /*
- * For initial testing the list of PPSAPI backend
- * providers is provided by the environment variable
- * PPSAPI_DLLS, separated by semicolons such as
- * PPSAPI_DLLS=c:\ntp\serial_ppsapi.dll;..\parport_ppsapi.dll
- * There are a million better ways, such as a well-known
- * registry key under which a value is created for each
- * provider DLL installed, or even a platform-specific
- * ntp.conf directive or command-line switch.
- */
- dlls = getenv("PPSAPI_DLLS");
- if (dlls != NULL && NULL == g_provider_list) {
- dlls = dll = _strdup(dlls);
- fprintf(stderr, "getenv(PPSAPI_DLLS) gives %s\n", dlls);
- } else
- dlls = dll = NULL;
-
- while (dll != NULL && dll[0]) {
- pch = strchr(dll, ';');
- if (pch != NULL)
- *pch = 0;
- err = load_pps_provider(dll);
- if (err) {
- fprintf(stderr, "load_pps_provider(%s) got errno %d\n", dll, err);
- RETURN_PPS_ERRNO(err);
- }
- dll = (NULL == pch)
- ? NULL
- : pch + 1;
- }
-
- if (NULL != dlls)
- free(dlls);
- dlls = dll = NULL;
-
- /*
- * Hand off to each provider in turn until one returns a PPS
- * handle or they've all declined.
- */
- for (prov = g_provider_list; prov != NULL; prov = prov->next) {
- ppshandle = 0;
- g_curr_provider = prov;
- err = (*prov->ptime_pps_create)(winhandle, &ppshandle);
- g_curr_provider = NULL;
- fprintf(stderr, "%s prov_time_pps_create(%p) returned %d\n",
- prov->short_name, winhandle, err);
- if (!err && ppshandle) {
- *phandle = ppshandle;
- return 0;
- }
- }
-
- fprintf(stderr, "PPSAPI provider list %p\n", g_provider_list);
-
- RETURN_PPS_ERRNO(ENOEXEC);
-}
-
-
-/*
- * release PPS handle
- */
-
-static inline int
-time_pps_destroy(
- pps_handle_t handle
- )
-{
- pps_unit_t * punit;
- int err;
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- err = (*punit->provider->ptime_pps_destroy)(punit, punit->context);
-
- free(punit);
-
- if (err)
- RETURN_PPS_ERRNO(err);
- else
- return 0;
-}
-
-/*
- * set parameters for handle
- */
-
-static inline int
-time_pps_setparams(
- pps_handle_t handle,
- const pps_params_t *params
- )
-{
- pps_unit_t * punit;
- int err;
-
- /*
- * Check for valid arguments and set parameters.
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- if (NULL == params)
- RETURN_PPS_ERRNO(EFAULT);
-
- err = (*punit->provider->ptime_pps_setparams)(punit, punit->context, params);
-
- if (err)
- RETURN_PPS_ERRNO(err);
- else
- return 0;
-}
-
-/*
- * get parameters for handle
- */
-
-static inline int
-time_pps_getparams(
- pps_handle_t handle,
- pps_params_t *params_buf
- )
-{
- pps_unit_t * punit;
-
- /*
- * Check for valid arguments and get parameters.
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- if (NULL == params_buf)
- RETURN_PPS_ERRNO(EFAULT);
-
- *params_buf = punit->params;
- return 0;
-}
-
-
-/*
- * time_pps_getcap - get capabilities for handle
- */
-static inline int
-time_pps_getcap(
- pps_handle_t handle,
- int *pmode
- )
-{
- pps_unit_t * punit;
-
- /*
- * Check for valid arguments and get capabilities.
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- if (NULL == pmode)
- RETURN_PPS_ERRNO(EFAULT);
-
- *pmode = punit->provider->caps;
- return 0;
-}
-
-/*
- * Fetch timestamps
- */
-
-static inline int
-time_pps_fetch(
- pps_handle_t handle,
- const int tsformat,
- pps_info_t * pinfo,
- const struct timespec * ptimeout
- )
-{
- pps_unit_t * punit;
- int err;
-
- /*
- * Check for valid arguments and fetch timestamps
- */
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- if (NULL == pinfo)
- RETURN_PPS_ERRNO(EFAULT);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- err = (*punit->provider->ptime_pps_fetch)(punit,
- punit->context,
- tsformat,
- pinfo,
- ptimeout);
-
- if (err)
- RETURN_PPS_ERRNO(err);
- else
- return 0;
-}
-
-/*
- * time_pps_kcbind - specify kernel consumer
- *
- * Not supported so far by Windows.
- */
-
-static inline int
-time_pps_kcbind(
- pps_handle_t handle,
- const int kernel_consumer,
- const int edge, const int tsformat
- )
-{
- pps_unit_t * punit;
- int err;
-
- if (!handle)
- RETURN_PPS_ERRNO(EBADF);
-
- punit = unit_from_ppsapi_handle(handle);
-
- if (NULL == punit)
- RETURN_PPS_ERRNO(EBADF);
-
- err = (*punit->provider->ptime_pps_kcbind)(
- punit,
- punit->context,
- kernel_consumer,
- edge,
- tsformat);
-
- if (err)
- RETURN_PPS_ERRNO(err);
- else
- return 0;
-}
-
-
-#endif /* TIMEPPS_H */
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c
deleted file mode 100644
index fe15d2972587..000000000000
--- a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * skeleton-ppsapi-provider.c - structure but no useful function
- */
-
-/***********************************************************************
- * *
- * Copyright (c) David L. Mills 1999-2009 *
- * *
- * Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and without fee is hereby *
- * granted, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission *
- * notice appear in supporting documentation, and that the name *
- * University of Delaware not be used in advertising or publicity *
- * pertaining to distribution of the software without specific, *
- * written prior permission. The University of Delaware makes no *
- * representations about the suitability this software for any *
- * purpose. It is provided "as is" without express or implied *
- * warranty. *
- * *
- ***********************************************************************
- * *
- * This header file complies with "Pulse-Per-Second API for UNIX-like *
- * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
- * and Marc Brett, from whom much of this code was shamelessly stolen. *
- * *
- * This skeleton-ppsapi-provider.c implements the PPSAPI provider DLL *
- * interface but has no actual timestamp-fetching code. It is *
- * derived from serialpps-ppsapi-provider.c which was derived from *
- * David L. Mills' timepps.h for Solaris. *
- * *
- ***********************************************************************
- * *
- * Some of this include file *
- * Copyright (c) 1999 by Ulrich Windl, *
- * based on code by Reg Clemens <reg@dwf.com> *
- * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
- * *
- ***********************************************************************
- * *
- * "THE BEER-WARE LICENSE" (Revision 42): *
- * <phk@FreeBSD.org> wrote this file. As long as you retain this *
- * notice you can do whatever you want with this stuff. If we meet some*
- * day, and you think this stuff is worth it, you can buy me a beer *
- * in return. Poul-Henning Kamp *
- * *
- **********************************************************************/
-
-
-#include "skeleton-ppsapi-provider.h"
-
-pcreate_pps_handle p_create_pps_handle;
-ppps_ntp_timestamp_from_counter p_ntp_timestamp_from_counter;
-
-#define SKELPPS_CAPS (PPS_CAPTUREASSERT | PPS_OFFSETASSERT \
- | PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)
-#define SKELPPS_RO (PPS_CANWAIT | PPS_CANPOLL)
-
-
-/*
- * The ntp_timestamp_from_counter callback into timepps.h routines in
- * the host is saved in each unit separately, so that binaries that
- * inline timepps.h into multiple source files (such as refclock_atom.c
- * and a number of other ntpd refclocks including refclock_nmea.c) will
- * get called back in the correct instance for each unit. This assumes
- * that ppsapi_prov_init for subsequent instances happens only after the
- * first instance has completed all time_pps_create() calls it will
- * invoke, which is a safe assumption at least for ntpd.
- */
-typedef struct skel_unit_tag {
- HANDLE device;
- ppps_ntp_timestamp_from_counter p_ntp_timestamp_from_counter;
-} skel_unit;
-
-
-/*
- * DllMain - DLL entrypoint, no-op.
- */
-BOOL APIENTRY DllMain(
- HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
-{
- UNUSED(hModule);
- UNUSED(ul_reason_for_call);
- UNUSED(lpReserved);
-
- return TRUE;
-}
-
-
-/*
- * prov_time_pps_create - create PPS handle given underlying device
- */
-int WINAPI
-prov_time_pps_create(
- HANDLE device, /* underlying device */
- pps_handle_t * handle /* returned handle */
- )
-{
- skel_unit * pskelunit;
- pps_unit_t * punit;
-
- /*
- * Allocate and initialize unit structure.
- */
-
- pskelunit = malloc(sizeof(*pskelunit));
- if (NULL == pskelunit)
- return ENOMEM;
-
- pskelunit->device = device;
- pskelunit->p_ntp_timestamp_from_counter = p_ntp_timestamp_from_counter;
-
- *handle = (*p_create_pps_handle)(pskelunit);
- if (*handle) {
- punit = (pps_unit_t *)*handle;
- punit->params.api_version = PPS_API_VERS_1;
- punit->params.mode = PPS_CAPTUREASSERT | PPS_TSFMT_TSPEC;
- }
-
- return (*handle)
- ? 0
- : ENOMEM;
-}
-
-
-/*
- * prov_time_pps_destroy - release PPS handle
- */
-int WINAPI
-prov_time_pps_destroy(
- pps_unit_t * unit,
- void * context
- )
-{
- skel_unit *pskelunit;
-
- UNUSED(unit);
-
- pskelunit = context;
- free(pskelunit);
-
- return 0;
-}
-
-
-/*
- * prov_time_pps_setparams - set parameters for handle
- */
-int WINAPI
-prov_time_pps_setparams(
- pps_unit_t * unit,
- void * context,
- const pps_params_t * params
- )
-{
- skel_unit *pskelunit;
- int mode, mode_in;
-
- pskelunit = context;
-
- /*
- * There was no reasonable consensus in the API working group.
- * I require `api_version' to be set!
- */
-
- if (params->api_version != PPS_API_VERS_1)
- return EINVAL;
-
- /*
- * The only settable modes are PPS_CAPTUREASSERT,
- * PPS_OFFSETASSERT, and the timestamp formats.
- */
-
- mode_in = params->mode;
-
- /*
- * Only one of the time formats may be selected
- * if a nonzero assert offset is supplied.
- */
- if ((mode_in & (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP))
- == (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) {
-
- if (params->assert_offset.tv_sec ||
- params->assert_offset.tv_nsec)
- return EINVAL;
-
- /*
- * If no offset was specified but both time
- * format flags are used consider it harmless
- * but turn off PPS_TSFMT_NTPFP so getparams
- * will not show both formats lit.
- */
- mode_in &= ~PPS_TSFMT_NTPFP;
- }
-
- /* turn off read-only bits */
-
- mode_in &= ~SKELPPS_RO;
-
- /*
- * test remaining bits, should only have captureassert,
- * offsetassert, and/or timestamp format bits.
- */
-
- if (mode_in & ~(PPS_CAPTUREASSERT | PPS_OFFSETASSERT |
- PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP))
- return EOPNOTSUPP;
-
- /*
- * ok, ready to go.
- */
-
- mode = unit->params.mode;
- unit->params = *params;
- unit->params.mode = mode | mode_in;
-
- return 0;
-}
-
-
-/*
- * prov_time_pps_fetch - Fetch timestamps
- */
-
-int WINAPI
-prov_time_pps_fetch(
- pps_unit_t * unit,
- void * context,
- const int tsformat,
- pps_info_t * pinfo,
- const struct timespec * timeout
- )
-{
- ULONGLONG WindowsTimestamp;
- ULONGLONG Counterstamp;
- skel_unit *pskelunit;
- pps_info_t infobuf;
-
- /*
- * nb. PPS_CANWAIT is NOT set by the implementation, we can totally
- * ignore the timeout variable.
- */
- UNUSED(timeout);
- pskelunit = context;
-
- memset(&infobuf, 0, sizeof(infobuf));
-
- /*
- * if not captureassert, nothing to return.
- */
-
- if (!(unit->params.mode & PPS_CAPTUREASSERT)) {
- *pinfo = infobuf;
- return 0;
- }
-
- /*
- * ADD CODE to retrieve timestamp here.
- */
- WindowsTimestamp = Counterstamp = 0;
- /*
- * ADD CODE to retrieve timestamp here.
- */
-
- /*
- * pps_ntp_timestamp_from_counter takes the two flavors
- * of timestamp we have (counter and system time) and
- * uses whichever it can to give the best NTP fixed-point
- * conversion. In ntpd the Counterstamp is typically
- * used. A stub implementation in timepps.h simply
- * converts from Windows timestamp to NTP fixed-point.
- * We call through a pointer to get ntpd's version.
- */
- (*pskelunit->p_ntp_timestamp_from_counter)(
- &infobuf.assert_timestamp_ntpfp,
- WindowsTimestamp,
- Counterstamp);
-
- /*
- * Note that only assert timestamps
- * are captured by this interface.
- */
- infobuf.assert_sequence = 0; /* ADD CODE */
-
- /*
- * Apply offset and translate to specified format
- */
- switch (tsformat) {
- case PPS_TSFMT_NTPFP: /* NTP format requires no translation */
- if (unit->params.mode & PPS_OFFSETASSERT) {
- NTPFP_L_ADDS(&infobuf.assert_timestamp_ntpfp,
- &unit->params.assert_offset_ntpfp);
- }
- break;
-
- case PPS_TSFMT_TSPEC: /* timespec format requires conversion to nsecs form */
- PPS_NTPTOTSPEC(infobuf.assert_timestamp);
- if (unit->params.mode & PPS_OFFSETASSERT) {
- infobuf.assert_timestamp.tv_sec +=
- unit->params.assert_offset.tv_sec;
- infobuf.assert_timestamp.tv_nsec +=
- unit->params.assert_offset.tv_nsec;
- PPS_NORMALIZE(infobuf.assert_timestamp);
- }
- break;
-
- default:
- return EINVAL;
- }
-
- infobuf.current_mode = unit->params.mode;
- *pinfo = infobuf;
- return (0);
-}
-
-
-/*
- * prov_time_pps_kcbind - specify kernel consumer
- *
- * Not supported so far by Windows.
- */
-int WINAPI
-prov_time_pps_kcbind(
- pps_unit_t * punit,
- void * context,
- const int kernel_consumer,
- const int edge,
- const int tsformat
- )
-{
- UNUSED(punit);
- UNUSED(context);
- UNUSED(kernel_consumer);
- UNUSED(edge);
- UNUSED(tsformat);
-
- return EOPNOTSUPP;
-}
-
-
-/*
- * prov_init - returns capabilities and provider name
- */
-int WINAPI
-ppsapi_prov_init(
- int ppsapi_timepps_prov_ver,
- pcreate_pps_handle create_pps_handle,
- ppps_ntp_timestamp_from_counter ntp_timestamp_from_counter,
- char * short_name_buf,
- size_t short_name_size,
- char * full_name_buf,
- size_t full_name_size
- )
-{
- ppsapi_provider test_prov;
-
- if (ppsapi_timepps_prov_ver < PPSAPI_TIMEPPS_PROV_VER)
- return 0;
-
- p_create_pps_handle = create_pps_handle;
- p_ntp_timestamp_from_counter = ntp_timestamp_from_counter;
-
- strncpy(short_name_buf, "skeleton", short_name_size);
- strncpy(full_name_buf,
- "skeleton, ADD CODE to make useful",
- full_name_size);
-
- /*
- * Use function pointer prototypes from timepps.h to verify
- * our prototypes match with some otherwise pointless code.
- */
- test_prov.ptime_pps_create = &prov_time_pps_create;
- test_prov.ptime_pps_destroy = &prov_time_pps_destroy;
- test_prov.ptime_pps_fetch = &prov_time_pps_fetch;
- test_prov.ptime_pps_kcbind = &prov_time_pps_kcbind;
- test_prov.ptime_pps_setparams = &prov_time_pps_setparams;
-
- return SKELPPS_CAPS;
-}
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def
deleted file mode 100644
index ef29709b0f67..000000000000
--- a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY "skeleton-ppsapi-provider.dll"
-
-EXPORTS
- ppsapi_prov_init
- prov_time_pps_create
- prov_time_pps_destroy
- prov_time_pps_fetch
- prov_time_pps_kcbind
- prov_time_pps_setparams \ No newline at end of file
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h
deleted file mode 100644
index 2bb79911152f..000000000000
--- a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// serialpps-ppsapi-provider.h
-//
-// For this tiny project the single header serves as a precompiled header
-// as well, meaning all the bulky headers are included before or within it.
-// Within, in this case.
-//
-
-#define _CRT_SECURE_NO_WARNINGS
-#include <stdio.h>
-/* Prevent inclusion of winsock.h in windows.h */
-#ifndef _WINSOCKAPI_
-#define _WINSOCKAPI_
-#endif
-#include <windows.h>
-typedef DWORD u_int32;
-#include "sys/time.h"
-#include "../../include/timepps.h"
-
-#ifndef UNUSED
-#define UNUSED(item) ((void)(item))
-#endif
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln
deleted file mode 100644
index 8c2417a91c88..000000000000
--- a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln
+++ /dev/null
@@ -1,19 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "skeleton-ppsapi-provider", "skeleton-ppsapi-provider.vcproj", "{F7842ACD-EB61-4D65-9999-AFB0E77E63EA}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {F7842ACD-EB61-4D65-9999-AFB0E77E63EA}.Debug|Win32.ActiveCfg = Debug|Win32
- {F7842ACD-EB61-4D65-9999-AFB0E77E63EA}.Debug|Win32.Build.0 = Debug|Win32
- {F7842ACD-EB61-4D65-9999-AFB0E77E63EA}.Release|Win32.ActiveCfg = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj
deleted file mode 100644
index bab3e7d404aa..000000000000
--- a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="skeleton-ppsapi-provider"
- ProjectGUID="{F7842ACD-EB61-4D65-9999-AFB0E77E63EA}"
- RootNamespace="skeletonppsapiprovider"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="."
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;"
- MinimalRebuild="true"
- ExceptionHandling="0"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderThrough="skeleton-ppsapi-provider.h"
- BrowseInformation="1"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateManifest="false"
- ModuleDefinitionFile="skeleton-ppsapi-provider.def"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="."
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderThrough="skeleton-ppsapi-provider.h"
- BrowseInformation="1"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateManifest="false"
- ModuleDefinitionFile="skeleton-ppsapi-provider.def"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\skeleton-ppsapi-provider.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- GeneratePreprocessedFile="0"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\skeleton-ppsapi-provider.h"
- >
- </File>
- <File
- RelativePath=".\sys\time.h"
- >
- </File>
- <File
- RelativePath="..\..\include\timepps.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/ppsapi/skelprov/sys/time.h b/ports/winnt/ppsapi/skelprov/sys/time.h
deleted file mode 100644
index 079e5b64431f..000000000000
--- a/ports/winnt/ppsapi/skelprov/sys/time.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * This sys/time.h is part of ppsapi-prov skeleton sample source code
- * for a Windows PPSAPI provider DLL. It was adapted from
- * ports/winnt/include/sys/time.h in ntpd.
- */
-
-#ifndef SYS_TIME_H
-#define SYS_TIME_H
-
-#include <windows.h>
-#include <time.h>
-
-typedef struct timespec {
- time_t tv_sec;
- long tv_nsec;
-} timespec_t;
-
-#endif /* SYS_TIME_H */
diff --git a/ports/winnt/scripts/mkver.bat b/ports/winnt/scripts/mkver.bat
deleted file mode 100755
index 7b448299607d..000000000000
--- a/ports/winnt/scripts/mkver.bat
+++ /dev/null
@@ -1,439 +0,0 @@
-@echo off
-GOTO PROG
-
-see notes/remarks directly below this header:
-######################################################################
-#
-# Revision: mkver.bat
-# Author: Frederick Czajka
-# Date: 02/10/2000
-# Purpose: Provide a NT Shell script to replace the perl script
-# that replaced the UNIX mkver shell script.
-#
-#
-#
-# Notes: I had two goals with this script one to only use native
-# NT Shell commands and two was too emulate the PERL style
-# output. This required some work for the DATE format as
-# you will see and TIME was really tricky to get a format
-# matching PERLs!
-#
-#
-# Changes:
-# 02/23/2011 David J Taylor - Use reg instead of regedit so "run as
-# administrator" is not required.
-# 12/21/2009 Dave Hart
-# - packageinfo.sh uses prerelease= now not
-# releasecandidate=
-# 08/28/2009 Dave Hart
-# - support for building using per-compiler subdirs of winnt
-# 08/08/2006 Heiko Gerstung
-# - bugfixed point / rcpoint errors leading to a wrong
-# version string
-# - added a few cases for uppercase strings
-# 03/09/2005 Heiko Gerstung
-# - added UTC offset to version time information
-# - bugfixed several issues preventing this script to be used on NT4
-# - removed an obsolete warning
-#
-# 03/08/2005 Danny Mayer
-# - bugfixed NOBK label position
-#
-# 03/08/2005 Heiko Gerstung
-# - bugfixed BK detection and support for multiple ChangeSets
-#
-# 02/24/2005 Heiko Gerstung
-# - check if BK is installed and do not try to call it if not
-#
-#
-# 02/03/2005 Heiko Gerstung
-# - now getting NTP version from version.m4 (not configure)
-# - added BK ChangeSet revision and Openssl-Indicator (-o)
-# to the version number
-# - major rework of the time and date recognition routines
-# in order to reflect international settings and OS-
-# dependand formats
-#
-######################################################################
-
-Notes/Howtos:
-
-If you spot an error stating that bk.exe could not be found or executed
-although it is installed on your computer, you should try to add the path
-to your BK binary in your IDE configuration (for VisualStudio see
-Tools/Options/Directories/Executables).
-
-Alternatively you can create a file called 'version' in the root path of
-your ntp source tree which holds a string that is added to the version number.
-
-
-:PROG
-IF {%1} == {} GOTO USAGE
-IF {%1} == {-H} GOTO USAGE
-IF {%2} == {} GOTO USAGE
-IF {%1} == {-P} GOTO BEGIN
-
-
-
-REM *****************************************************************************************************************
-REM For any other bizarre permutation...
-REM *****************************************************************************************************************
-GOTO USAGE
-
-:BEGIN
-
-SET GENERATED_PROGRAM=%2
-
-REM *****************************************************************************************************************
-REM Reimplemented from orginal Unix Shell script
-REM *****************************************************************************************************************
- IF NOT EXIST .version ECHO 0 > .version
- FOR /F %%i IN (.version) do @SET RUN=%%i
- SET /A RUN=%RUN%+1
- ECHO %RUN% > .version
-
-REM *****************************************************************************************************************
-REM Resetting variables
-REM *****************************************************************************************************************
- SET VER=
- SET CSET=
- SET SSL=
- SET MYDATE=
- SET MYTIME=
- SET DAY=99
- SET NMM=99
- SET YEAR=0
- SET HOUR=
- SET MIN=
- SET MMIN=
- SET SEC=
- SET SUBSEC=
- SET DATEDELIM=
- SET TIMEDELIM=
- SET DATEFORMAT=
- SET TIMEFORMAT=
- SET UTC=
- SET ACTIVEBIAS=
-
-REM *****************************************************************************************************************
-REM Check if DATE and TIME environment variables are available
-REM *****************************************************************************************************************
-
- SET MYDATE=%DATE%
- SET MYTIME=%TIME%
-
- REM ** Not available (huh? Are you older than NT4SP6A, grandpa?)
- IF "%MYDATE%" == "" FOR /F "TOKENS=1 DELIMS=" %%a IN ('date/t') DO SET MYDATE=%%a
- IF "%MYTIME%" == "" FOR /F "TOKENS=1 DELIMS=" %%a IN ('time/t') DO SET MYTIME=%%a
-
-REM *****************************************************************************************************************
-REM Try to find out UTC offset
-REM *****************************************************************************************************************
-
- REM *** Start with setting a dummy value which is used when we are not able to find out the real UTC offset
- SET UTC=(LOCAL TIME)
- SET UTC_HR=
- SET UTC_MIN=
- SET UTC_SIGN=
-
- REM *** Now get the timezone settings from the registry
- reg export "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" %TEMP%\TZ-%GENERATED_PROGRAM%.TMP
- REM was: regedit /e %TEMP%\TZ-%GENERATED_PROGRAM%.TMP "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation"
- IF NOT EXIST %TEMP%\TZ-%GENERATED_PROGRAM%.TMP GOTO NOTZINFO
-
- for /f "Tokens=1* Delims==" %%a in ('type %TEMP%\TZ-%GENERATED_PROGRAM%.TMP') do if %%a == "ActiveTimeBias" SET ACTIVEBIAS=%%b
- for /f "Tokens=1* Delims=:" %%a in ('echo %ACTIVEBIAS%') do ( SET ACTIVEBIAS=%%b & SET PARTYP=%%a )
-
- REM *** Clean up temporary file
- IF EXIST %TEMP%\TZ-%GENERATED_PROGRAM%.TMP DEL %TEMP%\TZ-%GENERATED_PROGRAM%.TMP
-
- REM *** Check if we really got a dword value from the registry ...
- IF NOT "%PARTYP%"=="dword " goto NOTZINFO
-
- REM *** Check if we are in UTC timezone, then we can avoid some stress...
- if "%ACTIVEBIAS%" == "00000000" SET UTC=(UTC) & GOTO NOTZINFO
-
- SET HI=0x%ACTIVEBIAS:~0,4%
- SET LO=0x%ACTIVEBIAS:~4,4%
-
- if "%HI%"=="0xffff" ( SET /A ACTIVEBIAS=%LO% - %HI% - 1 ) ELSE ( SET /A ACTIVEBIAS=%LO%)
- SET /A UTC_HR="%ACTIVEBIAS%/60"
- SET /A UTC_MIN="%ACTIVEBIAS% %% 60"
- SET UTC_SIGN=%ACTIVEBIAS:~0,1%
-
- REM *** check the direction in which the local timezone alters UTC time
- IF NOT "%UTC_SIGN%"=="-" SET UTC_SIGN=+
- IF "%UTC_SIGN%"=="-" SET UTC_HR=%UTC_HR:~1,2%
-
- REM *** Now turn the direction, because we need to know it from the viewpoint of UTC
- IF "%UTC_SIGN%"=="+" (SET UTC_SIGN=-) ELSE (SET UTC_SIGN=+)
-
- REM *** Put the values in a "00" format
- IF %UTC_HR% LEQ 9 SET UTC_HR=0%UTC_HR%
- IF %UTC_MIN% LEQ 9 SET UTC_MIN=0%UTC_MIN%
-
- REM *** Set up UTC offset string used in version string
- SET UTC=(UTC%UTC_SIGN%%UTC_HR%:%UTC_MIN%)
-
-
-:NOTZINFO
-echo off
-
-REM *****************************************************************************************************************
-REM Now grab the Version number out of the source code (using the packageinfo.sh file...)
-REM *****************************************************************************************************************
-
- REM First, get the main NTP version number. In recent versions this must be extracted
- REM from a packageinfo.sh file while in earlier versions the info was available from
- REM a version.m4 file.
- SET F_PACKAGEINFO_SH=..\..\..\..\packageinfo.sh
- IF EXIST %F_PACKAGEINFO_SH% goto VER_FROM_PACKAGE_INFO
- REM next two lines can go away when all windows compilers are building under
- rem ports\winnt\<compiler dir>\<binary name dir> (ports\winnt\vs2008\ntpd)
- rem rather than ports\winnt\<binary name dir> (ports\winnt\ntpd)
- SET F_PACKAGEINFO_SH=..\..\..\packageinfo.sh
- IF EXIST %F_PACKAGEINFO_SH% goto VER_FROM_PACKAGE_INFO
- goto ERRNOVERF
-
-:VER_FROM_PACKAGE_INFO
- REM Get version from packageinfo.sh file, which contains lines reading e.g.
-
- TYPE %F_PACKAGEINFO_SH% | FIND /V "rcpoint=" | FIND /V "betapoint=" | FIND "point=" > point.txt
- SET F_POINT_SH=point.txt
-
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "proto=" %%F_PACKAGEINFO_SH%%') DO SET PROTO=%%a
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "major=" %%F_PACKAGEINFO_SH%%') DO SET MAJOR=%%a
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "minor=" %%F_PACKAGEINFO_SH%%') DO SET MINOR=%%a
-
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "point=" %%F_POINT_SH%%') DO SET POINT=%%a
- IF "%POINT%"=="NEW" set POINT=
- IF NOT "%POINT%"=="" set POINT=p%POINT%
-
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "betapoint=" %%F_PACKAGEINFO_SH%%') DO SET BETAPOINT=%%a
-
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "rcpoint=" %%F_PACKAGEINFO_SH%%') DO SET RCPOINT=%%a
-
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "special=" %%F_PACKAGEINFO_SH%%') DO SET SPECIAL=%%a
- IF NOT "%SPECIAL%"=="" set SPECIAL=-%SPECIAL%
-
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "prerelease=" %%F_PACKAGEINFO_SH%%') DO SET PRERELEASE=%%a
- IF /I "%PRERELEASE%"=="beta" set PR_SUF=-beta
- IF /I "%PRERELEASE%"=="rc" set PR_SUF=-RC
-
- FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "repotype=" %%F_PACKAGEINFO_SH%%') DO SET REPOTYPE=%%a
- IF /I "%REPOTYPE%"=="stable" set REPOTYPE=STABLE
-
- IF NOT "%REPOTYPE%"=="STABLE" SET RCPOINT=
- IF "%PR_SUF%"=="-RC" set PR_POINT=%RCPOINT%
- IF "%PR_SUF%"=="-beta" set PR_POINT=%BETAPOINT%
-
- SET VER=%PROTO%.%MAJOR%.%MINOR%%POINT%%SPECIAL%%PR_SUF%%PR_POINT%
-
- REM Now we have the version info, try to add a BK ChangeSet version number
-
- REM ** Check if BK is installed ...
- bk -R prs -hr+ -nd:I: ChangeSet 2> NUL > NUL
- IF ERRORLEVEL 1 GOTO NOBK
-
- REM ** Try to get the CSet rev directly from BK
- FOR /F "TOKENS=1 DELIMS==" %%a IN ('bk.exe -R prs -hr+ -nd:I: ChangeSet') DO @SET CSET=%%a
-
-:NOBK
- REM ** If that was not successful, we'll take a look into a version file, if available
- IF EXIST ..\..\..\..\sntp\scm-rev (
- IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\..\sntp\scm-rev') DO @SET CSET=%%a
- )
- REM next if block can go away once all windows compilers are building in
- REM ports\winnt\<compiler dir>\<binary name dir> (ports\winnt\vs2008\ntpd)
- IF EXIST ..\..\..\sntp\scm-rev (
- IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\sntp\scm-rev') DO @SET CSET=%%a
- )
-
- REM ** Now, expand our version number with the CSet revision, if we managed to get one
- IF NOT "%CSET%"=="" SET VER=%VER%@%CSET%
-
- REM We can add a "crypto" identifier (-o) if we see that Crypto support is included in our build
- REM we always include openssl on windows...
- SET VER=%VER%-o
-
-
-REM *****************************************************************************************************************
-REM Check for user settings regarding the time and date format, we use the registry to find out...
-REM *****************************************************************************************************************
-
-
- REM Any temporary files left from a previous run? Go where you belong...
- IF exist userset.reg del userset.reg
- IF exist userset.txt del userset.txt
-
- reg export "HKEY_CURRENT_USER\Control Panel\International" userset.reg
- REM was: regedit /E userset.reg "HKEY_CURRENT_USER\Control Panel\International"
- IF not exist userset.reg goto ERRNOREG
-
- rem *** convert from unicode to ascii if necessary
- type userset.reg > userset.txt
-
-
- FOR /F "TOKENS=1-9 DELIMS== " %%a IN ('findstr "iDate" userset.txt') DO SET DATEFORMAT=%%b
- FOR /F "TOKENS=1-9 DELIMS== " %%a IN ('findstr "iTime" userset.txt') DO SET TIMEFORMAT=%%b
-
- FOR /F "TOKENS=1-9 DELIMS== " %%a IN ('findstr /R "sDate\>" userset.txt') DO SET DATEDELIM=%%b
- FOR /F "TOKENS=1-9 DELIMS== " %%a IN ('findstr /R "sTime\>" userset.txt') DO SET TIMEDELIM=%%b
-
- IF "%TIMEFORMAT%"=="" GOTO ERRNOTIME
- IF "%DATEFORMAT%"=="" GOTO ERRNODATE
- IF "%TIMEDELIM%"=="" GOTO ERRNOTIME
- IF "%DATEDELIM%"=="" GOTO ERRNODATE
-
- SET TIMEDELIM=%TIMEDELIM:~1,1%
- SET DATEDELIM=%DATEDELIM:~1,1%
- SET TIMEFORMAT=%TIMEFORMAT:~1,1%
- SET DATEFORMAT=%DATEFORMAT:~1,1%
-
-REM *****************************************************************************************************************
-REM Well, well. Its time to look at the time and format it in a standard way (if possible)
-REM *****************************************************************************************************************
-
-
- FOR /F "TOKENS=1-4 DELIMS=%TIMEDELIM% " %%a IN ('echo %MYTIME%') DO SET AA=%%a&SET BB=%%b&SET CC=%%c&SET DD=%%d
-
- REM 12H Format
- IF "%TIMEFORMAT%" == "0" (
- SET HOUR=%AA%
- SET MIN=%BB%
- FOR /F "USEBACKQ TOKENS=1 DELIMS=ap" %%a IN ('%BB%') DO SET MMIN=%%a
- SET SEC=%CC%
- SET SUBSEC=%DD%
- )
-
- REM Get rid of the "a" or "p" if we have one of these in our minute string
- IF NOT "%MMIN%"=="%MIN%" FOR /F "USEBACKQ TOKENS=1 DELIMS=ap " %%a IN ('%MIN%') DO SET MIN=%%a
-
- REM 24H Format
- IF "%TIMEFORMAT%" == "1" (
- SET HOUR=%AA%
- SET MIN=%BB%
- SET SEC=%CC%
- SET SUBSEC=%DD%
- )
-
- IF "%HOUR%"=="" GOTO ERRNOTIME
- IF "%MIN%"=="" GOTO ERRNOTIME
-
- IF "%SEC%"=="" SET SEC=00
- IF "%SUBSEC%"=="" SET SUBSEC=00
-
-
-REM *****************************************************************************************************************
-REM It's time to format the date :-)
-REM *****************************************************************************************************************
-
-
- FOR /F "TOKENS=1-4 DELIMS=./- " %%a IN ('ECHO %MYDATE%') DO SET AA=%%a&SET BB=%%b&SET CC=%%c&SET DD=%%d
-
- IF "%DD%" == "" (
- REM No Day of Week in Date
- ( IF "%DATEFORMAT%" == "0" SET DOW=_&SET DAY=%BB%&SET NMM=%AA%&SET YEAR=%CC% )
- ( IF "%DATEFORMAT%" == "1" SET DOW=_&SET DAY=%AA%&SET NMM=%BB%&SET YEAR=%CC% )
- ( IF "%DATEFORMAT%" == "2" SET DOW=_&SET DAY=%CC%&SET NMM=%BB%&SET YEAR=%AA% )
- ) ELSE (
- ( IF "%DATEFORMAT%" == "0" SET DOW=%AA%&SET DAY=%CC%&SET NMM=%BB%&SET YEAR=%DD% )
- ( IF "%DATEFORMAT%" == "1" SET DOW=%AA%&SET DAY=%BB%&SET NMM=%CC%&SET YEAR=%DD% )
- ( IF "%DATEFORMAT%" == "2" SET DOW=%AA%&SET DAY=%DD%&SET NMM=%CC%&SET YEAR=%BB% )
- )
-
- REM Something went wrong, we weren't able to get a valid date
- IF NOT "%YEAR%" == "0" GOTO DATEOK
- goto ERRNODATE
-
-:DATEOK
-
- REM Clean up any temporary files we may have created...
- REM IF exist userset.reg del userset.reg
- REM IF exist userset.txt del userset.txt
-
- IF "%NMM%" == "01" SET MONTH=Jan
- IF "%NMM%" == "02" SET MONTH=Feb
- IF "%NMM%" == "03" SET MONTH=Mar
- IF "%NMM%" == "04" SET MONTH=Apr
- IF "%NMM%" == "05" SET MONTH=May
- IF "%NMM%" == "06" SET MONTH=Jun
- IF "%NMM%" == "07" SET MONTH=Jul
- IF "%NMM%" == "08" SET MONTH=Aug
- IF "%NMM%" == "09" SET MONTH=Sep
- IF "%NMM%" == "10" SET MONTH=Oct
- IF "%NMM%" == "11" SET MONTH=Nov
- IF "%NMM%" == "12" SET MONTH=Dec
-
- IF NOT {%MONTH%} == {} GOTO DATE_OK
-
- REM *** Not US date format! Assume ISO: yyyy-mm-dd
-
- FOR /F "TOKENS=1-4 DELIMS=/- " %%a IN ('date/t') DO SET DAY=%%a&SET yyyy=%%b&SET nmm=%%c&SET dd=%%d
-
- echo a=%%a b=%%b c=%%c d=%%d
- IF "%NMM%" == "01" SET MONTH=Jan
- IF "%NMM%" == "02" SET MONTH=Feb
- IF "%NMM%" == "03" SET MONTH=Mar
- IF "%NMM%" == "04" SET MONTH=Apr
- IF "%NMM%" == "05" SET MONTH=May
- IF "%NMM%" == "06" SET MONTH=Jun
- IF "%NMM%" == "07" SET MONTH=Jul
- IF "%NMM%" == "08" SET MONTH=Aug
- IF "%NMM%" == "09" SET MONTH=Sep
- IF "%NMM%" == "10" SET MONTH=Oct
- IF "%NMM%" == "11" SET MONTH=Nov
- IF "%NMM%" == "12" SET MONTH=Dec
-
-:DATE_OK
- IF "%SS" == "" SET SS="00"
-
-
-REM *****************************************************************************************************************
-REM Now create a valid version.c file ...
-REM *****************************************************************************************************************
-
- ECHO Version %VER% Build %RUN% date %MONTH%/%DAY%/%YEAR% time %HOUR%:%MIN%:%SEC% %UTC%
- ECHO char * Version = "%GENERATED_PROGRAM% %VER% %MONTH% %DAY% %HOUR%:%MIN%:%SEC% %UTC% %YEAR% (%RUN%)" ; > version.c
- GOTO EOF
-
-
-REM *****************************************************************************************************************
-REM Here are the error messages I know
-REM *****************************************************************************************************************
-:ERRNOREG
- ECHO "Error: Registry could not be read (check if reg.exe is available and works as expected)"
- GOTO EOF
-
-
-:ERRNODATE
- ECHO "Error: Dateformat unknown (check if contents of userset.txt are correctly, especially for iDate and sDate)"
- GOTO EOF
-
-:ERRNOTIME
- ECHO "Error: Timeformat unknown (check if contents of userset.txt are correctly, especially for iTime and sTime)"
- GOTO EOF
-
-:ERRNOVERF
- ECHO "Error: Version file not found (searching for ..\..\..\..\packageinfo.sh)"
- GOTO EOF
-
-
-REM *****************************************************************************************************************
-REM Show'em how to run (me)
-REM *****************************************************************************************************************
-:USAGE
-
- ECHO Usage: mkver.bat [ -P <Program Name> -H ]
- ECHO -P Database Name
- ECHO -H Help on options
-
-REM *****************************************************************************************************************
-REM All good things come to an end someday. Time to leave
-REM *****************************************************************************************************************
-:EOF
-
-REM *** Cleaning up
-IF EXIST point.txt DEL point.txt
-IF EXIST userset.txt DEL userset.txt
-IF EXIST userset.reg DEL userset.reg
diff --git a/ports/winnt/vs2005/Instsrv.vcproj b/ports/winnt/vs2005/Instsrv.vcproj
deleted file mode 100644
index 74ccb8171dca..000000000000
--- a/ports/winnt/vs2005/Instsrv.vcproj
+++ /dev/null
@@ -1,244 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="instsrv"
- ProjectGUID="{EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\instsrv\Debug"
- IntermediateDirectory=".\instsrv\Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\instsrv\Debug/Instsrv.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include,..\include,."
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- PrecompiledHeaderFile=".\instsrv\Debug/Instsrv.pch"
- AssemblerListingLocation=".\instsrv\Debug/"
- ObjectFile=".\instsrv\Debug/"
- ProgramDataBaseFileName=".\instsrv\Debug/"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="bin/Debug/Instsrv.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- ProgramDatabaseFile=".\instsrv\Debug/Instsrv.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\instsrv\Debug/Instsrv.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\instsrv\Release"
- IntermediateDirectory=".\instsrv\Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\instsrv\Release/Instsrv.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include,..\include,."
- PreprocessorDefinitions="NDEBUG;_WINDOWS;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\instsrv\Release/Instsrv.pch"
- AssemblerListingLocation=".\instsrv\Release/"
- ObjectFile=".\instsrv\Release/"
- ProgramDataBaseFileName=".\instsrv\Release/"
- WarningLevel="4"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="bin/Release/Instsrv.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ProgramDatabaseFile=".\instsrv\Release/Instsrv.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\instsrv\Release/Instsrv.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\instsrv\instsrv.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2005/libntp.vcproj b/ports/winnt/vs2005/libntp.vcproj
deleted file mode 100644
index f2d0b9e714df..000000000000
--- a/ports/winnt/vs2005/libntp.vcproj
+++ /dev/null
@@ -1,864 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="libntp"
- ProjectGUID="{ECDDC7EE-5805-4603-B38D-804C09BDC910}"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\libntp\Debug"
- IntermediateDirectory=".\libntp\Debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="_DEBUG;_LIB;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- PrecompiledHeaderFile=".\libntp\Debug/libntp.pch"
- AssemblerListingLocation=".\libntp\Debug/"
- ObjectFile=".\libntp\Debug/"
- ProgramDataBaseFileName=".\libntp\Debug/"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile=".\libntp\Debug\libntp.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\libntp\Debug/libntp.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\libntp\Release"
- IntermediateDirectory=".\libntp\Release"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="NDEBUG;_LIB;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\libntp\Release/libntp.pch"
- AssemblerListingLocation=".\libntp\Release/"
- ObjectFile=".\libntp\Release/"
- ProgramDataBaseFileName=".\libntp\Release/"
- WarningLevel="4"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile=".\libntp\Release\libntp.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\libntp\Release/libntp.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\libntp\a_md5encrypt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\adjtime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\assertions.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\atoint.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\atolfp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\atouint.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\authkeys.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\authreadkeys.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\authusekey.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\buffer.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\backtrace-emtpytbl.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\backtrace.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\buftvtots.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\caljulian.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\caltontp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\calyearstart.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\clocktime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\clocktypes.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\condition.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\decodenetnum.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\dofptoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\dolfptoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\emalloc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\error.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\event.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\findconfig.c"
- >
- </File>
- <File
- RelativePath="..\libntp\getclock.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\getopt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\hextoint.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\hextolfp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\humandate.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\icom.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\inet_aton.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\inet_ntop.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\inet_pton.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\interfaceiter.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\iosignal.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\lib.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\lib_strbuf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\sntp\libopts\libopts.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\log.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\machines.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\md5.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\mktime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\modetoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\nls\msgcat.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\mstolfp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\msyslog.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\net.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\netaddr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\netof.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\netscope.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ntp_calendar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ntp_intres.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ntp_libopts.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ntp_lineedit.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ntp_random.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ntp_rfc2553.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ntp_worker.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\numtoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\numtohost.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\octtoint.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\once.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\ondestroy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\prettydate.c"
- >
- </File>
- <File
- RelativePath="..\libntp\randfile.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\recvbuff.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\refnumtoa.c"
- >
- </File>
- <File
- RelativePath="..\libntp\setpriority.c"
- >
- </File>
- <File
- RelativePath="..\libntp\SetSystemTime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\snprintf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\sockaddr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\socket.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\socktoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\socktohost.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ssl_init.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\statestr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\stdtime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\strerror.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\strl_obsd.c"
- >
- </File>
- <File
- RelativePath="..\libntp\syslog.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\syssignal.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\systime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\task.c"
- >
- </File>
- <File
- RelativePath="..\libntp\termios.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\thread.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\time.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\timetoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\timevalops.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\uglydate.c"
- >
- </File>
- <File
- RelativePath="..\libntp\util_clockstuff.c"
- >
- </File>
- <File
- RelativePath="..\libntp\win32_io.c"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\win32os.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\work_fork.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\work_thread.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\ymd2yd.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\..\include\binio.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\buffer.h"
- >
- </File>
- <File
- RelativePath="..\include\clockstuff.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\condition.h"
- >
- </File>
- <File
- RelativePath="..\include\config.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\event.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\global.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\hash.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ieee754io.h"
- >
- </File>
- <File
- RelativePath="..\include\netinet\in.h"
- >
- </File>
- <File
- RelativePath="..\include\arpa\inet.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\interfaceiter.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\intreswork.h"
- >
- </File>
- <File
- RelativePath="..\include\inttypes.h"
- >
- </File>
- <File
- RelativePath="..\include\sys\ioctl.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\iosignal.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\ipv6.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\l_stdlib.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\lib_strbuf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\log.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\md5.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\isc\mem.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\net.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\isc\netaddr.h"
- >
- </File>
- <File
- RelativePath="..\include\netdb.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\isc\netscope.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_calendar.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_control.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_fp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_if.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_io.h"
- >
- </File>
- <File
- RelativePath="..\include\ntp_iocompletionport.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_lineedit.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_lists.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_machine.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_malloc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_proto.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_random.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_refclock.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_rfc2553.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_select.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_stdlib.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_string.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_syslog.h"
- >
- </File>
- <File
- RelativePath="..\include\ntp_timer.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_intres.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_types.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_unixtime.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntpd.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\ondestroy.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\platform.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\recvbuff.h"
- >
- </File>
- <File
- RelativePath="..\include\sys\signal.h"
- >
- </File>
- <File
- RelativePath="..\include\sys\socket.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\stat.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\stdtime.h"
- >
- </File>
- <File
- RelativePath="..\include\syslog.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\task.h"
- >
- </File>
- <File
- RelativePath="..\include\termios.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\thread.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\time.h"
- >
- </File>
- <File
- RelativePath="..\include\sys\time.h"
- >
- </File>
- <File
- RelativePath="..\include\win32_io.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\win32os.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Generated Files"
- >
- <File
- RelativePath="..\libntp\messages.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- >
- <File
- RelativePath="..\libntp\messages.mc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Message Compiler"
- CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
- Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Message Compiler"
- CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
- Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntp.sln b/ports/winnt/vs2005/ntp.sln
deleted file mode 100644
index 6b840bed78b1..000000000000
--- a/ports/winnt/vs2005/ntp.sln
+++ /dev/null
@@ -1,70 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "instsrv", "Instsrv.vcproj", "{EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libntp", "libntp.vcproj", "{ECDDC7EE-5805-4603-B38D-804C09BDC910}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpd", "ntpd.vcproj", "{F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}"
- ProjectSection(ProjectDependencies) = postProject
- {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpdate", "ntpdate.vcproj", "{9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}"
- ProjectSection(ProjectDependencies) = postProject
- {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpdc", "ntpdc.vcproj", "{C82634BB-AC80-4796-B2AF-2903C665ED17}"
- ProjectSection(ProjectDependencies) = postProject
- {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpkeygen", "ntpkeygen.vcproj", "{9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}"
- ProjectSection(ProjectDependencies) = postProject
- {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpq", "ntpq.vcproj", "{EA10E04E-946B-44A6-B0AB-B5B93A160744}"
- ProjectSection(ProjectDependencies) = postProject
- {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}.Debug|Win32.ActiveCfg = Debug|Win32
- {EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}.Debug|Win32.Build.0 = Debug|Win32
- {EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}.Release|Win32.ActiveCfg = Release|Win32
- {EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}.Release|Win32.Build.0 = Release|Win32
- {ECDDC7EE-5805-4603-B38D-804C09BDC910}.Debug|Win32.ActiveCfg = Debug|Win32
- {ECDDC7EE-5805-4603-B38D-804C09BDC910}.Debug|Win32.Build.0 = Debug|Win32
- {ECDDC7EE-5805-4603-B38D-804C09BDC910}.Release|Win32.ActiveCfg = Release|Win32
- {ECDDC7EE-5805-4603-B38D-804C09BDC910}.Release|Win32.Build.0 = Release|Win32
- {F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}.Debug|Win32.ActiveCfg = Debug|Win32
- {F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}.Debug|Win32.Build.0 = Debug|Win32
- {F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}.Release|Win32.ActiveCfg = Release|Win32
- {F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}.Release|Win32.Build.0 = Release|Win32
- {9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}.Debug|Win32.ActiveCfg = Debug|Win32
- {9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}.Debug|Win32.Build.0 = Debug|Win32
- {9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}.Release|Win32.ActiveCfg = Release|Win32
- {9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}.Release|Win32.Build.0 = Release|Win32
- {C82634BB-AC80-4796-B2AF-2903C665ED17}.Debug|Win32.ActiveCfg = Debug|Win32
- {C82634BB-AC80-4796-B2AF-2903C665ED17}.Debug|Win32.Build.0 = Debug|Win32
- {C82634BB-AC80-4796-B2AF-2903C665ED17}.Release|Win32.ActiveCfg = Release|Win32
- {C82634BB-AC80-4796-B2AF-2903C665ED17}.Release|Win32.Build.0 = Release|Win32
- {9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}.Debug|Win32.ActiveCfg = Debug|Win32
- {9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}.Debug|Win32.Build.0 = Debug|Win32
- {9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}.Release|Win32.ActiveCfg = Release|Win32
- {9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}.Release|Win32.Build.0 = Release|Win32
- {EA10E04E-946B-44A6-B0AB-B5B93A160744}.Debug|Win32.ActiveCfg = Debug|Win32
- {EA10E04E-946B-44A6-B0AB-B5B93A160744}.Debug|Win32.Build.0 = Debug|Win32
- {EA10E04E-946B-44A6-B0AB-B5B93A160744}.Release|Win32.ActiveCfg = Release|Win32
- {EA10E04E-946B-44A6-B0AB-B5B93A160744}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/ports/winnt/vs2005/ntpd.vcproj b/ports/winnt/vs2005/ntpd.vcproj
deleted file mode 100644
index 005f287bcd5b..000000000000
--- a/ports/winnt/vs2005/ntpd.vcproj
+++ /dev/null
@@ -1,1893 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="ntpd"
- ProjectGUID="{F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\ntpd\Release"
- IntermediateDirectory=".\ntpd\Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntpd\Release/ntpd.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".,..\..\..\ntpd,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\ntpd\Release/ntpd.pch"
- AssemblerListingLocation=".\ntpd\Release/"
- ObjectFile=".\ntpd\Release/"
- ProgramDataBaseFileName=".\ntpd\Release/"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
- OutputFile="bin/Release/ntpd.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ProgramDatabaseFile="bin/Release/ntpd.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntpd\Release/ntpd.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\ntpd\Debug"
- IntermediateDirectory=".\ntpd\Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntpd\Debug/ntpd.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".,..\..\..\ntpd,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- PrecompiledHeaderFile=".\ntpd\Debug/ntpd.pch"
- AssemblerListingLocation=".\ntpd\Debug/"
- ObjectFile=".\ntpd\Debug/"
- ProgramDataBaseFileName=".\ntpd\Debug/"
- BrowseInformation="1"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
- OutputFile="bin/Debug/ntpd.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="bin/Debug/ntpd.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntpd\Debug/ntpd.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\ntpd\cmd_args.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\ntpd\nt_clockstuff.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_config.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_control.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_crypto.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_filegen.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_io.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\ntpd\ntp_iocompletionport.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_leapsec.c"
- >
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_loopfilter.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_monitor.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_parser.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_peer.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_proto.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_refclock.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_request.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_restrict.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_scanner.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_timer.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_util.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntpd-opts.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntpd.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\ntpd\ntservice.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\..\include\ascii.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\assertions.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\binio.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\boolean.h"
- >
- </File>
- <File
- RelativePath="..\include\clockstuff.h"
- >
- </File>
- <File
- RelativePath="..\include\config.h"
- >
- </File>
- <File
- RelativePath="..\include\hopf_PCI_io.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ieee754io.h"
- >
- </File>
- <File
- RelativePath="..\include\netinet\in.h"
- >
- </File>
- <File
- RelativePath="..\include\arpa\inet.h"
- >
- </File>
- <File
- RelativePath="..\include\isc\int.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\interfaceiter.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\iosignal.h"
- >
- </File>
- <File
- RelativePath="..\include\isc\ipv6.h"
- >
- </File>
- <File
- RelativePath="..\..\..\ntpd\jupiter.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\l_stdlib.h"
- >
- </File>
- <File
- RelativePath="..\..\..\libntp\log.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\mbg_gps166.h"
- >
- </File>
- <File
- RelativePath="..\include\isc\net.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\netaddr.h"
- >
- </File>
- <File
- RelativePath="..\include\netdb.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_calendar.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_cmdargs.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_config.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_control.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_debug.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_filegen.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_fp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_if.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_io.h"
- >
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntp_leapsec.h"
- >
- </File>
- <File
- RelativePath="..\include\ntp_iocompletionport.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_machine.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_malloc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_proto.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_random.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_refclock.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_request.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_rfc2553.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_select.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_stdlib.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_string.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_syslog.h"
- >
- </File>
- <File
- RelativePath="..\include\ntp_timer.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_tty.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_types.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_unixtime.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_worker.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntp_workimpl.h"
- >
- </File>
- <File
- RelativePath="..\..\..\ntpd\ntpd-opts.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\ntpd.h"
- >
- </File>
- <File
- RelativePath="..\include\ntservice.h"
- >
- </File>
- <File
- RelativePath="..\include\isc\offset.h"
- >
- </File>
- <File
- RelativePath="..\..\..\sntp\libopts\autoopts\options.h"
- >
- </File>
- <File
- RelativePath="..\include\sys\param.h"
- >
- </File>
- <File
- RelativePath="..\include\isc\platform.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\recvbuff.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\include\isc\result.h"
- >
- </File>
- <File
- RelativePath="..\include\sys\socket.h"
- >
- </File>
- <File
- RelativePath="..\include\syslog.h"
- >
- </File>
- <File
- RelativePath="..\include\termios.h"
- >
- </File>
- <File
- RelativePath="..\include\sys\wait.h"
- >
- </File>
- <File
- RelativePath="..\include\win32_io.h"
- >
- </File>
- <File
- RelativePath="..\..\..\lib\isc\win32\include\isc\win32os.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Generated Files"
- >
- <File
- RelativePath="..\libntp\messages.rc"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions=""
- AdditionalIncludeDirectories="\ntp-dev-4.2.5p209\ports\winnt\libntp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions=""
- AdditionalIncludeDirectories="\ntp-dev-4.2.5p209\ports\winnt\libntp"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\libntp\MSG00001.bin"
- >
- </File>
- <File
- RelativePath="version.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- <File
- RelativePath="..\libntp\messages.mc"
- >
- </File>
- </Filter>
- <Filter
- Name="Reference Clock"
- >
- <File
- RelativePath="..\ntpd\hopf_PCI_io.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_acts.c"
- >
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_arbiter.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_arc.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_as2201.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_atom.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_bancomm.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_chronolog.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_chu.c"
- >
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_conf.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_datum.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_dumbclock.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_gpsvme.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_heath.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_hopfpci.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_hopfser.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_hpgps.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_irig.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_jupiter.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_leitch.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_local.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_msfees.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_mx4200.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_nmea.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_oncore.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_palisade.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_palisade.h"
- >
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_parse.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_pst.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_ptbacts.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_shm.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_tpro.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_true.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\..\ntpd\refclock_tsyncpci.c"
- >
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_usno.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpd\refclock_wwvb.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Parse Lib"
- >
- <File
- RelativePath="..\..\..\libparse\clk_computime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_dcf7000.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_hopf6021.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_meinberg.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_rawdcf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_rcc8000.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_schmid.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_trimtaip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_trimtsip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_trimtsip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_varitext.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\clk_wharton.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\data_mbg.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\parse.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libparse\parse_conf.c"
- >
- </File>
- </Filter>
- <File
- RelativePath="..\..\..\configure"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpd&#x0D;&#x0A;"
- AdditionalDependencies="..\scripts\mkver.bat;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpd&#x0D;&#x0A;"
- AdditionalDependencies="..\scripts\mkver.bat;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\scripts\mkver.bat"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntpdate.vcproj b/ports/winnt/vs2005/ntpdate.vcproj
deleted file mode 100644
index 2e40cad47837..000000000000
--- a/ports/winnt/vs2005/ntpdate.vcproj
+++ /dev/null
@@ -1,294 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="ntpdate"
- ProjectGUID="{AF12F490-0BDA-4BC4-8F4B-EDA43B381CB3}"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\ntpdate\Debug"
- IntermediateDirectory=".\ntpdate\Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntpdate\Debug/ntpdate.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC)"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- PrecompiledHeaderFile=".\ntpdate\Debug/ntpdate.pch"
- AssemblerListingLocation=".\ntpdate\Debug/"
- ObjectFile=".\ntpdate\Debug/"
- ProgramDataBaseFileName=".\ntpdate\Debug/"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
- OutputFile="bin/Debug/ntpdate.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="bin/Debug/ntpdate.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntpdate\Debug/ntpdate.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\ntpdate\Release"
- IntermediateDirectory=".\ntpdate\Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntpdate\Release/ntpdate.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC)"
- PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\ntpdate\Release/ntpdate.pch"
- AssemblerListingLocation=".\ntpdate\Release/"
- ObjectFile=".\ntpdate\Release/"
- ProgramDataBaseFileName=".\ntpdate\Release/"
- WarningLevel="4"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
- OutputFile="bin/Release/ntpdate.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ProgramDatabaseFile="bin/Release/ntpdate.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntpdate\Release/ntpdate.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\ntpdate\ntpdate.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="version.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\..\ntpdate\ntpdate.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- <File
- RelativePath="..\..\..\configure"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpdate&#x0D;&#x0A;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpdate&#x0D;&#x0A;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntpdc.vcproj b/ports/winnt/vs2005/ntpdc.vcproj
deleted file mode 100644
index 8339c58ab7d9..000000000000
--- a/ports/winnt/vs2005/ntpdc.vcproj
+++ /dev/null
@@ -1,338 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="ntpdc"
- ProjectGUID="{FA6396FE-2060-4A60-BE9E-86531637FB52}"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\ntpdc\Debug"
- IntermediateDirectory=".\ntpdc\Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntpdc\Debug/ntpdc.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- PrecompiledHeaderFile=".\ntpdc\Debug/ntpdc.pch"
- AssemblerListingLocation=".\ntpdc\Debug/"
- ObjectFile=".\ntpdc\Debug/"
- ProgramDataBaseFileName=".\ntpdc\Debug/"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
- OutputFile="bin/Debug/ntpdc.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="bin/Debug/ntpdc.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntpdc\Debug/ntpdc.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\ntpdc\Release"
- IntermediateDirectory=".\ntpdc\Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntpdc\Release/ntpdc.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\ntpdc\Release/ntpdc.pch"
- AssemblerListingLocation=".\ntpdc\Release/"
- ObjectFile=".\ntpdc\Release/"
- ProgramDataBaseFileName=".\ntpdc\Release/"
- WarningLevel="4"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
- OutputFile="bin/Release/ntpdc.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ProgramDatabaseFile="bin/Release/ntpdc.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntpdc\Release/ntpdc.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\ntpdc\ntpdc-opts.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpdc\ntpdc.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpdc\ntpdc_ops.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="version.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\..\ntpdc\ntpdc.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- <File
- RelativePath="..\..\..\configure"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpdc&#x0D;&#x0A;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpdc&#x0D;&#x0A;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntpkeygen.vcproj b/ports/winnt/vs2005/ntpkeygen.vcproj
deleted file mode 100644
index b6c0ab8edb0d..000000000000
--- a/ports/winnt/vs2005/ntpkeygen.vcproj
+++ /dev/null
@@ -1,378 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="ntpkeygen"
- ProjectGUID="{AC45551A-4745-4160-839C-066FBFB255D1}"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\ntp-keygen\Debug"
- IntermediateDirectory=".\ntp-keygen\Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntp-keygen\Debug/ntpkeygen.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- PrecompiledHeaderFile=".\ntp-keygen\Debug/ntpkeygen.pch"
- AssemblerListingLocation=".\ntp-keygen\Debug/"
- ObjectFile=".\ntp-keygen\Debug/"
- ProgramDataBaseFileName=".\ntp-keygen\Debug/"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib libntp\Debug\libntp.lib"
- OutputFile="bin/Debug/ntp-keygen.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="bin/Debug/ntp-keygen.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntp-keygen\Debug/ntpkeygen.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\ntp-keygen\Release"
- IntermediateDirectory=".\ntp-keygen\Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntp-keygen\Release/ntpkeygen.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\ntp-keygen\Release/ntpkeygen.pch"
- AssemblerListingLocation=".\ntp-keygen\Release/"
- ObjectFile=".\ntp-keygen\Release/"
- ProgramDataBaseFileName=".\ntp-keygen\Release/"
- WarningLevel="4"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib libntp\Release\libntp.lib"
- OutputFile="bin/Release/ntp-keygen.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ProgramDatabaseFile="bin/Release/ntp-keygen.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntp-keygen\Release/ntpkeygen.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\libntp\getopt.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\util\ntp-keygen-opts.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\util\ntp-keygen.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\libntp\ntp_random.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\libntp\randfile.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="version.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- <File
- RelativePath="..\..\..\configure"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntp-keygen&#x0D;&#x0A;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntp-keygen&#x0D;&#x0A;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntpq.vcproj b/ports/winnt/vs2005/ntpq.vcproj
deleted file mode 100644
index ec7c1a5ae30c..000000000000
--- a/ports/winnt/vs2005/ntpq.vcproj
+++ /dev/null
@@ -1,338 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="ntpq"
- ProjectGUID="{4BD64547-230D-4C0E-9F2C-9D75B4CC0FC7}"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\ntpq\Release"
- IntermediateDirectory=".\ntpq\Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntpq\Release/ntpq.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\ntpq\Release/ntpq.pch"
- AssemblerListingLocation=".\ntpq\Release/"
- ObjectFile=".\ntpq\Release/"
- ProgramDataBaseFileName=".\ntpq\Release/"
- WarningLevel="4"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
- OutputFile="bin/Release/ntpq.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ProgramDatabaseFile="bin/Release/ntpq.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntpq\Release/ntpq.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\ntpq\Debug"
- IntermediateDirectory=".\ntpq\Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\ntpq\Debug/ntpq.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- PrecompiledHeaderFile=".\ntpq\Debug/ntpq.pch"
- AssemblerListingLocation=".\ntpq\Debug/"
- ObjectFile=".\ntpq\Debug/"
- ProgramDataBaseFileName=".\ntpq\Debug/"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
- OutputFile="bin/Debug/ntpq.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="bin/Debug/ntpq.pdb"
- SubSystem="1"
- TargetMachine="1"
- Version="0x0400"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\ntpq\Debug/ntpq.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\ntpq\ntpq-opts.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpq\ntpq-subs.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\ntpq\ntpq.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="version.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\..\ntpq\ntpq.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- <File
- RelativePath="..\..\..\configure"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpq&#x0D;&#x0A;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpq&#x0D;&#x0A;"
- Outputs="$(ProjectDir)version.c"
- />
- </FileConfiguration>
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2008/instsrv/instsrv.vcproj b/ports/winnt/vs2008/instsrv/instsrv.vcproj
deleted file mode 100644
index e3324a66ec6b..000000000000
--- a/ports/winnt/vs2008/instsrv/instsrv.vcproj
+++ /dev/null
@@ -1,258 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="instsrv"
- ProjectGUID="{C3534C4D-6DF1-498E-9904-4337878A1515}"
- RootNamespace="instsrv"
- TargetFrameworkVersion="0"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName="$(IntDir)Instsrv.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="..\..\..\..\include,..\..\include,..\..\instsrv"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
- StringPooling="true"
- MinimalRebuild="false"
- ExceptionHandling="0"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- PrecompiledHeaderFile="$(IntDir)Instsrv.pch"
- AssemblerListingLocation="$(IntDir)"
- ObjectFile="$(IntDir)"
- ProgramDataBaseFileName="$(OutDir)instsrv-vc90"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="oldnames.lib"
- OutputFile="$(OutDir)$(ProjectName).exe"
- Version="0x0400"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
- SubSystem="1"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile="$(IntDir)/$(ProjectName).bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName="$(IntDir)Instsrv.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\include,..\..\include,..\..\instsrv"
- PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;_WINDOWS;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(IntDir)Instsrv.pch"
- AssemblerListingLocation="$(IntDir)"
- ObjectFile="$(IntDir)"
- ProgramDataBaseFileName="$(OutDir)instsrv-vc90"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="oldnames.lib"
- OutputFile="$(OutDir)$(ProjectName).exe"
- Version="0x0400"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile="$(IntDir)/$(ProjectName).bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\instsrv\instsrv.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2008/libntp/libntp.vcproj b/ports/winnt/vs2008/libntp/libntp.vcproj
deleted file mode 100644
index 6bf25cbfa225..000000000000
--- a/ports/winnt/vs2008/libntp/libntp.vcproj
+++ /dev/null
@@ -1,948 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="libntp"
- ProjectGUID="{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}"
- TargetFrameworkVersion="0"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- WholeProgramOptimization="false"
- AdditionalIncludeDirectories="..\..\libntp,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
- PreprocessorDefinitions="_DEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H"
- StringPooling="true"
- MinimalRebuild="false"
- ExceptionHandling="0"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- PrecompiledHeaderFile="$(IntDir)libntp.pch"
- AssemblerListingLocation="$IntDir)"
- ObjectFile="$(IntDir)"
- ProgramDataBaseFileName="$(IntDir)"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile="$(IntDir)/$(ProjectName).bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- WholeProgramOptimization="false"
- AdditionalIncludeDirectories="..\..\libntp,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
- PreprocessorDefinitions="NDEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H"
- GeneratePreprocessedFile="0"
- StringPooling="true"
- MinimalRebuild="false"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="false"
- PrecompiledHeaderFile="$(IntDir)libntp.pch"
- AssemblerListingLocation="$(IntDir)"
- ObjectFile="$(IntDir)"
- ProgramDataBaseFileName="$(IntDir)"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile="$(IntDir)/$(ProjectName).bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\..\libntp\a_md5encrypt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\adjtime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\assertions.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\atoint.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\atolfp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\atouint.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\audio.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\authkeys.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\authreadkeys.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\authusekey.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\backtrace-emptytbl.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\backtrace.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\buffer.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\buftvtots.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\caljulian.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\caltontp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\calyearstart.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\clocktime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\clocktypes.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\condition.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\decodenetnum.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\dofptoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\dolfptoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\emalloc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\error.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\event.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\findconfig.c"
- >
- </File>
- <File
- RelativePath="..\..\libntp\getclock.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\getopt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\hextoint.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\hextolfp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\humandate.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\icom.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\inet_aton.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\inet_ntop.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\inet_pton.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\interfaceiter.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\iosignal.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\lib.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\lib_strbuf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\sntp\libopts\libopts.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\log.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\machines.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\md5.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\mktime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\modetoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\nls\msgcat.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\mstolfp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\msyslog.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\net.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\netaddr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\netof.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\netscope.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ntp_calendar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ntp_intres.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ntp_libopts.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ntp_lineedit.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ntp_random.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ntp_rfc2553.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ntp_worker.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\numtoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\numtohost.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\octtoint.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\once.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\ondestroy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\prettydate.c"
- >
- </File>
- <File
- RelativePath="..\..\libntp\randfile.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\recvbuff.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\refnumtoa.c"
- >
- </File>
- <File
- RelativePath="..\..\libntp\setpriority.c"
- >
- </File>
- <File
- RelativePath="..\..\libntp\SetSystemTime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\sha1.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\snprintf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\sockaddr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\socket.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\socktoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\socktohost.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ssl_init.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\statestr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\stdtime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\strdup.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\strerror.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\strl_obsd.c"
- >
- </File>
- <File
- RelativePath="..\..\libntp\syslog.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\syssignal.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\systime.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\task.c"
- >
- </File>
- <File
- RelativePath="..\..\libntp\termios.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\thread.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\time.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\timetoa.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\timevalops.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\uglydate.c"
- >
- </File>
- <File
- RelativePath="..\..\libntp\util_clockstuff.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\vint64ops.c"
- >
- </File>
- <File
- RelativePath="..\..\libntp\win32_io.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\win32os.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\work_fork.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\work_thread.c"
- >
- </File>
- <File
- RelativePath="..\..\..\..\libntp\ymd2yd.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\..\..\sntp\libopts\ag-char-map.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\binio.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\include\isc\buffer.h"
- >
- </File>
- <File
- RelativePath="..\..\include\clockstuff.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\condition.h"
- >
- </File>
- <File
- RelativePath="..\..\include\config.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\declcond.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\include\isc\event.h"
- >
- </File>
- <File
- RelativePath="..\..\include\gaa_compat.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\global.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\include\isc\hash.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ieee754io.h"
- >
- </File>
- <File
- RelativePath="..\..\include\netinet\in.h"
- >
- </File>
- <File
- RelativePath="..\..\include\arpa\inet.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\include\isc\interfaceiter.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\intreswork.h"
- >
- </File>
- <File
- RelativePath="..\..\include\sys\ioctl.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\iosignal.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\ipv6.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\l_stdlib.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\lib_strbuf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\include\isc\log.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\md5.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\isc\mem.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\mutex.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\net.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\isc\netaddr.h"
- >
- </File>
- <File
- RelativePath="..\..\include\netdb.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\isc\netscope.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_assert.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_calendar.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_control.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_debug.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_fp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_if.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_intres.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_io.h"
- >
- </File>
- <File
- RelativePath="..\..\include\ntp_iocompletionport.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_libopts.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_lineedit.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_lists.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_machine.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_malloc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_md5.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_net.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_proto.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_random.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_refclock.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_rfc2553.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_select.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_stdlib.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_string.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_syslog.h"
- >
- </File>
- <File
- RelativePath="..\..\include\ntp_timer.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_types.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntp_unixtime.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\ntpd.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\include\isc\ondestroy.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\platform.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\recvbuff.h"
- >
- </File>
- <File
- RelativePath="..\..\include\sys\resource.h"
- >
- </File>
- <File
- RelativePath="..\..\include\sys\signal.h"
- >
- </File>
- <File
- RelativePath="..\..\include\sys\socket.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\stat.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\stdtime.h"
- >
- </File>
- <File
- RelativePath="..\..\include\syslog.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\include\isc\task.h"
- >
- </File>
- <File
- RelativePath="..\..\include\termios.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\thread.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
- >
- </File>
- <File
- RelativePath="..\..\include\sys\time.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\timespecops.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\timetoa.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\timevalops.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\include\vint64ops.h"
- >
- </File>
- <File
- RelativePath="..\..\include\win32_io.h"
- >
- </File>
- <File
- RelativePath="..\..\include\isc\win32os.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Generated Files"
- >
- <File
- RelativePath="..\..\libntp\messages.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- >
- <File
- RelativePath="..\..\libntp\messages.mc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Message Compiler"
- CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
- Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Message Compiler"
- CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
- Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj b/ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj
deleted file mode 100644
index e306108e6f9d..000000000000
--- a/ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj
+++ /dev/null
@@ -1,256 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="loopback-ppsapi-provider"
- ProjectGUID="{1ACE209D-D56E-450B-8711-B73E4ACFC38E}"
- RootNamespace="loopbackerialppsapiprovider"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
- ConfigurationType="2"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include"
- PreprocessorDefinitions="SYS_WINNT"
- StringPooling="true"
- MinimalRebuild="false"
- ExceptionHandling="0"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderThrough="serialpps-ppsapi-provider.h"
- AssemblerListingLocation="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)loopback-ppsapi-provider-vc90"
- BrowseInformation="1"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ntpd.lib"
- OutputFile="$(OutDir)$(ProjectName).dll"
- Version="0x0400"
- LinkIncremental="1"
- AdditionalLibraryDirectories="$(OutDir)"
- GenerateManifest="false"
- ModuleDefinitionFile="..\..\ppsapi\loopback\src\loopback-ppsapi.def"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- OutputFile="$(IntDir)/$(ProjectName).bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
- ConfigurationType="2"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include"
- PreprocessorDefinitions="SYS_WINNT"
- StringPooling="true"
- MinimalRebuild="false"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderThrough="serialpps-ppsapi-provider.h"
- AssemblerListingLocation="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)loopback-ppsapi-provider-vc90"
- BrowseInformation="1"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ntpd.lib"
- OutputFile="$(OutDir)$(ProjectName).dll"
- Version="0x0400"
- LinkIncremental="1"
- AdditionalLibraryDirectories="$(OutDir)"
- GenerateManifest="false"
- ModuleDefinitionFile="..\..\ppsapi\loopback\src\loopback-ppsapi.def"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- OutputFile="$(IntDir)/$(ProjectName).bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}"
- CopyLocal="false"
- CopyLocalDependencies="false"
- CopyLocalSatelliteAssemblies="false"
- RelativePathToProject=".\libntp\libntp.vcproj"
- />
- <ProjectReference
- ReferencedProjectIdentifier="{CB61F8BF-9637-495C-9087-E8664B400CE0}"
- CopyLocal="false"
- CopyLocalDependencies="false"
- CopyLocalSatelliteAssemblies="false"
- RelativePathToProject=".\ntpd\ntpd.vcproj"
- />
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\ppsapi\loopback\src\loopback-ppsapi.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\ppsapi\loopback\src\loopback-ppsapi.h"
- >
- </File>
- <File
- RelativePath="..\..\ppsapi\loopback\src\sys\time.h"
- >
- </File>
- <File
- RelativePath="..\..\ppsapi\loopback\src\timepps.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- <File
- RelativePath=".\ReadMe.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj b/ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj
deleted file mode 100644
index 6bf76fe93cf6..000000000000
--- a/ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj
+++ /dev/null
@@ -1,335 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="ntp-keygen"
- ProjectGUID="{C88C1FBF-59D2-447F-BF57-0BCA8889028F}"
- RootNamespace="ntp-keygen"
- TargetFrameworkVersion="0"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName="$(IntDir)ntp-keygen.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="..\..\ntp-keygen,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
- StringPooling="true"
- MinimalRebuild="false"
- ExceptionHandling="0"
- BasicRuntimeChecks="3"
- SmallerTypeCheck="true"
- RuntimeLibrary="1"
- PrecompiledHeaderFile="$(IntDir)ntp-keygen.pch"
- AssemblerListingLocation="$(IntDir)"
- ObjectFile="$(IntDir)"
- ProgramDataBaseFileName="$(OutDir)ntp-keygen-vc90"