]> git.lyx.org Git - lyx.git/blobdiff - src/support/snprintf.h
another safety belt
[lyx.git] / src / support / snprintf.h
index 6ab2dcc8ea466df82050d9a3dfc1d2388a2d254d..092355169c9cac4c9b625d0fc42beca9f966f341 100644 (file)
@@ -7,11 +7,19 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-  
-#ifdef HAVE_SNPRINTF
+
+#ifndef CXX_GLOBAL_CSTD
+using std::size_t;
+using std::va_list;
+#endif
+
+#if defined(HAVE_DECL_SNPRINTF) || defined(HAVE_DECL_VSNPRINTF)
 #include <stdio.h>
-#else
+#endif
+#ifndef HAVE_DECL_SNPRINTF
 int snprintf(char *, size_t, const char *, /*args*/ ...);
+#endif
+#ifndef HAVE_DECL_VSNPRINTF
 int vsnprintf(char *, size_t, const char *, va_list);
 #endif
 
@@ -30,5 +38,5 @@ int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
 #ifdef __cplusplus
 } /* end of extern "C" */
 #endif
-  
+
 #endif