Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp/dist introduce an NTP_SYSLOG macro.



details:   https://anonhg.NetBSD.org/src/rev/18c2fef55c1d
branches:  trunk
changeset: 341013:18c2fef55c1d
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 14 15:55:42 2015 +0000

description:
introduce an NTP_SYSLOG macro.

diffstat:

 external/bsd/ntp/dist/include/ntp_stdlib.h    |  16 +++++++++-------
 external/bsd/ntp/dist/ntpd/refclock_jupiter.c |   5 ++---
 external/bsd/ntp/dist/ntpd/refclock_oncore.c  |   4 ++--
 3 files changed, 13 insertions(+), 12 deletions(-)

diffs (73 lines):

diff -r 4e77ff9e8690 -r 18c2fef55c1d external/bsd/ntp/dist/include/ntp_stdlib.h
--- a/external/bsd/ntp/dist/include/ntp_stdlib.h        Wed Oct 14 15:54:21 2015 +0000
+++ b/external/bsd/ntp/dist/include/ntp_stdlib.h        Wed Oct 14 15:55:42 2015 +0000
@@ -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 *);
diff -r 4e77ff9e8690 -r 18c2fef55c1d external/bsd/ntp/dist/ntpd/refclock_jupiter.c
--- a/external/bsd/ntp/dist/ntpd/refclock_jupiter.c     Wed Oct 14 15:54:21 2015 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_jupiter.c     Wed Oct 14 15:55:42 2015 +0000
@@ -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 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);
diff -r 4e77ff9e8690 -r 18c2fef55c1d external/bsd/ntp/dist/ntpd/refclock_oncore.c
--- a/external/bsd/ntp/dist/ntpd/refclock_oncore.c      Wed Oct 14 15:54:21 2015 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_oncore.c      Wed Oct 14 15:55:42 2015 +0000
@@ -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_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 *);



Home | Main Index | Thread Index | Old Index