1 #ifndef _PORTABLE_SNPRINTF_H_
2 #define _PORTABLE_SNPRINTF_H_
4 #define PORTABLE_SNPRINTF_VERSION_MAJOR 2
5 #define PORTABLE_SNPRINTF_VERSION_MINOR 2
10 extern int snprintf(char *, size_t, const char *, /*args*/ ...);
11 extern int vsnprintf(char *, size_t, const char *, va_list);
14 #if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
15 extern int portable_snprintf(char *str
, size_t str_m
, const char *fmt
, /*args*/ ...);
16 extern int portable_vsnprintf(char *str
, size_t str_m
, const char *fmt
, va_list ap
);
17 #define snprintf portable_snprintf
18 #define vsnprintf portable_vsnprintf
21 extern int asprintf (char **ptr
, const char *fmt
, /*args*/ ...);
22 extern int vasprintf (char **ptr
, const char *fmt
, va_list ap
);
23 extern int asnprintf (char **ptr
, size_t str_m
, const char *fmt
, /*args*/ ...);
24 extern int vasnprintf(char **ptr
, size_t str_m
, const char *fmt
, va_list ap
);