diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-02-06 22:01:30 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-02-06 22:01:30 +0000 |
commit | fb7331e34c33284b4be9d41a890b8e057a53e812 (patch) | |
tree | a5b56ddd7657084829c9325c8c5bafc43bdf099c /winsup/cygserver/bsd_log.cc | |
parent | 4b65f190450f70bd5819bb5c18e3370d75ffebde (diff) | |
download | cygnal-fb7331e34c33284b4be9d41a890b8e057a53e812.tar.gz cygnal-fb7331e34c33284b4be9d41a890b8e057a53e812.tar.bz2 cygnal-fb7331e34c33284b4be9d41a890b8e057a53e812.zip |
Remove dependency from Cygwin internal code.
* Makefile.in (CYGWIN_OBJS): Remove smallprint.o.
(cygserver.exe): Remove strfuncs.o
(strfuncs.o): Drop rule.
* bsd_log.cc (_vlog): Use snprintf/vsnprintf instead of
__small_sprintf/__small_vsprintf.
* sysv_sem.cc (seminit): Use sys_malloc instead of malloc. Use
snprintf instead of __small_sprintf.
(semunload): Free the above allocated sema_mtx names here.
Diffstat (limited to 'winsup/cygserver/bsd_log.cc')
-rw-r--r-- | winsup/cygserver/bsd_log.cc | 8 |
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) |