From 124fc732c15ef37b7ee9db25b1e9f9b20c799623 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 7 Mar 2018 14:32:02 -0500 Subject: Add __vsyslog_internal, with same flags as __v*printf_internal. __nldbl___vsyslog_chk will ultimately want to pass PRINTF_LDBL_IS_DBL down to __vfprintf_internal *as well as* possibly setting PRINTF_FORTIFY. To make that possible, we need a __vsyslog_internal that takes the same flags as printf. The code in misc/syslog.c does also get a little simpler. Tested for powerpc and powerpc64le. --- include/sys/syslog.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'include/sys/syslog.h') diff --git a/include/sys/syslog.h b/include/sys/syslog.h index 3be3189ed1..89d3479ebc 100644 --- a/include/sys/syslog.h +++ b/include/sys/syslog.h @@ -1,11 +1,16 @@ +#ifndef _LIBC_SYS_SYSLOG_H +#define _LIBC_SYS_SYSLOG_H 1 #include - #ifndef _ISOMAC + libc_hidden_proto (syslog) -libc_hidden_proto (vsyslog) -extern void __vsyslog_chk (int __pri, int __flag, const char *__fmt, - __gnuc_va_list __ap) - __attribute__ ((__format__ (__printf__, 3, 0))); -libc_hidden_proto (__vsyslog_chk) -#endif +/* __vsyslog_internal uses the same mode_flags bits as + __v*printf_internal; see libio/libioP.h. */ +extern void __vsyslog_internal (int pri, const char *fmt, __gnuc_va_list ap, + unsigned int mode_flags) + attribute_hidden + __attribute__ ((__format__ (__printf__, 2, 0))); + +#endif /* _ISOMAC */ +#endif /* syslog.h */ -- cgit v1.2.3