[PATCH] Fix syslog(3) in non-C non-US locales
Andreas Schwab
schwab@suse.de
Thu Sep 25 13:15:00 GMT 2003
Jakub Jelinek <jakub@redhat.com> writes:
> --- libc/misc/syslog.c.jj 2003-07-15 11:04:37.000000000 -0400
> +++ libc/misc/syslog.c 2003-09-25 08:25:50.000000000 -0400
> @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)syslog.c 8.4
> #include <stdlib.h>
> #include <bits/libc-lock.h>
> #include <signal.h>
> +#include <locale.h>
>
> #if __STDC__
> #include <stdarg.h>
> @@ -187,10 +188,11 @@ vsyslog(pri, fmt, ap)
> prioff = fprintf (f, "<%d>", pri);
> (void) time (&now);
> #ifdef USE_IN_LIBIO
> - f->_IO_write_ptr += strftime (f->_IO_write_ptr,
> - f->_IO_write_end - f->_IO_write_ptr,
> - "%h %e %T ",
> - __localtime_r (&now, &now_tm));
> + f->_IO_write_ptr += strftime_l (f->_IO_write_ptr,
s/strftime_l/__strftime_l/?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Libc-hacker
mailing list