mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-12 06:10:10 +00:00
381b76d7a3
Similarly to __vfprintf_internal and __vfscanf_internal, the internal implementation of syslog functions (__vsyslog_internal) takes a 'mode_flags' parameter used to select the format of long double parameters. This patch adds variants of the syslog functions that set 'mode_flags' to PRINTF_LDBL_USES_FLOAT128, thus enabling the correct printing of long double values on powerpc64le, when long double has IEEE binary128 format (-mabi=ieeelongdouble). Tested for powerpc64le. Reviewed-by: Florian Weimer <fweimer@redhat.com> Reviewed-by: Joseph Myers <joseph@codesourcery.com> Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
7 lines
267 B
C
7 lines
267 B
C
#define _FORTIFY_SOURCE 2
|
|
#define SYSLOG_FUNCTION __syslog_chk
|
|
#define SYSLOG_FUNCTION_PARAMS (LOG_DEBUG, 1, "%Lf\n", ld)
|
|
#define VSYSLOG_FUNCTION __vsyslog_chk
|
|
#define VSYSLOG_FUNCTION_PARAMS (LOG_DEBUG, 1, "%Lf\n", ap)
|
|
#include <test-syslog-ldbl-compat-template.c>
|