From: Michael Jeanson Date: Thu, 25 Feb 2021 19:01:03 +0000 (-0500) Subject: Hide private ust-snprintf.h symbols X-Git-Tag: v2.13.0-rc1~358 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;ds=sidebyside;h=622671fbcb30bbf4948137613f29924931d7bcef;p=lttng-ust.git Hide private ust-snprintf.h symbols The major SONAME bump to '1' gives us the opportunity to hide private symbols that should never have been visible. Change-Id: I893e18b4fe4e9c1dc45e30fed8a10f28a367cc7c Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/ust-snprintf.h b/include/ust-snprintf.h index 37c2218c..19248f38 100644 --- a/include/ust-snprintf.h +++ b/include/ust-snprintf.h @@ -10,7 +10,12 @@ #include #include -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 */ diff --git a/include/usterr-signal-safe.h b/include/usterr-signal-safe.h index 9ce6ad83..3d675687 100644 --- a/include/usterr-signal-safe.h +++ b/include/usterr-signal-safe.h @@ -15,6 +15,7 @@ #include #include #include "ust-tid.h" +#include "ust-snprintf.h" enum ust_loglevel { UST_LOGLEVEL_UNKNOWN = 0, @@ -51,10 +52,6 @@ static inline int ust_debug(void) /* 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...) \