[ntp:bk-ntp-dev-send] BitKeeper diffs

Harlan Stenn stenn at whimsy.udel.edu
Fri Feb 5 08:37:54 UTC 2010


#### ChangeSet ####
2010-02-05 05:07:21+00:00, davehart at shiny.ad.hartbrothers.com 
  Attempts to cure CID 108 CID 118 CID 119 TAINTED_SCALAR warnings.
  Broaden ylwrap workaround VPATH_HACK to all non-GNU make.

==== ChangeLog ====
2010-02-05 05:07:20+00:00, davehart at shiny.ad.hartbrothers.com +6 -0
  Attempts to cure CID 108 CID 118 CID 119 TAINTED_SCALAR warnings.
  Broaden ylwrap workaround VPATH_HACK to all non-GNU make.

--- 1.527/ChangeLog	2010-02-04 05:31:53 -05:00
+++ 1.527.1.1/ChangeLog	2010-02-05 00:07:20 -05:00
@@ -1,3 +1,5 @@
+* Attempts to cure CID 108 CID 118 CID 119 TAINTED_SCALAR warnings.
+* Broaden ylwrap workaround VPATH_HACK to all non-GNU make.
 (4.2.7p16) 2010/02/04 Released by Harlan Stenn <stenn at ntp.org>
 * Include (4.2.6p1-RC4) - [Bug 1474] ntp_keygen LCRYPTO after libntp.a.
 * Include (4.2.6p1-RC4) - Remove arlib.
@@ -74,6 +76,10 @@
 * [Bug 1414] Enable "make distcheck" success with BSD make.
 (4.2.7) 2009/12/09 Released by Harlan Stenn <stenn at ntp.org>
 * [Bug 1407] configure.ac: recent GNU Make -v does not include "version".
+---
+
+* [Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.
+
 ---
 (4.2.6p1-RC4) 2010/02/04 Released by Harlan Stenn <stenn at ntp.org>
 

==== include/ntp_debug.h ====
2010-02-05 05:07:20+00:00, davehart at shiny.ad.hartbrothers.com +2 -0
  include ntp_assert.h so source files can include one less .h

--- 1.2/include/ntp_debug.h	2009-02-06 18:50:27 -05:00
+++ 1.3/include/ntp_debug.h	2010-02-05 00:07:20 -05:00
@@ -8,6 +8,8 @@
 #ifndef NTP_DEBUG_H
 #define NTP_DEBUG_H
 
+#include "ntp_assert.h"
+
 /*
  * macros for debugging output - cut down on #ifdef pollution in the code
  */

==== m4/ntp_vpathhack.m4 ====
2010-02-05 05:07:20+00:00, davehart at shiny.ad.hartbrothers.com +25 -11
  ABroaden ylwrap workaround VPATH_HACK to all non-GNU make.

--- 1.2/m4/ntp_vpathhack.m4	2009-10-24 23:06:27 -04:00
+++ 1.3/m4/ntp_vpathhack.m4	2010-02-05 00:07:20 -05:00
@@ -1,29 +1,43 @@
 dnl ######################################################################
 dnl NTP_VPATH_HACK
 dnl
-dnl Are we using FreeBSD's make?
+dnl Compiling ntpd doesn't require YACC or Bison unless ntp_parser.y is
+dnl modified, because the output ntp_parser.[ch] are committed.  This
+dnl raises an issue with Automake-generated Makefiles on non-GNU make
+dnl used from a build tree outside the source tree.
+dnl
+dnl With GNU make, ylwrap updates $srcdir/ntp_parser.[ch] directly.
+dnl Under Sun or BSD make, ylwrap needs those files to be in the build
+dnl tree.
+dnl
+dnl With VPATH_HACK enabled, ntpd/Makefile.am includes code to symlink
+dnl from ntp_parser.[ch] in the build tree to the corresponding files
+dnl in $srcdir, and to check for ylwrap replacing the .h with a normal
+dnl file, and in that case copy the updated .h to $srcdir and restore
+dnl the symlink.
+dnl
 dnl if we are building outside the srcdir and either
-dnl   force_ntp_vpath_hack is set
+dnl   force_ntp_vpath_hack is yes
 dnl     or
-dnl   we're on freebsd and not using GNU make
-dnl then we want VPATH_HACK to be true in automake tests
+dnl   we're not using GNU make
+dnl then we want VPATH_HACK to be true for .am tests
 dnl
 AC_DEFUN([NTP_VPATH_HACK], [
-AC_MSG_CHECKING([to see if we need a VPATH hack])
+AC_MSG_CHECKING([to see if we need ylwrap VPATH hack])
 ntp_vpath_hack="no"
-case "$srcdir::$build_os::${force_ntp_vpath_hack+set}" in
- .::*::*)
-    ;;
- *::*::set)
+case "$srcdir::${force_ntp_vpath_hack-no}" in
+ .::*)
+    ;; # VPATH_HACK path is for VPATH builds only.
+ *::yes)
     ntp_vpath_hack="yes"
     ;;
