change of ntp_syslogmask from u_long to u_int32 in p202.
bk: 4e44c7715nAY03wRe8Je1gTwe2Halw
* Fix make distcheck with --enable-libevent-regress problem with
unwritable $srcdir.
+* Correct init_logging()'s def_syslogmask type to u_int32 following
+ change of ntp_syslogmask from u_long to u_int32 in p202.
(4.2.7p202) 2011/08/09 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1983] --without-sntp build breaks in sntp subdir.
* [Bug 1984] from 4.2.6p4-RC3: ntp/libisc fails to compile on OS X 10.7.
__attribute__((__format__(__printf__, 3, 4)));
extern void msyslog(int, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
-extern void init_logging (const char *, u_long, int);
+extern void init_logging (const char *, u_int32, int);
extern int change_logfile (const char *, int);
extern void setup_logfile (const char *);
#ifndef errno_to_str
char * syslog_fname;
char * syslog_abs_fname;
-u_int32 ntp_syslogmask = ~(u_int32)0; /* libntp default is all lit */
+/* libntp default ntp_syslogmask is all bits lit */
+#define INIT_NTP_SYSLOGMASK ~(u_int32)0
+u_int32 ntp_syslogmask = INIT_NTP_SYSLOGMASK;
extern char * progname;
void
init_logging(
const char * name,
- u_long def_syslogmask,
+ u_int32 def_syslogmask,
int is_daemon
)
{
* that ntp_syslogmask is still at its default from libntp,
* keeping in mind this function is called in forked children
* where it has already been called in the parent earlier.
+ * Forked children pass 0 for def_syslogmask.
*/
- if (~(u_long)0 == ntp_syslogmask && 0 != def_syslogmask)
+ if (INIT_NTP_SYSLOGMASK == ntp_syslogmask &&
+ 0 != def_syslogmask)
ntp_syslogmask = def_syslogmask; /* set more via logconfig */
/*
case "$ntp_use_local_libevent" in
yes)
- dnl ac_configure_args is undocumented but widely abused.
+ dnl ac_configure_args is undocumented but widely abused, as here,
+ dnl to modify the defaults of the libevent subpackage, by prefixing
+ dnl our changes to the child configure arguments already assembled.
+ dnl User-supplied contradictory choices should prevail thanks to
+ dnl "last wins".
ac_configure_args=" --disable-openssl${ac_configure_args}"
ac_configure_args=" --disable-shared${ac_configure_args}"
ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
ac_configure_args=" --disable-libevent-install${ac_configure_args}"
ac_configure_args=" --enable-silent-rules${ac_configure_args}"
+ ac_configure_args=" --enable-function-sections${ac_configure_args}"
AC_CONFIG_SUBDIRS([libevent])
;;
*)