about summary refs log tree commit diff
path: root/misc/syslog.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-11-26 17:32:10 +0000
committerRoland McGrath <roland@gnu.org>1995-11-26 17:32:10 +0000
commitfbaad1494f7fa9e52c391a926d1c3a015604eb58 (patch)
treeb40487798dd252bb73ced92f96a842e598d0ef05 /misc/syslog.c
parentf44820454cd5266a807041bd5e5ae36b4f4f6d84 (diff)
downloadglibc-fbaad1494f7fa9e52c391a926d1c3a015604eb58.tar.gz
glibc-fbaad1494f7fa9e52c391a926d1c3a015604eb58.tar.xz
glibc-fbaad1494f7fa9e52c391a926d1c3a015604eb58.zip
Sun Nov 26 02:00:02 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
	* misc/syslog.c (vsyslog) [USE_IN_LIBIO]: Adapted for libio.

Thu Nov 23 02:21:55 1995  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* sysdeps/unix/sysv/linux/{mlock,munlock,mlockall,munlockall}.S:
	New files.
	* sysdeps/unix/sysv/linux/mman.h: Add prototypes for new functions
	mlock, munlock, mlockall, and munlockall.
Diffstat (limited to 'misc/syslog.c')
-rw-r--r--misc/syslog.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/syslog.c b/misc/syslog.c
index ba994eeeb8..068a89e919 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -122,8 +122,14 @@ vsyslog(pri, fmt, ap)
 	f = open_memstream (&buf, &bufsize);
 	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 (&now));
+#else
 	f->__bufp += strftime (f->__bufp, f->__put_limit - f->__bufp,
 			       "%h %e %T ", localtime (&now));
+#endif
 	msgoff = ftell (f);
 	if (LogTag == NULL)
 	  LogTag = __progname;