+* 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@ntp.org>
* Include (4.2.6p1-RC4) - [Bug 1474] ntp_keygen LCRYPTO after libntp.a.
* Include (4.2.6p1-RC4) - Remove arlib.
* [Bug 1414] Enable "make distcheck" success with BSD make.
(4.2.7) 2009/12/09 Released by Harlan Stenn <stenn@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@ntp.org>
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 ======================================================================
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,
"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));
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));