Hide private share.h symbols
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 25 Feb 2021 15:23:54 +0000 (10:23 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 2 Mar 2021 16:26:02 +0000 (11:26 -0500)
The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

While we're at it, namespace the symbols that were previously part of
the ABI.

Change-Id: I75c4a65969982f2097365441f92de0d3082c8172
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/Makefile.am
include/ust-share.h
include/usterr-signal-safe.h
liblttng-ust-dl/Makefile.am
liblttng-ust/event-notifier-notification.c
snprintf/patient_write.c

index cafcb7c7cb062f4d8ca6ed807f9c0fd2758ad488..9e03290cd06e30f21c9bb7050690c062c58d436d 100644 (file)
@@ -49,7 +49,7 @@ nobase_nodist_include_HEADERS = \
 ### Global private headers ###
 ###                        ###
 
-# note: usterr-signal-safe.h, core.h and share.h need namespace cleanup.
+# note: usterr-signal-safe.h need namespace cleanup.
 
 noinst_HEADERS = \
        usterr-signal-safe.h \
index cabb26403e27c31a4f5117928772cee8b6eba9c8..b9490e4d65447b4924f59a70415e54cd7735a09a 100644 (file)
 
 #include "ust-helper.h"
 
-/* Should be hidden but would break the ABI */
-ssize_t patient_write(int fd, const void *buf, size_t count);
 LTTNG_HIDDEN
-ssize_t patient_writev(int fd, struct iovec *iov, int iovcnt);
-/* Should be hidden but would break the ABI */
-ssize_t patient_send(int fd, const void *buf, size_t count, int flags);
+ssize_t ust_patient_write(int fd, const void *buf, size_t count);
+LTTNG_HIDDEN
+ssize_t ust_patient_writev(int fd, struct iovec *iov, int iovcnt);
+LTTNG_HIDDEN
+ssize_t ust_patient_send(int fd, const void *buf, size_t count, int flags);
 
 #endif /* _LTTNG_SHARE_H */
index c3050a422f66e0408a616237f1af9609e84c4710..9ce6ad83c5aff667e80ba4f9f2cb9f7ca1614533 100644 (file)
@@ -66,7 +66,7 @@ do {                                                                  \
                ____saved_errno = errno;        /* signal-safety */     \
                ust_safe_snprintf(____buf, sizeof(____buf), fmt, ## args); \
                ____buf[sizeof(____buf) - 1] = 0;                       \
-               patient_write(STDERR_FILENO, ____buf, strlen(____buf)); \
+               ust_patient_write(STDERR_FILENO, ____buf, strlen(____buf)); \
                errno = ____saved_errno;        /* signal-safety */     \
                fflush(stderr);                                         \
        }                                                               \
index b92c509282c5543d165dc0c1620c74681274f1c6..ef6702200dc99b9d1b02f347f6b195f792f58097 100644 (file)
@@ -10,6 +10,7 @@ liblttng_ust_dl_la_SOURCES = \
 
 liblttng_ust_dl_la_LIBADD = \
        $(top_builddir)/liblttng-ust/liblttng-ust.la \
+       $(top_builddir)/snprintf/libustsnprintf.la \
        $(DL_LIBS)
 
 liblttng_ust_dl_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-dl $(AM_CFLAGS)
index 942f6136a96acbcc2ab32996dd60ba773ef67972..96b91a9ab0b84d2bd85b4531b28d18e9f1b11e33 100644 (file)
@@ -341,7 +341,7 @@ void notification_send(struct lttng_event_notifier_notification *notif,
        ust_notif.capture_buf_size = content_len;
 
        /* Send all the buffers. */
-       ret = patient_writev(notif->notification_fd, iov, iovec_count);
+       ret = ust_patient_writev(notif->notification_fd, iov, iovec_count);
        if (ret == -1) {
                if (errno == EAGAIN) {
                        record_error(event_notifier);
index 2ec00cd9ecffbf9eaff4880cedd8e8652d2f743e..5a7fed43165ed46b4782b7844d9735d6853eb8ce 100644 (file)
@@ -25,7 +25,7 @@
  * This write is patient because it restarts if it was incomplete.
  */
 
-ssize_t patient_write(int fd, const void *buf, size_t count)
+ssize_t ust_patient_write(int fd, const void *buf, size_t count)
 {
        const char *bufc = (const char *) buf;
        int result;
@@ -53,7 +53,7 @@ ssize_t patient_write(int fd, const void *buf, size_t count)
  * The `struct iovec *iov` is not `const` because we modify it to support
  * partial writes.
  */
-ssize_t patient_writev(int fd, struct iovec *iov, int iovcnt)
+ssize_t ust_patient_writev(int fd, struct iovec *iov, int iovcnt)
 {
        ssize_t written, total_written = 0;
        int curr_element_idx = 0;
@@ -95,7 +95,7 @@ ssize_t patient_writev(int fd, struct iovec *iov, int iovcnt)
        return total_written;
 }
 
-ssize_t patient_send(int fd, const void *buf, size_t count, int flags)
+ssize_t ust_patient_send(int fd, const void *buf, size_t count, int flags)
 {
        const char *bufc = (const char *) buf;
        int result;
This page took 0.028027 seconds and 4 git commands to generate.