[ntp:bk-ntp-dev-send] BitKeeper diffs
Harlan Stenn
stenn at deacon.udel.edu
Wed Feb 23 21:41:47 UTC 2011
#### ChangeSet ####
2011-02-23 20:34:51+00:00, davehart at shiny.ad.hartbrothers.com
Fix make distcheck failure seen on psp-deb1 by distributing
sntp/tests/data files individually by name rather than
listing "data".
==== sntp/tests/Makefile.am ====
2011-02-23 20:34:50+00:00, davehart at shiny.ad.hartbrothers.com +16 -1
Fix make distcheck failure seen on psp-deb1 by distributing
sntp/tests/data files individually by name rather than
listing "data".
--- 1.22/sntp/tests/Makefile.am 2011-02-22 18:21:11 -05:00
+++ 1.23/sntp/tests/Makefile.am 2011-02-23 15:34:50 -05:00
@@ -43,7 +43,22 @@ noinst_HEADERS = \
dist_check_SCRIPTS = test-driver
-EXTRA_DIST = data
+EXTRA_DIST = \
+ data/debug-input-lfp-bin \
+ data/debug-input-lfp-dec \
+ data/debug-input-lfp-hex \
+ data/debug-input-pkt \
+ data/key-test-ascii \
+ data/key-test-comments \
+ data/key-test-empty \
+ data/key-test-hex \
+ data/key-test-invalid-hex \
+ data/kod-expected-multiple \
+ data/kod-expected-single \
+ data/kod-test-blanks \
+ data/kod-test-correct \
+ data/kod-test-empty \
+ $(NULL)
CLEANFILES = \
data/kod-output-multiple \
#### ChangeSet ####
2011-02-23 18:57:00+00:00, davehart at shiny.ad.hartbrothers.com
[Bug 1837] Build fails on Win7 due to regedit requiring privilege.
Provide fallback definitions for GetAdaptersAddresses() for Windows
build environments lacking iphlpapi.h.
Rename file containing 1.xxxx ChangeSet revision from version to
scm-rev to avoid invoking GNU make implicit rules attempting to
compile version.c into version. Problem was with sntp/version.o
during make distcheck after fix for spurious sntp rebuilds.
==== ChangeLog ====
2011-02-23 18:56:58+00:00, davehart at shiny.ad.hartbrothers.com +7 -0
[Bug 1837] Build fails on Win7 due to regedit requiring privilege.
Provide fallback definitions for GetAdaptersAddresses() for Windows
build environments lacking iphlpapi.h.
Rename file containing 1.xxxx ChangeSet revision from version to
scm-rev to avoid invoking GNU make implicit rules attempting to
compile version.c into version. Problem was with sntp/version.o
during make distcheck after fix for spurious sntp rebuilds.
--- 1.797/ChangeLog 2011-02-22 18:21:09 -05:00
+++ 1.797.1.1/ChangeLog 2011-02-23 13:56:58 -05:00
@@ -1,4 +1,7 @@
* [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
+* [Bug 1837] Build fails on Win7 due to regedit requiring privilege.
+* Provide fallback definitions for GetAdaptersAddresses() for Windows
+ build environments lacking iphlpapi.h.
* Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
tearoff (if required) and sntp are compiled after the rest.
* Use a single set of Automake options for each package in configure.ac
@@ -7,6 +10,10 @@
sntp/version was out-of-date relative to phony target FRC.version.
* Do not cache paths to perl, test, or pkg-config, searching the PATH
at configure time is worth it to pick up tool updates.
+* Rename file containing 1.xxxx ChangeSet revision from version to
+ scm-rev to avoid invoking GNU make implicit rules attempting to
+ compile version.c into version. Problem was with sntp/version.o
+ during make distcheck after fix for spurious sntp rebuilds.
(4.2.7p132) 2011/02/22 Released by Harlan Stenn <stenn at ntp.org>
* [Bug 1832] ntpdate doesn't allow timeout > 2s.
* [Bug 1833] The checking sem_timedwait() fails without -pthread.
==== lib/isc/win32/interfaceiter.c ====
2011-02-23 18:56:58+00:00, davehart at shiny.ad.hartbrothers.com +4 -4
Provide fallback definitions for GetAdaptersAddresses() for Windows
build environments lacking iphlpapi.h.
--- 1.20/lib/isc/win32/interfaceiter.c 2010-12-12 02:11:35 -05:00
+++ 1.21/lib/isc/win32/interfaceiter.c 2011-02-23 13:56:58 -05:00
@@ -18,14 +18,14 @@
/* $Id: interfaceiter.c,v 1.13.110.2 2009/01/18 23:47:41 tbox Exp $ */
#include <config.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <iphlpapi.h>
-#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <sys/types.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <gaa_compat.h>
#include <isc/interfaceiter.h>
#include <isc/mem.h>
==== ntpd/Makefile.am ====
2011-02-23 18:56:58+00:00, davehart at shiny.ad.hartbrothers.com +7 -5
Rename cset file from sntp/version to sntp/scm-rev.
--- 1.101/ntpd/Makefile.am 2011-02-22 18:21:10 -05:00
+++ 1.102/ntpd/Makefile.am 2011-02-23 13:56:58 -05:00
@@ -267,12 +267,14 @@ check-saveconfig: $(srcdir)/complete.con
../libparse/libparse.a:
cd ../libparse && $(MAKE) check-libparse
-$(top_srcdir)/sntp/version:
- cd $(top_srcdir)/sntp && $(MAKE) version
+$(top_srcdir)/sntp/scm-rev:
+ cd $(top_srcdir)/sntp && $(MAKE) check-scm-rev
-version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/sntp/version
- env CSET=`cat $(top_srcdir)/sntp/version` $(top_builddir)/scripts/mkver ntpd
- $(COMPILE) -c version.c
+version.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/mkver ntpd
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
==== ntpdate/Makefile.am ====
2011-02-23 18:56:59+00:00, davehart at shiny.ad.hartbrothers.com +7 -5
Rename cset file from sntp/version to sntp/scm-rev.
--- 1.29/ntpdate/Makefile.am 2011-02-22 18:21:10 -05:00
+++ 1.30/ntpdate/Makefile.am 2011-02-23 13:56:59 -05:00
@@ -27,12 +27,14 @@ noinst_HEADERS= ntpdate.h
$(PROGRAMS): $(LDADD)
-$(top_srcdir)/sntp/version:
- cd $(top_srcdir)/sntp && $(MAKE) version
+$(top_srcdir)/sntp/scm-rev:
+ cd $(top_srcdir)/sntp && $(MAKE) check-scm-rev
-version.o: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/version
- env CSET=`cat $(top_srcdir)/sntp/version` $(top_builddir)/scripts/mkver ntpdate
- $(COMPILE) -c version.c
+version.c: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/mkver ntpdate
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/sntp/check-libntp.mf
==== ntpdc/Makefile.am ====
2011-02-23 18:56:59+00:00, davehart at shiny.ad.hartbrothers.com +7 -5
Rename cset file from sntp/version to sntp/scm-rev.
--- 1.59/ntpdc/Makefile.am 2011-02-22 18:21:10 -05:00
+++ 1.60/ntpdc/Makefile.am 2011-02-23 13:56:59 -05:00
@@ -69,12 +69,14 @@ check-layout: ntpdc-layout $(srcdir)/lay
$(PROGRAMS): version.o
-$(top_srcdir)/sntp/version:
- cd $(top_srcdir)/sntp && $(MAKE) version
+$(top_srcdir)/sntp/scm-rev:
+ cd $(top_srcdir)/sntp && $(MAKE) check-scm-rev
-version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/version
- env CSET=`cat $(top_srcdir)/sntp/version` $(top_builddir)/scripts/mkver ntpdc
- $(COMPILE) -c version.c
+version.c: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/mkver ntpdc
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
# I ran nl_in.c (attached, to be installed into ntpdc) through
# $(CC) -E nl_in.c | nl.pl > nl.c
==== ntpq/Makefile.am ====
2011-02-23 18:56:59+00:00, davehart at shiny.ad.hartbrothers.com +8 -6
Rename cset file from sntp/version to sntp/scm-rev.
--- 1.55/ntpq/Makefile.am 2011-02-22 18:21:10 -05:00
+++ 1.56/ntpq/Makefile.am 2011-02-23 13:56:59 -05:00
@@ -55,14 +55,16 @@ $(srcdir)/ntpq-opts.texi: $(srcdir)/ntpq
$(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def
$(top_srcdir)/scripts/check--help $@
-$(top_srcdir)/sntp/version:
- cd $(top_srcdir)/sntp && $(MAKE) version
-
$(PROGRAMS): version.o
-version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/version
- env CSET=`cat $(top_srcdir)/sntp/version` $(top_builddir)/scripts/mkver ntpq
- $(COMPILE) -c version.c
+$(top_srcdir)/sntp/scm-rev:
+ cd $(top_srcdir)/sntp && $(MAKE) check-scm-rev
+
+version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/mkver ntpq
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
==== ports/winnt/include/gaa_compat.h ====
2011-02-23 18:56:27+00:00, davehart at shiny.ad.hartbrothers.com +771 -0
BitKeeper file C:/ntp/ntp-dev-1837/ports/winnt/include/gaa_compat.h
--- /dev/null 2011-02-23 16:41:33 -05:00
+++ 1.1/ports/winnt/include/gaa_compat.h 2011-02-23 13:56:27 -05:00
@@ -0,0 +1,771 @@
+/*
+ * 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 */
+
+#endif /* !_W64 */
+#pragma warning(pop)
+#endif /* GAA_COMPAT_H */
==== ports/winnt/include/gaa_compat.h ====
2011-02-23 18:56:27+00:00, davehart at shiny.ad.hartbrothers.com +0 -0
==== ports/winnt/scripts/mkver.bat ====
2011-02-23 18:56:59+00:00, davehart at shiny.ad.hartbrothers.com +11 -7
[Bug 1837] Build fails on Win7 due to regedit requiring privilege.
Rename file containing 1.xxxx ChangeSet revision from version to
scm-rev to avoid invoking GNU make implicit rules attempting to
compile version.c into version. Problem was with sntp/version.o
during make distcheck after fix for spurious sntp rebuilds.
--- 1.13/ports/winnt/scripts/mkver.bat 2011-01-12 00:23:46 -05:00
+++ 1.14/ports/winnt/scripts/mkver.bat 2011-02-23 13:56:59 -05:00
@@ -20,6 +20,8 @@ see notes/remarks directly below this he
#
#
# 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=
@@ -135,7 +137,8 @@ REM ************************************
SET UTC_SIGN=
REM *** Now get the timezone settings from the registry
- regedit /e %TEMP%\TZ-%GENERATED_PROGRAM%.TMP "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation"
+ 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
@@ -237,13 +240,13 @@ REM ************************************
:NOBK
REM ** If that was not successful, we'll take a look into a version file, if available
- IF EXIST ..\..\..\..\sntp\version (
- IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\..\sntp\version') DO @SET CSET=%%a
+ 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\version (
- IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\sntp\version') DO @SET CSET=%%a
+ 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
@@ -263,7 +266,8 @@ REM ************************************
IF exist userset.reg del userset.reg
IF exist userset.txt del userset.txt
- regedit /E userset.reg "HKEY_CURRENT_USER\Control Panel\International"
+ 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
@@ -398,7 +402,7 @@ REM ************************************
REM Here are the error messages I know
REM *****************************************************************************************************************
:ERRNOREG
- ECHO "Error: Registry could not be read (check if regedit.exe is available and works as expected)"
+ ECHO "Error: Registry could not be read (check if reg.exe is available and works as expected)"
GOTO EOF
==== ports/winnt/vs2008/libntp/libntp.vcproj ====
2011-02-23 18:56:59+00:00, davehart at shiny.ad.hartbrothers.com +6 -2
add gaa_compat.h reference
--- 1.38/ports/winnt/vs2008/libntp/libntp.vcproj 2011-02-20 15:47:38 -05:00
+++ 1.39/ports/winnt/vs2008/libntp/libntp.vcproj 2011-02-23 13:56:59 -05:00
@@ -637,6 +637,10 @@
>
</File>
<File
+ RelativePath="..\..\include\gaa_compat.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\..\include\global.h"
>
</File>
@@ -885,7 +889,7 @@
>
</File>
<File
- RelativePath="..\..\include\sys\time.h"
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
>
</File>
<File
@@ -893,7 +897,7 @@
>
</File>
<File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ RelativePath="..\..\include\sys\time.h"
>
</File>
<File
==== sntp/Makefile.am ====
2011-02-23 18:56:59+00:00, davehart at shiny.ad.hartbrothers.com +14 -9
Rename cset file from sntp/version to sntp/scm-rev.
Fixes psp-deb1 make distcheck failure on sntp/version.o, which was
using an implicit rule to build presumed-executable "version" from
../../sntp/../../sntp/version.c.
--- 1.57/sntp/Makefile.am 2011-02-22 18:21:10 -05:00
+++ 1.58/sntp/Makefile.am 2011-02-23 13:56:59 -05:00
@@ -102,7 +102,7 @@ EXTRA_DIST = \
sntp.html \
sntp.texi \
tests_main.h \
- $(srcdir)/version \
+ $(srcdir)/scm-rev \
$(srcdir)/m4/version.m4 \
$(NULL)
@@ -111,7 +111,7 @@ BUILT_SOURCES = \
libtool \
$(srcdir)/sntp-opts.c \
$(srcdir)/sntp-opts.h \
- check-version \
+ check-scm-rev \
$(srcdir)/include/version.def \
$(srcdir)/m4/version.m4 \
$(srcdir)/include/version.texi \
@@ -147,9 +147,11 @@ $(PROGRAMS): version.o
## That is probably not possible since LDADD_LIBEVENT may be
## non-file "-levent_core".
-version.o: $(sntp_OBJECTS) ../libntp/libntp.a $(srcdir)/version
- env CSET=`cat $(srcdir)/version` $(top_builddir)/../scripts/mkver sntp
- $(COMPILE) -c version.c
+version.c: $(sntp_OBJECTS) ../libntp/libntp.a Makefile $(srcdir)/scm-rev
+ env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/mkver sntp
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
check-autogen-version.def: FRC
@cd $(srcdir) \
@@ -167,15 +169,18 @@ built-sources-only: $(BUILT_SOURCES)
@: do-nothing action to avoid default SCCS get
## HMS: The next bit is still suboptimal. We'll get an error if this is
-## a bk repo and srcdir or version is unwritable.
+## a bk repo and srcdir or scm-rev is unwritable.
-check-version:
+check-scm-rev: $(srcdir)/scm-rev
+ @: do-nothing
+
+$(srcdir)/scm-rev:
-test -r $(srcdir)/../SCCS/s.ChangeSet && \
(bk version) >/dev/null 2>&1 && \
cd $(srcdir)/.. && \
x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
- y=`cat sntp/version 2>/dev/null` || true && \
- case "$$x" in ''|$$y) ;; *) echo $$x > sntp/version ;; esac
+ y=`cat sntp/scm-rev 2>/dev/null` || true && \
+ case "$$x" in ''|$$y) ;; *) echo $$x > sntp/scm-rev ;; esac
$(srcdir)/m4/version.m4: $(srcdir)/../packageinfo.sh
TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
==== sntp/libevent/test/Makefile.am ====
2011-02-23 18:56:59+00:00, davehart at shiny.ad.hartbrothers.com +1 -1
http://sourceforge.net/tracker/?func=detail&aid=3189896&group_id=50884&atid=461324
--- 1.2/sntp/libevent/test/Makefile.am 2011-02-20 15:22:47 -05:00
+++ 1.3/sntp/libevent/test/Makefile.am 2011-02-23 13:56:59 -05:00
@@ -51,7 +51,7 @@ regress_SOURCES += regress_iocp.c
endif
regress_LDADD = @LIBEVENT_GC_SECTIONS@ ../libevent.la $(PTHREAD_LIBS) $(ZLIB_LIBS)
-regress_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat \
+regress_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat \
-I$(top_srcdir)/include -I../include $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS)
regress_LDFLAGS = $(PTHREAD_CFLAGS)
==== util/Makefile.am ====
2011-02-23 18:56:59+00:00, davehart at shiny.ad.hartbrothers.com +8 -6
Rename cset file from sntp/version to sntp/scm-rev.
--- 1.58/util/Makefile.am 2011-02-22 18:21:11 -05:00
+++ 1.59/util/Makefile.am 2011-02-23 13:56:59 -05:00
@@ -63,14 +63,16 @@ jitter_LDADD=
kern.o: kern.c
$(COMPILE) -DHAVE_TIMEX_H -c kern.c
-$(top_srcdir)/sntp/version:
- cd $(top_srcdir)/sntp && $(MAKE) version
-
$(PROGRAMS): version.o
-version.o: $(ntp_keygen_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/version
- env CSET=`cat $(top_srcdir)/sntp/version` $(top_builddir)/scripts/mkver ntp-keygen
- $(COMPILE) -c version.c
+$(top_srcdir)/sntp/scm-rev:
+ cd $(top_srcdir)/sntp && $(MAKE) check-scm-rev
+
+version.c: $(ntp_keygen_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/mkver ntp-keygen
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/sntp/check-libntp.mf
#### ChangeSet ####
2011-02-23 11:06:18+00:00, stenn at deacon.udel.edu
NTP_4_2_7P133
TAG: NTP_4_2_7P133
==== ChangeLog ====
2011-02-23 11:05:58+00:00, stenn at deacon.udel.edu +1 -0
NTP_4_2_7P133
--- 1.797/ChangeLog 2011-02-22 18:21:09 -05:00
+++ 1.798/ChangeLog 2011-02-23 06:05:58 -05:00
@@ -1,3 +1,4 @@
+(4.2.7p133) 2011/02/23 Released by Harlan Stenn <stenn at ntp.org>
* [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
* Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
tearoff (if required) and sntp are compiled after the rest.
==== clockstuff/clktest-opts.c ====
2011-02-23 11:05:58+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.58/clockstuff/clktest-opts.c 2011-02-22 03:28:28 -05:00
+++ 1.59/clockstuff/clktest-opts.c 2011-02-23 06:05:58 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (clktest-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:58 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 11:02:44 AM by AutoGen 5.11.6
* From the definitions clktest-opts.def
* and the template file options
*
@@ -325,7 +325,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
*/
static char const zPROGNAME[8] = "CLKTEST";
static char const zUsageTitle[129] =
-"clktest - test the clock line discipline - Ver. 4.2.7p132\n\
+"clktest - test the clock line discipline - Ver. 4.2.7p133\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... <tty_device>\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
==== clockstuff/clktest-opts.h ====
2011-02-23 11:05:58+00:00, stenn at deacon.udel.edu +3 -3
NTP_4_2_7P133
--- 1.58/clockstuff/clktest-opts.h 2011-02-22 03:28:28 -05:00
+++ 1.59/clockstuff/clktest-opts.h 2011-02-23 06:05:58 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (clktest-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:58 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 11:02:43 AM by AutoGen 5.11.6
* From the definitions clktest-opts.def
* and the template file options
*
@@ -63,8 +63,8 @@ typedef enum {
} teOptIndex;
#define OPTION_CT 10
-#define CLKTEST_VERSION "4.2.7p132"
-#define CLKTEST_FULL_VERSION "clktest - test the clock line discipline - Ver. 4.2.7p132"
+#define CLKTEST_VERSION "4.2.7p133"
+#define CLKTEST_FULL_VERSION "clktest - test the clock line discipline - Ver. 4.2.7p133"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
==== ntpd/ntpd-opts.c ====
2011-02-23 11:05:59+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.137/ntpd/ntpd-opts.c 2011-02-22 03:28:28 -05:00
+++ 1.138/ntpd/ntpd-opts.c 2011-02-23 06:05:59 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:01 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 10:52:34 AM by AutoGen 5.11.6
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -1006,7 +1006,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
*/
static char const zPROGNAME[5] = "NTPD";
static char const zUsageTitle[133] =
-"ntpd - NTP daemon program - Ver. 4.2.7p132\n\
+"ntpd - NTP daemon program - Ver. 4.2.7p133\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n";
#define zRcName NULL
==== ntpd/ntpd-opts.h ====
2011-02-23 11:05:59+00:00, stenn at deacon.udel.edu +3 -3
NTP_4_2_7P133
--- 1.137/ntpd/ntpd-opts.h 2011-02-22 03:28:28 -05:00
+++ 1.138/ntpd/ntpd-opts.h 2011-02-23 06:05:59 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:01 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 10:52:33 AM by AutoGen 5.11.6
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -89,8 +89,8 @@ typedef enum {
} teOptIndex;
#define OPTION_CT 36
-#define NTPD_VERSION "4.2.7p132"
-#define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.7p132"
+#define NTPD_VERSION "4.2.7p133"
+#define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.7p133"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
==== ntpd/ntpd-opts.texi ====
2011-02-23 11:06:00+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.135/ntpd/ntpd-opts.texi 2011-02-22 03:28:28 -05:00
+++ 1.136/ntpd/ntpd-opts.texi 2011-02-23 06:06:00 -05:00
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (ntpd-opts.texi)
#
-# It has been AutoGen-ed February 22, 2011 at 08:27:21 AM by AutoGen 5.11.6
+# It has been AutoGen-ed February 23, 2011 at 10:54:29 AM by AutoGen 5.11.6
# From the definitions ntpd-opts.def
# and the template file aginfo.tpl
@end ignore
@@ -64,7 +64,7 @@ This is the automatically generated usag
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.7p132
+ntpd - NTP daemon program - Ver. 4.2.7p133
USAGE: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
==== ntpd/ntpd.1 ====
2011-02-23 11:06:01+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.135/ntpd/ntpd.1 2011-02-22 03:28:29 -05:00
+++ 1.136/ntpd/ntpd.1 2011-02-23 06:06:01 -05:00
@@ -1,7 +1,7 @@
-.TH NTPD 1 2011-02-22 "( 4.2.7p132)" "Programmer's Manual"
+.TH NTPD 1 2011-02-23 "( 4.2.7p133)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpd.1)
.\"
-.\" It has been AutoGen-ed February 22, 2011 at 08:27:21 AM by AutoGen 5.11.6
+.\" It has been AutoGen-ed February 23, 2011 at 10:54:27 AM by AutoGen 5.11.6
.\" From the definitions ntpd-opts.def
.\" and the template file agman1.tpl
.\"
==== ntpdc/ntpdc-opts.c ====
2011-02-23 11:06:01+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpdc/ntpdc-opts.c 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpdc/ntpdc-opts.c 2011-02-23 06:06:01 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:29 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 10:55:11 AM by AutoGen 5.11.6
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -451,7 +451,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
*/
static char const zPROGNAME[6] = "NTPDC";
static char const zUsageTitle[129] =
-"ntpdc - vendor-specific NTP query program - Ver. 4.2.7p132\n\
+"ntpdc - vendor-specific NTP query program - Ver. 4.2.7p133\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
==== ntpdc/ntpdc-opts.h ====
2011-02-23 11:06:01+00:00, stenn at deacon.udel.edu +3 -3
NTP_4_2_7P133
--- 1.134/ntpdc/ntpdc-opts.h 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpdc/ntpdc-opts.h 2011-02-23 06:06:01 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:29 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 10:55:11 AM by AutoGen 5.11.6
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -68,8 +68,8 @@ typedef enum {
} teOptIndex;
#define OPTION_CT 15
-#define NTPDC_VERSION "4.2.7p132"
-#define NTPDC_FULL_VERSION "ntpdc - vendor-specific NTP query program - Ver. 4.2.7p132"
+#define NTPDC_VERSION "4.2.7p133"
+#define NTPDC_FULL_VERSION "ntpdc - vendor-specific NTP query program - Ver. 4.2.7p133"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
==== ntpdc/ntpdc-opts.texi ====
2011-02-23 11:06:01+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpdc/ntpdc-opts.texi 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpdc/ntpdc-opts.texi 2011-02-23 06:06:01 -05:00
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (ntpdc-opts.texi)
#
-# It has been AutoGen-ed February 22, 2011 at 08:27:39 AM by AutoGen 5.11.6
+# It has been AutoGen-ed February 23, 2011 at 10:57:54 AM by AutoGen 5.11.6
# From the definitions ntpdc-opts.def
# and the template file aginfo.tpl
@end ignore
@@ -58,7 +58,7 @@ This is the automatically generated usag
@exampleindent 0
@example
-ntpdc - vendor-specific NTP query program - Ver. 4.2.7p132
+ntpdc - vendor-specific NTP query program - Ver. 4.2.7p133
USAGE: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
==== ntpdc/ntpdc.1 ====
2011-02-23 11:06:02+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpdc/ntpdc.1 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpdc/ntpdc.1 2011-02-23 06:06:02 -05:00
@@ -1,7 +1,7 @@
-.TH NTPDC 1 2011-02-22 "( 4.2.7p132)" "Programmer's Manual"
+.TH NTPDC 1 2011-02-23 "( 4.2.7p133)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpdc.1)
.\"
-.\" It has been AutoGen-ed February 22, 2011 at 08:27:38 AM by AutoGen 5.11.6
+.\" It has been AutoGen-ed February 23, 2011 at 10:57:40 AM by AutoGen 5.11.6
.\" From the definitions ntpdc-opts.def
.\" and the template file agman1.tpl
.\"
==== ntpq/ntpq-opts.c ====
2011-02-23 11:06:02+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpq/ntpq-opts.c 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpq/ntpq-opts.c 2011-02-23 06:06:02 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:39 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 10:58:18 AM by AutoGen 5.11.6
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -428,7 +428,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
*/
static char const zPROGNAME[5] = "NTPQ";
static char const zUsageTitle[121] =
-"ntpq - standard NTP query program - Ver. 4.2.7p132\n\
+"ntpq - standard NTP query program - Ver. 4.2.7p133\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
==== ntpq/ntpq-opts.h ====
2011-02-23 11:06:02+00:00, stenn at deacon.udel.edu +3 -3
NTP_4_2_7P133
--- 1.134/ntpq/ntpq-opts.h 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpq/ntpq-opts.h 2011-02-23 06:06:02 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:39 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 10:58:18 AM by AutoGen 5.11.6
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -67,8 +67,8 @@ typedef enum {
} teOptIndex;
#define OPTION_CT 14
-#define NTPQ_VERSION "4.2.7p132"
-#define NTPQ_FULL_VERSION "ntpq - standard NTP query program - Ver. 4.2.7p132"
+#define NTPQ_VERSION "4.2.7p133"
+#define NTPQ_FULL_VERSION "ntpq - standard NTP query program - Ver. 4.2.7p133"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
==== ntpq/ntpq-opts.texi ====
2011-02-23 11:06:02+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpq/ntpq-opts.texi 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpq/ntpq-opts.texi 2011-02-23 06:06:02 -05:00
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (ntpq-opts.texi)
#
-# It has been AutoGen-ed February 22, 2011 at 08:27:51 AM by AutoGen 5.11.6
+# It has been AutoGen-ed February 23, 2011 at 11:01:29 AM by AutoGen 5.11.6
# From the definitions ntpq-opts.def
# and the template file aginfo.tpl
@end ignore
@@ -47,7 +47,7 @@ This is the automatically generated usag
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.7p132
+ntpq - standard NTP query program - Ver. 4.2.7p133
USAGE: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
==== ntpq/ntpq.1 ====
2011-02-23 11:06:02+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpq/ntpq.1 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpq/ntpq.1 2011-02-23 06:06:02 -05:00
@@ -1,7 +1,7 @@
-.TH NTPQ 1 2011-02-22 "( 4.2.7p132)" "Programmer's Manual"
+.TH NTPQ 1 2011-02-23 "( 4.2.7p133)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpq.1)
.\"
-.\" It has been AutoGen-ed February 22, 2011 at 08:27:50 AM by AutoGen 5.11.6
+.\" It has been AutoGen-ed February 23, 2011 at 11:01:28 AM by AutoGen 5.11.6
.\" From the definitions ntpq-opts.def
.\" and the template file agman1.tpl
.\"
==== ntpsnmpd/ntpsnmpd-opts.c ====
2011-02-23 11:06:03+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpsnmpd/ntpsnmpd-opts.c 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpsnmpd/ntpsnmpd-opts.c 2011-02-23 06:06:03 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:51 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 11:01:32 AM by AutoGen 5.11.6
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
@@ -255,7 +255,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
*/
static char const zPROGNAME[9] = "NTPSNMPD";
static char const zUsageTitle[105] =
-"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p132\n\
+"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p133\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
==== ntpsnmpd/ntpsnmpd-opts.h ====
2011-02-23 11:06:03+00:00, stenn at deacon.udel.edu +3 -3
NTP_4_2_7P133
--- 1.134/ntpsnmpd/ntpsnmpd-opts.h 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpsnmpd/ntpsnmpd-opts.h 2011-02-23 06:06:03 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 08:27:51 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 11:01:32 AM by AutoGen 5.11.6
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
@@ -61,8 +61,8 @@ typedef enum {
} teOptIndex;
#define OPTION_CT 8
-#define NTPSNMPD_VERSION "4.2.7p132"
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p132"
+#define NTPSNMPD_VERSION "4.2.7p133"
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p133"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
==== ntpsnmpd/ntpsnmpd-opts.texi ====
2011-02-23 11:06:03+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpsnmpd/ntpsnmpd-opts.texi 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpsnmpd/ntpsnmpd-opts.texi 2011-02-23 06:06:03 -05:00
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.texi)
#
-# It has been AutoGen-ed February 22, 2011 at 08:27:57 AM by AutoGen 5.11.6
+# It has been AutoGen-ed February 23, 2011 at 11:02:36 AM by AutoGen 5.11.6
# From the definitions ntpsnmpd-opts.def
# and the template file aginfo.tpl
@end ignore
@@ -34,7 +34,7 @@ This is the automatically generated usag
@exampleindent 0
@example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p132
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p133
USAGE: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-n no nofork Do not fork
==== ntpsnmpd/ntpsnmpd.1 ====
2011-02-23 11:06:03+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.134/ntpsnmpd/ntpsnmpd.1 2011-02-22 03:28:29 -05:00
+++ 1.135/ntpsnmpd/ntpsnmpd.1 2011-02-23 06:06:03 -05:00
@@ -1,7 +1,7 @@
-.TH NTPSNMPD 1 2011-02-22 "( 4.2.7p132)" "Programmer's Manual"
+.TH NTPSNMPD 1 2011-02-23 "( 4.2.7p133)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd.1)
.\"
-.\" It has been AutoGen-ed February 22, 2011 at 08:27:56 AM by AutoGen 5.11.6
+.\" It has been AutoGen-ed February 23, 2011 at 11:02:34 AM by AutoGen 5.11.6
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman1.tpl
.\"
==== packageinfo.sh ====
2011-02-23 11:06:03+00:00, stenn at deacon.udel.edu +1 -1
NTP_4_2_7P133
--- 1.134/packageinfo.sh 2011-02-22 03:28:29 -05:00
+++ 1.135/packageinfo.sh 2011-02-23 06:06:03 -05:00
@@ -57,7 +57,7 @@ CLTAG=NTP_4_2_0
# - Numeric values increment
# - empty 'increments' to 1
# - NEW 'increments' to empty
-point=132
+point=133
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
==== sntp/sntp-opts.c ====
2011-02-23 11:06:04+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.128/sntp/sntp-opts.c 2011-02-22 03:28:29 -05:00
+++ 1.129/sntp/sntp-opts.c 2011-02-23 06:06:04 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 08:26:48 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 10:39:26 AM by AutoGen 5.11.6
* From the definitions sntp-opts.def
* and the template file options
*
@@ -642,7 +642,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
*/
static char const zPROGNAME[5] = "SNTP";
static char const zUsageTitle[154] =
-"sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p132\n\
+"sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p133\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ hostname-or-IP ...]\n";
static char const zRcName[7] = ".ntprc";
==== sntp/sntp-opts.h ====
2011-02-23 11:06:04+00:00, stenn at deacon.udel.edu +3 -3
NTP_4_2_7P133
--- 1.128/sntp/sntp-opts.h 2011-02-22 03:28:29 -05:00
+++ 1.129/sntp/sntp-opts.h 2011-02-23 06:06:04 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 08:26:47 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 10:39:26 AM by AutoGen 5.11.6
* From the definitions sntp-opts.def
* and the template file options
*
@@ -77,8 +77,8 @@ typedef enum {
} teOptIndex;
#define OPTION_CT 24
-#define SNTP_VERSION "4.2.7p132"
-#define SNTP_FULL_VERSION "sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p132"
+#define SNTP_VERSION "4.2.7p133"
+#define SNTP_FULL_VERSION "sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p133"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
==== sntp/sntp-opts.texi ====
2011-02-23 11:06:04+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.128/sntp/sntp-opts.texi 2011-02-22 03:28:29 -05:00
+++ 1.129/sntp/sntp-opts.texi 2011-02-23 06:06:04 -05:00
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (sntp-opts.texi)
#
-# It has been AutoGen-ed February 22, 2011 at 08:27:00 AM by AutoGen 5.11.6
+# It has been AutoGen-ed February 23, 2011 at 11:04:22 AM by AutoGen 5.11.6
# From the definitions sntp-opts.def
# and the template file aginfo.tpl
@end ignore
@@ -76,7 +76,7 @@ This is the automatically generated usag
@exampleindent 0
@example
-sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p132
+sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p133
USAGE: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
==== sntp/sntp.1 ====
2011-02-23 11:06:04+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.128/sntp/sntp.1 2011-02-22 03:28:29 -05:00
+++ 1.129/sntp/sntp.1 2011-02-23 06:06:04 -05:00
@@ -1,7 +1,7 @@
-.TH SNTP 1 2011-02-22 "( 4.2.7p132)" "Programmer's Manual"
+.TH SNTP 1 2011-02-23 "( 4.2.7p133)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (sntp.1)
.\"
-.\" It has been AutoGen-ed February 22, 2011 at 08:26:59 AM by AutoGen 5.11.6
+.\" It has been AutoGen-ed February 23, 2011 at 11:04:22 AM by AutoGen 5.11.6
.\" From the definitions sntp-opts.def
.\" and the template file agman1.tpl
.\"
==== sntp/sntp.html ====
2011-02-23 11:06:04+00:00, stenn at deacon.udel.edu +1 -1
NTP_4_2_7P133
--- 1.128/sntp/sntp.html 2011-02-22 03:28:29 -05:00
+++ 1.129/sntp/sntp.html 2011-02-23 06:06:04 -05:00
@@ -150,7 +150,7 @@ Up: <a rel="up" accesskey="u" href=
<p><a name="index-sntp-usage-3"></a>
This is the automatically generated usage text for sntp:
-<pre class="example">sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p132
+<pre class="example">sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p133
USAGE: sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
==== util/ntp-keygen-opts.c ====
2011-02-23 11:06:04+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.132/util/ntp-keygen-opts.c 2011-02-22 03:28:29 -05:00
+++ 1.133/util/ntp-keygen-opts.c 2011-02-23 06:06:04 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 08:28:00 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 11:02:48 AM by AutoGen 5.11.6
* From the definitions ntp-keygen-opts.def
* and the template file options
*
@@ -757,7 +757,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
*/
static char const zPROGNAME[11] = "NTP_KEYGEN";
static char const zUsageTitle[116] =
-"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p132\n\
+"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p133\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
==== util/ntp-keygen-opts.h ====
2011-02-23 11:06:05+00:00, stenn at deacon.udel.edu +3 -3
NTP_4_2_7P133
--- 1.132/util/ntp-keygen-opts.h 2011-02-22 03:28:29 -05:00
+++ 1.133/util/ntp-keygen-opts.h 2011-02-23 06:06:05 -05:00
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 08:28:00 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed February 23, 2011 at 11:02:48 AM by AutoGen 5.11.6
* From the definitions ntp-keygen-opts.def
* and the template file options
*
@@ -77,8 +77,8 @@ typedef enum {
} teOptIndex;
#define OPTION_CT 24
-#define NTP_KEYGEN_VERSION "4.2.7p132"
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p132"
+#define NTP_KEYGEN_VERSION "4.2.7p133"
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p133"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
==== util/ntp-keygen-opts.texi ====
2011-02-23 11:06:05+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.135/util/ntp-keygen-opts.texi 2011-02-22 03:28:29 -05:00
+++ 1.136/util/ntp-keygen-opts.texi 2011-02-23 06:06:05 -05:00
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.texi)
#
-# It has been AutoGen-ed February 22, 2011 at 08:28:10 AM by AutoGen 5.11.6
+# It has been AutoGen-ed February 23, 2011 at 11:03:27 AM by AutoGen 5.11.6
# From the definitions ntp-keygen-opts.def
# and the template file aginfo.tpl
@end ignore
@@ -51,7 +51,7 @@ This is the automatically generated usag
@exampleindent 0
@example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p132
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p133
USAGE: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-c Str certificate certificate scheme
==== util/ntp-keygen.1 ====
2011-02-23 11:06:05+00:00, stenn at deacon.udel.edu +2 -2
NTP_4_2_7P133
--- 1.135/util/ntp-keygen.1 2011-02-22 03:28:29 -05:00
+++ 1.136/util/ntp-keygen.1 2011-02-23 06:06:05 -05:00
@@ -1,7 +1,7 @@
-.TH NTP-KEYGEN 1 2011-02-22 "(ntp 4.2.7p132)" "Programmer's Manual"
+.TH NTP-KEYGEN 1 2011-02-23 "(ntp 4.2.7p133)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen.1)
.\"
-.\" It has been AutoGen-ed February 22, 2011 at 08:28:09 AM by AutoGen 5.11.6
+.\" It has been AutoGen-ed February 23, 2011 at 11:03:25 AM by AutoGen 5.11.6
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman1.tpl
.\"
#### ChangeSet ####
2011-02-19 03:29:55+00:00, davehart at shiny.ad.hartbrothers.com
Add INC_ALIGNED_PTR() macro to align pointers like malloc().
==== ChangeLog ====
2011-02-19 03:29:54+00:00, davehart at shiny.ad.hartbrothers.com +1 -0
Add INC_ALIGNED_PTR() macro to align pointers like malloc().
--- 1.784.1.20/ChangeLog 2011-02-12 06:07:20 -05:00
+++ 1.784.1.21/ChangeLog 2011-02-18 22:29:54 -05:00
@@ -1,3 +1,4 @@
+* Add INC_ALIGNED_PTR() macro to align pointers like malloc().
(4.2.7p130) 2011/02/12 Released by Harlan Stenn <stenn at ntp.org>
* [Bug 1811] Update the download location in WHERE-TO-START.
(4.2.7p129) 2011/02/09 Released by Harlan Stenn <stenn at ntp.org>
==== include/ntp_types.h ====
2011-02-19 03:29:54+00:00, davehart at shiny.ad.hartbrothers.com +26 -0
Add INC_ALIGNED_PTR() macro to align pointers like malloc().
--- 1.22/include/ntp_types.h 2011-01-04 01:27:56 -05:00
+++ 1.23/include/ntp_types.h 2011-02-18 22:29:54 -05:00
@@ -186,6 +186,32 @@ typedef u_int32 keyid_t; /* cryptographi
typedef u_int32 tstamp_t; /* NTP seconds timestamp */
/*
+ * Cloning malloc()'s behavior of always returning pointers suitably
+ * aligned for the strictest alignment requirement of any type is not
+ * easy to do portably, as the maximum alignment required is not
+ * exposed. Use the size of a union of the types known to represent the
+ * strictest alignment on some platform.
+ */
+typedef union max_alignment_tag {
+ double d;
+} max_alignment;
+
+#define MAXALIGN sizeof(max_alignment)
+#define ALIGN_UNITS(sz) (((sz) + MAXALIGN - 1) / MAXALIGN)
+#define ALIGNED_SIZE(sz) (MAXALIGN * ALIGN_UNITS(sz))
+#define INC_ALIGNED_PTR(b, m) ((void *)aligned_ptr((void *)(b), m))
+
+static inline
+max_alignment *
+aligned_ptr(
+ max_alignment * base,
+ size_t minsize
+ )
+{
+ return base + ALIGN_UNITS((minsize < 1) ? 1 : minsize);
+}
+
+/*
* 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
==== ntpd/ntp_crypto.c ====
2011-02-19 03:29:54+00:00, davehart at shiny.ad.hartbrothers.com +16 -9
strdup() -> estrdup()
--- 1.153/ntpd/ntp_crypto.c 2011-01-19 02:06:47 -05:00
+++ 1.154/ntpd/ntp_crypto.c 2011-02-18 22:29:54 -05:00
@@ -3781,11 +3781,12 @@ crypto_setup(void)
filename);
exit (-1);
}
- hostval.ptr = strdup(cinfo->subject);
+ hostval.ptr = estrdup(cinfo->subject);
hostval.vallen = htonl(strlen(cinfo->subject));
sys_hostname = hostval.ptr;
- if ((ptr = strchr(sys_hostname, (int)'@')) != NULL)
- sys_groupname = strdup(++ptr);
+ ptr = (u_char *)strchr(sys_hostname, '@');
+ if (ptr != NULL)
+ sys_groupname = estrdup((char *)++ptr);
if (ident_filename != NULL)
strcpy(hostname, ident_filename);
@@ -3855,30 +3856,36 @@ crypto_config(
* Set host name (host).
*/
case CRYPTO_CONF_PRIV:
- host_filename = strdup(cp);
+ if (NULL != host_filename)
+ free(host_filename);
+ host_filename = estrdup(cp);
break;
/*
* Set group name (ident).
*/
case CRYPTO_CONF_IDENT:
- ident_filename = strdup(cp);
+ if (NULL != ident_filename)
+ free(ident_filename);
+ ident_filename = estrdup(cp);
break;
/*
* Set private key password (pw).
*/
case CRYPTO_CONF_PW:
- passwd = emalloc(strlen(cp) + 1);
- strcpy(passwd, cp);
+ if (NULL != passwd)
+ free(passwd);
+ passwd = estrdup(cp);
break;
/*
* Set random seed file name (randfile).
*/
case CRYPTO_CONF_RAND:
- rand_file = emalloc(strlen(cp) + 1);
- strcpy(rand_file, cp);
+ if (NULL != rand_file)
+ free(rand_file);
+ rand_file = estrdup(cp);
break;
/*
==== ntpd/ntp_proto.c ====
2011-02-19 03:29:54+00:00, davehart at shiny.ad.hartbrothers.com +11 -10
Add INC_ALIGNED_PTR() macro to align pointers like malloc().
--- 1.318/ntpd/ntp_proto.c 2011-01-22 01:15:28 -05:00
+++ 1.319/ntpd/ntp_proto.c 2011-02-18 22:29:54 -05:00
@@ -2387,17 +2387,17 @@ clock_select(void)
for (peer = peer_list; peer != NULL; peer = peer->p_link)
nlist++;
endpoint_size = nlist * 2 * sizeof(struct endpoint);
- synch_size = nlist * sizeof(double);
- error_size = nlist * sizeof(double);
- peers_size = nlist * sizeof(struct peer *);
- indx_size = nlist * 2 * sizeof(int);
+ synch_size = ALIGNED_SIZE(nlist * sizeof(double));
+ error_size = ALIGNED_SIZE(nlist * sizeof(double));
+ peers_size = ALIGNED_SIZE(nlist * sizeof(struct peer *));
+ indx_size = ALIGNED_SIZE(nlist * 2 * sizeof(int));
octets = endpoint_size + indx_size + peers_size + synch_size +
error_size;
endpoint = erealloc(endpoint, octets);
- synch = (double *)((char *)endpoint + endpoint_size);
- error = (double *)((char *)synch + synch_size);
- peers = (struct peer **)((char *)error + error_size);
- indx = (int *)((char *)peers + peers_size);
+ synch = INC_ALIGNED_PTR(endpoint, endpoint_size);
+ error = INC_ALIGNED_PTR(synch, synch_size);
+ peers = INC_ALIGNED_PTR(error, error_size);
+ indx = INC_ALIGNED_PTR(peers, peers_size);
/*
* Initially, we populate the island with all the rifraff peers
@@ -3499,7 +3499,7 @@ pool_xmit(
free(pool->addrs);
pool->addrs = NULL;
}
- memset(&hints, 0, sizeof(hints));
+ ZERO(hints);
hints.ai_family = AF(&pool->srcadr);
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
@@ -3521,7 +3521,8 @@ pool_xmit(
}
do {
- rmtadr = (sockaddr_u *)pool->ai->ai_addr;
+ /* copy_addrinfo_list ai_addr points to a sockaddr_u */
+ rmtadr = (sockaddr_u *)(void *)pool->ai->ai_addr;
pool->ai = pool->ai->ai_next;
p = findexistingpeer(rmtadr, NULL, NULL, MODE_CLIENT);
} while (p != NULL && pool->ai != NULL);
==== ntpd/refclock_as2201.c ====
2011-02-19 03:29:54+00:00, davehart at shiny.ad.hartbrothers.com +2 -2
Use memcpy() after bounds check instead of strcpy().
Correct a different bounds check that was off by one.
--- 1.13/ntpd/refclock_as2201.c 2011-01-05 02:35:09 -05:00
+++ 1.14/ntpd/refclock_as2201.c 2011-02-18 22:29:54 -05:00
@@ -332,11 +332,11 @@ as2201_receive(
*/
if ((int)(up->lastptr - up->stats + pp->lencode) > SMAX - 2)
return;
- (void)strcpy(up->lastptr, pp->a_lastcode);
+ memcpy(up->lastptr, pp->a_lastcode, pp->lencode);
up->lastptr += pp->lencode;
if (pp->sloppyclockflag & CLK_FLAG4) {
octets = strlen(stat_command[up->index]);
- if ((int)(up->lastptr - up->stats + octets) > SMAX - 2)
+ if ((int)(up->lastptr - up->stats + 1 + octets) > SMAX - 2)
return;
*up->lastptr++ = ' ';
memcpy(up->lastptr, stat_command[up->index], octets);
==== sntp/tests_main.h ====
2011-02-19 03:29:54+00:00, davehart at shiny.ad.hartbrothers.com +3 -2
#include config.h before all others, system before lib/app.
--- 1.6/sntp/tests_main.h 2010-10-30 23:24:28 -04:00
+++ 1.7/sntp/tests_main.h 2011-02-18 22:29:54 -05:00
@@ -1,12 +1,13 @@
#ifndef TESTS_MAIN_H
#define TESTS_MAIN_H
-#include <gtest/gtest.h>
-
#include "config.h"
#include <string>
#include <vector>
+
+#include <gtest/gtest.h>
+
class ntptest : public ::testing::Test {
public:
More information about the bk-ntp-dev-send
mailing list