make [v]snprintf() private

Fixes #189

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2022-02-01 13:37:00 +01:00
parent 728e050a05
commit 619bcc38e9
2 changed files with 6 additions and 4 deletions

View File

@@ -706,7 +706,7 @@ static int dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
return 1;
}
int xmpp_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
int strophe_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
{
if (str != NULL && count > 0)
str[0] = 0;
@@ -716,7 +716,7 @@ int xmpp_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
#ifndef HAVE_SNPRINTF
/* VARARGS3 */
int xmpp_snprintf(char *str, size_t count, const char *fmt, ...)
int strophe_snprintf(char *str, size_t count, const char *fmt, ...)
{
VA_LOCAL_DECL;
int total;

View File

@@ -22,13 +22,15 @@
#ifdef HAVE_SNPRINTF
#define xmpp_snprintf snprintf
#else
int xmpp_snprintf(char *str, size_t count, const char *fmt, ...);
#define xmpp_snprintf strophe_snprintf
int strophe_snprintf(char *str, size_t count, const char *fmt, ...);
#endif
#ifdef HAVE_VSNPRINTF
#define xmpp_vsnprintf vsnprintf
#else
int xmpp_vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
#define xmpp_vsnprintf strophe_vsnprintf
int strophe_vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
#endif
#endif /* __LIBSTROPHE_SNPRINTF_H__ */