]> git.lyx.org Git - lyx.git/blobdiff - src/support/fmt.C
fix typo that put too many include paths for most people
[lyx.git] / src / support / fmt.C
index d7b4897e0829fcfa3169732659305da3aeadc2f7..1e61e3bb324d9cb2dcdaeb556966c81e4ade5642 100644 (file)
@@ -2,12 +2,16 @@
 #include <cstdio>
 #include <cstdarg>
 
-#ifndef HAVE_VSNPRINTF
+#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.
@@ -22,7 +26,7 @@
    glibc returns the needed size.
    One problem can be that vsnprintf is not implemented on all archs,
    but AFAIK it is part of the new ANSI C standard.
-   
+
    Lgb
 */
 
@@ -33,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;