- *::freebsd*::)
+ *::*)
     case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
      '')
 	ntp_vpath_hack="yes"
     esac
 esac
-AC_MSG_RESULT($ntp_vpath_hack)
+AC_MSG_RESULT([$ntp_vpath_hack])
 AM_CONDITIONAL([VPATH_HACK], [test x$ntp_vpath_hack = xyes])
 ])
 dnl ======================================================================

==== ntpd/Makefile.am ====
2010-02-05 05:07:20+00:00, davehart at shiny.ad.hartbrothers.com +3 -3
  use $(srcdir)/ prefix for ntpd-opts.[ch] in BS_DIST

--- 1.89/ntpd/Makefile.am	2010-02-01 20:31:27 -05:00
+++ 1.90/ntpd/Makefile.am	2010-02-05 00:07:20 -05:00
@@ -64,9 +64,9 @@ vphack_after:
 		)
 
 # BUILT_SOURCES which should also be in EXTRA_DIST
-B_S_DIST=		\
-	ntpd-opts.c 	\
-	ntpd-opts.h 	\
+B_S_DIST=			\
+	$(srcdir)/ntpd-opts.c 	\
+	$(srcdir)/ntpd-opts.h 	\
 	$(NULL)
 
 BUILT_SOURCES=		\

==== ntpd/ntp_scanner.c ====
2010-02-05 05:07:20+00:00, davehart at shiny.ad.hartbrothers.com +13 -6
  Attempt to cure CID 108 TAINTED_SCALAR warning.

