1 #ifndef _PORTABLE_SNPRINTF_H_
2 #define _PORTABLE_SNPRINTF_H_
4 #define PORTABLE_SNPRINTF_VERSION_MAJOR 2
5 #define PORTABLE_SNPRINTF_VERSION_MINOR 1
11 #ifndef CXX_GLOBAL_CSTD
16 #if defined(HAVE_DECL_SNPRINTF) || defined(HAVE_DECL_VSNPRINTF)
19 #ifndef HAVE_DECL_SNPRINTF
20 int snprintf(char *, size_t, const char *, /*args*/ ...);
22 #ifndef HAVE_DECL_VSNPRINTF
23 int vsnprintf(char *, size_t, const char *, va_list);
26 #if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
27 int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
28 int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
29 #define snprintf portable_snprintf
30 #define vsnprintf portable_vsnprintf
33 int asprintf (char **ptr, const char *fmt, /*args*/ ...);
34 int vasprintf (char **ptr, const char *fmt, va_list ap);
35 int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
36 int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
39 } /* end of extern "C" */