#include <stdarg.h>
#include <stddef.h>
-extern int ust_safe_vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
-extern int ust_safe_snprintf(char *str, size_t n, const char *fmt, ...);
+#include "ust-helper.h"
+
+LTTNG_HIDDEN
+int ust_safe_vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
+LTTNG_HIDDEN
+int ust_safe_snprintf(char *str, size_t n, const char *fmt, ...)
+ __attribute__ ((format (printf, 3, 4)));
#endif /* UST_SNPRINTF */
#include <stdio.h>
#include <ust-share.h>
#include "ust-tid.h"
+#include "ust-snprintf.h"
enum ust_loglevel {
UST_LOGLEVEL_UNKNOWN = 0,
/* We sometimes print in the tracing path, and tracing can occur in
* signal handlers, so we must use a print method which is signal safe.
*/
-
-extern int ust_safe_snprintf(char *str, size_t n, const char *fmt, ...)
- __attribute__ ((format (printf, 3, 4)));
-
/* Can't use dynamic allocation. Limit ourselves to USTERR_MAX_LEN chars. */
/* Add end of string in case of buffer overflow. */
#define sigsafe_print_err(fmt, args...) \