Module Name:    src
Committed By:   christos
Date:           Wed Oct 14 15:55:43 UTC 2015

Modified Files:
        src/external/bsd/ntp/dist/include: ntp_stdlib.h
        src/external/bsd/ntp/dist/ntpd: refclock_jupiter.c refclock_oncore.c

Log Message:
introduce an NTP_SYSLOG macro.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/include/ntp_stdlib.h
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/ntp/dist/ntpd/refclock_oncore.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/include/ntp_stdlib.h
diff -u src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.9 src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.10
--- src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.9	Fri Jul 10 10:20:29 2015
+++ src/external/bsd/ntp/dist/include/ntp_stdlib.h	Wed Oct 14 11:55:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_stdlib.h,v 1.9 2015/07/10 14:20:29 christos Exp $	*/
+/*	$NetBSD: ntp_stdlib.h,v 1.10 2015/10/14 15:55:42 christos Exp $	*/
 
 /*
  * ntp_stdlib.h - Prototypes for NTP lib.
@@ -21,18 +21,20 @@
 
 #ifdef __GNUC__
 #define NTP_PRINTF(fmt, args) __attribute__((__format__(__printf__, fmt, args)))
+#define NTP_SYSLOG(fmt, args) __attribute__((__format__(__syslog__, fmt, args)))
 #else
 #define NTP_PRINTF(fmt, args)
+#define NTP_SYSLOG(fmt, args)
 #endif
 
-extern	int	mprintf(const char *, ...) NTP_PRINTF(1, 2);
-extern	int	mfprintf(FILE *, const char *, ...) NTP_PRINTF(2, 3);
-extern	int	mvfprintf(FILE *, const char *, va_list) NTP_PRINTF(2, 0);
+extern	int	mprintf(const char *, ...) NTP_SYSLOG(1, 2);
+extern	int	mfprintf(FILE *, const char *, ...) NTP_SYSLOG(2, 3);
+extern	int	mvfprintf(FILE *, const char *, va_list) NTP_SYSLOG(2, 0);
 extern	int	mvsnprintf(char *, size_t, const char *, va_list)
-			NTP_PRINTF(3, 0);
+			NTP_SYSLOG(3, 0);
 extern	int	msnprintf(char *, size_t, const char *, ...)
-			NTP_PRINTF(3, 4);
-extern	void	msyslog(int, const char *, ...) NTP_PRINTF(2, 3);
+			NTP_SYSLOG(3, 4);
+extern	void	msyslog(int, const char *, ...) NTP_SYSLOG(2, 3);
 extern	void	init_logging	(const char *, u_int32, int);
 extern	int	change_logfile	(const char *, int);
 extern	void	setup_logfile	(const char *);

Index: src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c:1.8 src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c:1.9
--- src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c:1.8	Fri Jul 10 10:20:33 2015
+++ src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c	Wed Oct 14 11:55:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_jupiter.c,v 1.8 2015/07/10 14:20:33 christos Exp $	*/
+/*	$NetBSD: refclock_jupiter.c,v 1.9 2015/10/14 15:55:43 christos Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 2003
@@ -136,8 +136,7 @@ static	void	jupiter_canmsg	(struct insta
 static	u_short	jupiter_cksum	(u_short *, u_int);
 static	int	jupiter_config	(struct instance *);
 static	void	jupiter_debug	(struct peer *, const char *,
-				 const char *, ...)
-			__attribute__ ((format (printf, 3, 4)));
+				 const char *, ...) NTP_SYSLOG(3, 4);
 static	const char *	jupiter_parse_t	(struct instance *, u_short *);
 static	const char *	jupiter_parse_gpos	(struct instance *, u_short *);
 static	void	jupiter_platform	(struct instance *, u_int);

Index: src/external/bsd/ntp/dist/ntpd/refclock_oncore.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.11 src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.12
--- src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.11	Fri Jul 10 10:20:33 2015
+++ src/external/bsd/ntp/dist/ntpd/refclock_oncore.c	Wed Oct 14 11:55:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_oncore.c,v 1.11 2015/07/10 14:20:33 christos Exp $	*/
+/*	$NetBSD: refclock_oncore.c,v 1.12 2015/10/14 15:55:43 christos Exp $	*/
 
 /*
  * ----------------------------------------------------------------------------
@@ -380,7 +380,7 @@ static	void	oncore_compute_dH     (struc
 static	void	oncore_load_almanac   (struct instance *);
 static	void	oncore_log	      (struct instance *, int, const char *);
 static	int	oncore_log_f	      (struct instance *, int, const char *, ...)
-		NTP_PRINTF(3, 4);
+		NTP_SYSLOG(3, 4);
 static	void	oncore_print_Cb       (struct instance *, u_char *);
 /* static  void    oncore_print_array	 (u_char *, int);	*/
 static	void	oncore_print_posn     (struct instance *);

Reply via email to