vsprintf returns char* on sunos4
authorAndrew Tridgell <tridge@samba.org>
Wed, 13 May 1998 13:48:25 +0000 (13:48 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 13 May 1998 13:48:25 +0000 (13:48 +0000)
io.c
log.c

diff --git a/io.c b/io.c
index 587b3c7..004f4ce 100644 (file)
--- a/io.c
+++ b/io.c
@@ -472,7 +472,8 @@ void io_printf(int fd, const char *format, ...)
 #if HAVE_VSNPRINTF
        len = vsnprintf(buf, sizeof(buf)-1, format, ap);
 #else
 #if HAVE_VSNPRINTF
        len = vsnprintf(buf, sizeof(buf)-1, format, ap);
 #else
-       len = vsprintf(buf, format, ap);
+       vsprintf(buf, format, ap);
+       len = strlen(buf);
 #endif
        va_end(ap);
 
 #endif
        va_end(ap);
 
diff --git a/log.c b/log.c
index 19339c7..068b5a9 100644 (file)
--- a/log.c
+++ b/log.c
@@ -37,7 +37,8 @@ void rprintf(int fd, const char *format, ...)
 #if HAVE_VSNPRINTF
        len = vsnprintf(buf, sizeof(buf)-1, format, ap);
 #else
 #if HAVE_VSNPRINTF
        len = vsnprintf(buf, sizeof(buf)-1, format, ap);
 #else
-       len = vsprintf(buf, format, ap);
+       vsprintf(buf, format, ap);
+       len = strlen(buf);
 #endif
        va_end(ap);
 
 #endif
        va_end(ap);