diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-06-06 08:11:19 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-06-06 08:11:19 +0000 |
commit | 54152c7e7ed656c969fe4536f17f66360cd8d971 (patch) | |
tree | 458098c0f911a990200369579ba4cb845e16c5c8 /winsup/cygwin/syslog.cc | |
parent | b0ad6f2ba5308778b0ce6ab3563d349fb5f919be (diff) | |
download | cygnal-54152c7e7ed656c969fe4536f17f66360cd8d971.tar.gz cygnal-54152c7e7ed656c969fe4536f17f66360cd8d971.tar.bz2 cygnal-54152c7e7ed656c969fe4536f17f66360cd8d971.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/syslog.cc')
-rw-r--r-- | winsup/cygwin/syslog.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc index b39640524..b87ff6699 100644 --- a/winsup/cygwin/syslog.cc +++ b/winsup/cygwin/syslog.cc @@ -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]; @@ -409,6 +405,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) { ; |