Fix: libcompat is now part of libcommon babeltrace_trace_merging
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 24 Apr 2019 13:12:57 +0000 (09:12 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 1 May 2019 21:48:52 +0000 (17:48 -0400)
18710679a8ac57fda5dbd26cf16bb180dce9e286 includes libcompat into libcommon.

This also make the compat_(e)poll_* symbols visible through liblttng-ctl.
Same for fcntl compat.

Mark them as hidden.

These symbols are not visible on the 2.10/2.11 branches.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
src/bin/lttng-relayd/Makefile.am
src/bin/lttng-sessiond/Makefile.am
src/common/compat/compat-epoll.c
src/common/compat/compat-fcntl.c
src/common/compat/compat-poll.c
src/common/compat/fcntl.h
src/common/compat/poll.h
tests/unit/Makefile.am

index cf56ea4953c2377469aa6412015ef5e71e16ead4..6320375b4adb6392e29e2eddbd335f6d1fb0e6e3 100644 (file)
@@ -29,7 +29,6 @@ lttng_relayd_LDADD = -lurcu-common -lurcu \
                $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
                $(top_builddir)/src/common/hashtable/libhashtable.la \
                $(top_builddir)/src/common/libcommon.la \
-               $(top_builddir)/src/common/compat/libcompat.la \
                $(top_builddir)/src/common/index/libindex.la \
                $(top_builddir)/src/common/health/libhealth.la \
                $(top_builddir)/src/common/config/libconfig.la \
index 9800c4b2ccc065beb851b09d6a9c60d2658108c9..6bfa5f389a6d5ef1e9f25e3cc6778eaa474c522e 100644 (file)
@@ -68,7 +68,6 @@ lttng_sessiond_LDADD = -lurcu-common -lurcu $(KMOD_LIBS) \
                $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
                $(top_builddir)/src/common/hashtable/libhashtable.la \
                $(top_builddir)/src/common/libcommon.la \
-               $(top_builddir)/src/common/compat/libcompat.la \
                $(top_builddir)/src/common/relayd/librelayd.la \
                $(top_builddir)/src/common/testpoint/libtestpoint.la \
                $(top_builddir)/src/common/health/libhealth.la \
index 6a781c7ae04034f321f974c244df6e43e01e58b3..cf92c63b405044ad767cc579c04297fb50362f5a 100644 (file)
@@ -67,6 +67,7 @@ error:
 /*
  * Create epoll set and allocate returned events structure.
  */
+LTTNG_HIDDEN
 int compat_epoll_create(struct lttng_poll_event *events, int size, int flags)
 {
        int ret;
@@ -119,6 +120,7 @@ error:
 /*
  * Add a fd to the epoll set with requesting events.
  */
+LTTNG_HIDDEN
 int compat_epoll_add(struct lttng_poll_event *events, int fd, uint32_t req_events)
 {
        int ret;
@@ -166,6 +168,7 @@ error:
 /*
  * Remove a fd from the epoll set.
  */
+LTTNG_HIDDEN
 int compat_epoll_del(struct lttng_poll_event *events, int fd)
 {
        int ret;
@@ -200,6 +203,7 @@ error:
 /*
  * Set an fd's events.
  */
+LTTNG_HIDDEN
 int compat_epoll_mod(struct lttng_poll_event *events, int fd, uint32_t req_events)
 {
        int ret;
@@ -241,6 +245,7 @@ error:
 /*
  * Wait on epoll set. This is a blocking call of timeout value.
  */
+LTTNG_HIDDEN
 int compat_epoll_wait(struct lttng_poll_event *events, int timeout)
 {
        int ret;
@@ -293,6 +298,7 @@ error:
 /*
  * Setup poll set maximum size.
  */
+LTTNG_HIDDEN
 int compat_epoll_set_max_size(void)
 {
        int ret, fd, retval = 0;
index c6c6b4e994962d84c353eaad21bb2013dfca9b4d..a0f4a199732ed40f6f52e50d7381e8d52566cd72 100644 (file)
@@ -21,6 +21,7 @@
 
 #ifdef __linux__
 
+LTTNG_HIDDEN
 int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
                unsigned int flags)
 {
index b45b39dc6bdbd45daf69944316b1d663f1744867..11149f4d46f04b9b55cee2f87c41dd530138ab56 100644 (file)
@@ -102,6 +102,7 @@ error:
 /*
  * Create pollfd data structure.
  */
+LTTNG_HIDDEN
 int compat_poll_create(struct lttng_poll_event *events, int size)
 {
        struct compat_poll_event_array *current, *wait;
@@ -200,6 +201,7 @@ error:
 /*
  * Modify an fd's events..
  */
+LTTNG_HIDDEN
 int compat_poll_mod(struct lttng_poll_event *events, int fd,
                uint32_t req_events)
 {
@@ -236,6 +238,7 @@ error:
 /*
  * Remove a fd from the pollfd structure.
  */
+LTTNG_HIDDEN
 int compat_poll_del(struct lttng_poll_event *events, int fd)
 {
        int new_size, i, count = 0, ret;
@@ -281,6 +284,7 @@ error:
 /*
  * Wait on poll() with timeout. Blocking call.
  */
+LTTNG_HIDDEN
 int compat_poll_wait(struct lttng_poll_event *events, int timeout)
 {
        int ret;
@@ -328,6 +332,7 @@ error:
 /*
  * Setup poll set maximum size.
  */
+LTTNG_HIDDEN
 int compat_poll_set_max_size(void)
 {
        int ret, retval = 0;
index 1efcea79724918f9beb6f926b2940d1827b4122d..edb19906d65f635ec866b54b89c4617ac54952cb 100644 (file)
@@ -21,6 +21,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <sys/types.h>
+#include <common/macros.h>
 
 #if (defined(__FreeBSD__) || defined(__CYGWIN__))
 typedef long long off64_t;
@@ -31,7 +32,8 @@ typedef off64_t loff_t;
 #endif
 
 #ifdef __linux__
-extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
+LTTNG_HIDDEN
+int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
                unsigned int flags);
 #define lttng_sync_file_range(fd, offset, nbytes, flags) \
        compat_sync_file_range(fd, offset, nbytes, flags)
index d4bd87f589213fbace764f2f2d3d152551d5ab5a..5379c806aa8e1e3947f98c7b058ca32ad7113cbc 100644 (file)
@@ -122,7 +122,8 @@ static inline int __lttng_epoll_get_prev_fd(struct lttng_poll_event *events,
 /*
  * Create the epoll set. No memory allocation is done here.
  */
-extern int compat_epoll_create(struct lttng_poll_event *events,
+LTTNG_HIDDEN
+int compat_epoll_create(struct lttng_poll_event *events,
                int size, int flags);
 #define lttng_poll_create(events, size, flags) \
        compat_epoll_create(events, size, flags)
@@ -152,14 +153,16 @@ static inline int compat_glibc_epoll_create(int size, int flags)
  * Wait on epoll set with the number of fd registered to the lttng_poll_event
  * data structure (events).
  */
-extern int compat_epoll_wait(struct lttng_poll_event *events, int timeout);
+LTTNG_HIDDEN
+int compat_epoll_wait(struct lttng_poll_event *events, int timeout);
 #define lttng_poll_wait(events, timeout) \
        compat_epoll_wait(events, timeout)
 
 /*
  * Add a fd to the epoll set and resize the epoll_event structure if needed.
  */
-extern int compat_epoll_add(struct lttng_poll_event *events,
+LTTNG_HIDDEN
+int compat_epoll_add(struct lttng_poll_event *events,
                int fd, uint32_t req_events);
 #define lttng_poll_add(events, fd, req_events) \
        compat_epoll_add(events, fd, req_events)
@@ -167,14 +170,16 @@ extern int compat_epoll_add(struct lttng_poll_event *events,
 /*
  * Remove a fd from the epoll set.
  */
-extern int compat_epoll_del(struct lttng_poll_event *events, int fd);
+LTTNG_HIDDEN
+int compat_epoll_del(struct lttng_poll_event *events, int fd);
 #define lttng_poll_del(events, fd) \
        compat_epoll_del(events, fd)
 
 /*
  * Modify an fd's events in the epoll set.
  */
-extern int compat_epoll_mod(struct lttng_poll_event *events,
+LTTNG_HIDDEN
+int compat_epoll_mod(struct lttng_poll_event *events,
                int fd, uint32_t req_events);
 #define lttng_poll_mod(events, fd, req_events) \
        compat_epoll_add(events, fd, req_events)
@@ -182,7 +187,8 @@ extern int compat_epoll_mod(struct lttng_poll_event *events,
 /*
  * Set up the poll set limits variable poll_max_size
  */
-extern int compat_epoll_set_max_size(void);
+LTTNG_HIDDEN
+int compat_epoll_set_max_size(void);
 #define lttng_poll_set_max_size() \
        compat_epoll_set_max_size()
 
@@ -326,7 +332,8 @@ static inline int __lttng_poll_get_prev_fd(struct lttng_poll_event *events,
 /*
  * Create a pollfd structure of size 'size'.
  */
-extern int compat_poll_create(struct lttng_poll_event *events, int size);
+LTTNG_HIDDEN
+int compat_poll_create(struct lttng_poll_event *events, int size);
 #define lttng_poll_create(events, size, flags) \
        compat_poll_create(events, size)
 
@@ -334,14 +341,16 @@ extern int compat_poll_create(struct lttng_poll_event *events, int size);
  * Wait on poll(2) event with nb_fd registered to the lttng_poll_event data
  * structure.
  */
-extern int compat_poll_wait(struct lttng_poll_event *events, int timeout);
+LTTNG_HIDDEN
+int compat_poll_wait(struct lttng_poll_event *events, int timeout);
 #define lttng_poll_wait(events, timeout) \
        compat_poll_wait(events, timeout)
 
 /*
  * Add the fd to the pollfd structure. Resize if needed.
  */
-extern int compat_poll_add(struct lttng_poll_event *events,
+LTTNG_HIDDEN
+int compat_poll_add(struct lttng_poll_event *events,
                int fd, uint32_t req_events);
 #define lttng_poll_add(events, fd, req_events) \
        compat_poll_add(events, fd, req_events)
@@ -351,14 +360,16 @@ extern int compat_poll_add(struct lttng_poll_event *events,
  * pollfd, data is copied from the old pollfd to the new and, finally, the old
  * one is freed().
  */
-extern int compat_poll_del(struct lttng_poll_event *events, int fd);
+LTTNG_HIDDEN
+int compat_poll_del(struct lttng_poll_event *events, int fd);
 #define lttng_poll_del(events, fd) \
        compat_poll_del(events, fd)
 
 /*
  * Modify an fd's events in the epoll set.
  */
-extern int compat_poll_mod(struct lttng_poll_event *events,
+LTTNG_HIDDEN
+int compat_poll_mod(struct lttng_poll_event *events,
                int fd, uint32_t req_events);
 #define lttng_poll_mod(events, fd, req_events) \
        compat_poll_add(events, fd, req_events)
@@ -366,7 +377,8 @@ extern int compat_poll_mod(struct lttng_poll_event *events,
 /*
  * Set up the poll set limits variable poll_max_size
  */
-extern int compat_poll_set_max_size(void);
+LTTNG_HIDDEN
+int compat_poll_set_max_size(void);
 #define lttng_poll_set_max_size() \
        compat_poll_set_max_size()
 
index 5f485f007b7d3bf4ca874d4482f73c7faa5ef3b5..bd25d6a3fd8e261a5186e31d136634e9695b182e 100644 (file)
@@ -70,9 +70,7 @@ SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT)
         $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \
         $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \
         $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
-        $(top_builddir)/src/common/libcommon.la \
         $(top_builddir)/src/common/testpoint/libtestpoint.la \
-        $(top_builddir)/src/common/compat/libcompat.la \
         $(top_builddir)/src/common/health/libhealth.la \
         $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
 
@@ -93,7 +91,6 @@ test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
                     $(KMOD_LIBS) \
                     $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
                     $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
-                    $(top_builddir)/src/common/compat/libcompat.la \
                     $(top_builddir)/src/common/testpoint/libtestpoint.la \
                     $(top_builddir)/src/common/health/libhealth.la \
                     $(top_builddir)/src/common/config/libconfig.la \
@@ -114,7 +111,6 @@ test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
                      $(KMOD_LIBS) \
                      $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
                      $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
-                     $(top_builddir)/src/common/compat/libcompat.la \
                      $(top_builddir)/src/common/testpoint/libtestpoint.la \
                      $(top_builddir)/src/common/health/libhealth.la \
                      $(top_builddir)/src/common/config/libconfig.la \
This page took 0.031254 seconds and 5 git commands to generate.