summaryrefslogtreecommitdiff
path: root/lib/String.cc
diff options
context:
space:
mode:
authorpixel <pixel>2002-12-23 17:04:42 +0000
committerpixel <pixel>2002-12-23 17:04:42 +0000
commit6e1a2b321bd198be5e3dead3275c5acd29967717 (patch)
tree765124494af949c299e5c53d42094e40c0be7a54 /lib/String.cc
parentb99e1506c295582615f6b011c5fcd7ff47f71bf3 (diff)
FUCK WIN32!!! *STILL* NO VSNPRINTF!!!! WHAT THE !@$!@$@!#@#!
Diffstat (limited to 'lib/String.cc')
-rw-r--r--lib/String.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/String.cc b/lib/String.cc
index c3e8c07..4d7b0ff 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -133,7 +133,11 @@ const char * String::set(const char * s, ...) {
/* This causes a warning: cannot pass objects of type `const String' through `...'
but it is not really a problem. */
va_start(ap, s);
+#ifdef HAVE_VSNPRINTF
vsnprintf(t, BUFSIZ, s, ap);
+#else
+ vsprintf(t, s, ap);
+#endif
free(str);
str = Base::strdup(t);
va_end(ap);
@@ -145,7 +149,11 @@ const char * String::set(const String & s, ...) {
va_list ap;
va_start(ap, s);
+#ifdef HAVE_VSNPRINTF
vsnprintf(t, BUFSIZ, s.str, ap);
+#else
+ vsprintf(t, s.str, ap);
+#endif
free(str);
str = Base::strdup(t);
va_end(ap);