introduce an NTP_SYSLOG macro.
This commit is contained in:
parent
1616498e3d
commit
37ecb8c3ab
16
external/bsd/ntp/dist/include/ntp_stdlib.h
vendored
16
external/bsd/ntp/dist/include/ntp_stdlib.h
vendored
@ -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 *);
|
||||
|
@ -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 instance *, u_int);
|
||||
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);
|
||||
|
4
external/bsd/ntp/dist/ntpd/refclock_oncore.c
vendored
4
external/bsd/ntp/dist/ntpd/refclock_oncore.c
vendored
@ -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 (struct instance *);
|
||||
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 *);
|
||||
|
Loading…
Reference in New Issue
Block a user