--- 1.31/ntpd/ntp_scanner.c	2009-10-23 12:57:07 -04:00
+++ 1.32/ntpd/ntp_scanner.c	2010-02-05 00:07:20 -05:00
@@ -120,14 +120,21 @@ FGETC(
 	struct FILE_INFO *stream
 	)
 {
-	int ch = fgetc(stream->fd);
+	int ch;
+	
+	ch = fgetc(stream->fd);
 
-	++stream->col_no;
-	if (ch == '\n') {
-		stream->prev_line_col_no = stream->col_no;
-		++stream->line_no;
-		stream->col_no = 1;
+	if (EOF != ch) {
+		NTP_INSIST(CHAR_MIN <= ch && ch <= CHAR_MAX);
+
+		++stream->col_no;
+		if (ch == '\n') {
+			stream->prev_line_col_no = stream->col_no;
+			++stream->line_no;
+			stream->col_no = 1;
+		}
 	}
+
 	return ch;
 }
 

==== ntpd/work_fork.c ====
2010-02-05 05:07:20+00:00, davehart at shiny.ad.hartbrothers.com +10 -2
  Attempts to cure CID 118 CID 119 TAINTED_SCALAR warnings.

--- 1.1/ntpd/work_fork.c	2010-01-27 13:44:51 -05:00
+++ 1.2/ntpd/work_fork.c	2010-02-05 00:07:20 -05:00
@@ -172,9 +172,15 @@ receive_blocking_req_internal(
 	req = NULL;
 
 	trycount = 3;
-	do
+	do {
+		NLOG(NLOG_SYSEVENT) {
+			if (trycount < 3)
+				msyslog(LOG_NOTICE,
+					"receive_blocking_req_internal read try #%d",
+					4 - trycount);
+		}
 		rc = read(child_req_read_pipe, &hdr, sizeof(hdr));
-	while (--trycount && !rc);
+	} while (--trycount && !rc);
 
 	if (rc < 0)
 		msyslog(LOG_ERR,
@@ -186,6 +192,7 @@ receive_blocking_req_internal(
 			"receive_blocking_req_internal: short header read %d of %d\n",
 			rc, sizeof(hdr));
 	else {
+		NTP_INSIST(sizeof(hdr) < hdr.octets && hdr.octets < 4 * 1024);
 		req = emalloc(hdr.octets);
 		memcpy(req, &hdr, sizeof(*req));
 
@@ -265,6 +272,7 @@ receive_blocking_resp_internal(
 		DPRINTF(1, ("receive_blocking_resp_internal: header mismatch (0x%x)\n",
 			    hdr.magic_sig));
 	else {
+		NTP_INSIST(sizeof(hdr) < hdr.octets && hdr.octets < 16 * 1024);
 		resp = emalloc(hdr.octets);
 		memcpy(resp, &hdr, sizeof(*resp));
 

#### ChangeSet ####
2010-02-04 23:13:52+00:00, davehart at shiny.ad.hartbrothers.com 
  [Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.

==== ChangeLog ====
2010-02-04 23:13:43+00:00, davehart at shiny.ad.hartbrothers.com +4 -0
  [Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.

--- 1.496.26.37/ChangeLog	2010-02-04 02:57:32 -05:00
+++ 1.496.26.38/ChangeLog	2010-02-04 18:13:43 -05:00
@@ -1,4 +1,8 @@
 ---
+
+* [Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.
+
+---
 (4.2.6p1-RC4) 2010/02/04 Released by Harlan Stenn <stenn at ntp.org>
 
 * [Bug 1455] ntpd does not try /etc/ntp.audio as documented.

==== Makefile.am ====
2010-02-04 23:13:43+00:00, davehart at shiny.ad.hartbrothers.com +3 -3
  [Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.

--- 1.92/Makefile.am	2010-02-03 22:00:00 -05:00
+++ 1.93/Makefile.am	2010-02-04 18:13:43 -05:00
@@ -102,9 +102,9 @@ ETAGS_ARGS = Makefile.am configure.ac
 BUILT_SOURCES =				\
 	.gcc-warning			\
 	libtool				\
-	COPYRIGHT			\
-	version				\
-	version.m4			\
+	$(srcdir)/COPYRIGHT		\
+	$(srcdir)/version		\
+	$(srcdir)/version.m4		\
 	$(srcdir)/include/version.def	\
 	$(srcdir)/include/version.texi	\
 	$(NULL)

==== sntp/Makefile.am ====
2010-02-04 23:13:43+00:00, davehart at shiny.ad.hartbrothers.com +3 -3
  [Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.

--- 1.21.1.6/sntp/Makefile.am	2010-02-03 21:59:15 -05:00
+++ 1.21.1.7/sntp/Makefile.am	2010-02-04 18:13:43 -05:00
@@ -72,10 +72,10 @@ BUILT_SOURCES=				\
 	check-version.def		\
 	check-version.m4		\
 	check-version.texi		\
-	COPYRIGHT			\
+	$(srcdir)/COPYRIGHT		\
 	libtool				\
-	sntp-opts.c			\
-	sntp-opts.h			\
+	$(srcdir)/sntp-opts.c		\
+	$(srcdir)/sntp-opts.h		\
 	$(NULL)
 
 man_MANS=	$(srcdir)/sntp.1


More information about the bk-ntp-dev-send mailing list