Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygserver/bsd_log.cc')
-rw-r--r--winsup/cygserver/bsd_log.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygserver/bsd_log.cc b/winsup/cygserver/bsd_log.cc
index 583b90557..78dcdb00c 100644
--- a/winsup/cygserver/bsd_log.cc
+++ b/winsup/cygserver/bsd_log.cc
@@ -11,7 +11,6 @@ details. */
#include "woutsup.h"
#define _KERNEL 1
#define __BSD_VISIBLE 1
-#include <sys/smallprint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -53,14 +52,15 @@ _vlog (const char *file, int line, int level,
const char *fmt, va_list ap)
{
char buf[16384];
+ char *pos;
if ((level == LOG_DEBUG && log_debug != TUN_TRUE)
|| (level != LOG_DEBUG && level >= log_level))
return;
- strcpy (buf, "cygserver: ");
+ pos = stpcpy (buf, "cygserver: ");
if (file && log_debug == TUN_TRUE)
- __small_sprintf (strchr (buf, '\0'), "%s, line %d: ", file, line);
- __small_vsprintf (strchr (buf, '\0'), fmt, ap);
+ pos += snprintf (pos, 16384 - (pos - buf), "%s, line %d: ", file, line);
+ vsnprintf (pos, 16384 - (pos - buf), fmt, ap);
if (log_syslog == TUN_TRUE && level != LOG_DEBUG)
syslog (level, buf);
if (log_stderr == TUN_TRUE || level == LOG_DEBUG)