]> git.lyx.org Git - lyx.git/blobdiff - src/support/fmt.C
lyxserver cleanup patch + andre's small patches
[lyx.git] / src / support / fmt.C
index d4da6dec8dd2018cec3144102397ec86b00da806..cc66835ba234603aa6d2bb62f8f7c9cce026a8be 100644 (file)
@@ -2,8 +2,16 @@
 #include <cstdio>
 #include <cstdarg>
 
+#ifndef HAVE_DECL_VSNPRINTF
+#include "support/snprintf.h"
+#endif
+
 #include "LString.h"
 
+#ifndef CXX_GLOBAL_CSTD
+using std::va_list;
+#endif
+
 /* This output manipulator gives the option to use Old style format
    specifications in ostreams. Note that this is done at the expense
    of typesafety, so if possible this manipulator should be avoided.
@@ -29,7 +37,7 @@ string fmt(char const * fmtstr ...)
        va_list ap;
        while (true) {
                va_start(ap, fmtstr);
-               int const r = ::vsnprintf(str, size, fmtstr, ap);
+               int const r = vsnprintf(str, size, fmtstr, ap);
                va_end(ap);
                if (r == -1) { // size is too small
                        delete [] str;