* cygwin.din: Add vsyslog.

* fhandler.cc (fhandler_base::write): Only make file sparse if the
	seeked area is >= 128K.
	* syslog.cc (vsyslog): New function, overtaking functionality from
	syslog.
	(syslog): Just call vsyslog.
	* include/cygwin/version.h: Bump API minor.
	* include/sys/syslog.h: Add vsyslog declaration.
This commit is contained in:
Corinna Vinschen
2003-06-06 08:11:19 +00:00
parent b0ad6f2ba5
commit 54152c7e7e
6 changed files with 28 additions and 7 deletions

View File

@ -208,7 +208,7 @@ pass_handler::print_va (const char *fmt, va_list list)
*/
extern "C" void
syslog (int priority, const char *message, ...)
vsyslog (int priority, const char *message, va_list ap)
{
debug_printf ("%x %s", priority, message);
/* If the priority fails the current mask, reject */
@ -281,8 +281,6 @@ syslog (int priority, const char *message, ...)
output, then do it again to a malloc'ed string. This
is ugly, slow, but prevents core dumps :-).
*/
va_list ap;
pass_handler pass;
for (int pass_number = 0; pass_number < 2; ++pass_number)
{
@ -341,10 +339,8 @@ syslog (int priority, const char *message, ...)
}
/* Print out the variable part */
va_start (ap, message);
if (pass.print_va (message, ap) == -1)
return;
va_end (ap);
}
const char *msg_strings[1];
@ -408,6 +404,15 @@ syslog (int priority, const char *message, ...)
}
}
extern "C" void
syslog (int priority, const char *message, ...)
{
va_list ap;
va_start (ap, message);
vsyslog (priority, message, ap);
va_end (ap);
}
extern "C" void
closelog (void)
{