Cleanup: use LTTNG_HIDDEN in src/common
authorDavid Goulet <dgoulet@efficios.com>
Fri, 25 Jan 2013 17:11:07 +0000 (12:11 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 25 Jan 2013 17:11:07 +0000 (12:11 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/error.c
src/common/futex.c
src/common/hashtable/utils.c
src/common/runas.c
src/common/sessiond-comm/inet.c
src/common/sessiond-comm/inet6.c
src/common/sessiond-comm/sessiond-comm.c
src/common/sessiond-comm/unix.c
src/common/uri.c
src/common/utils.c

index e73cf17f6991f305e3dda64a873751dd37dd47fc..62a813a3e9808f638307d864b4a6ee686189eb51 100644 (file)
@@ -19,6 +19,7 @@
 #include <assert.h>
 
 #include <lttng/lttng-error.h>
+#include <common/common.h>
 
 #include "error.h"
 
@@ -113,7 +114,7 @@ static const char *error_string_array[] = {
  *
  * These code MUST be negative in other to treat that as an error value.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 const char *error_get_str(int32_t code)
 {
        code = -code;
index 3c18f75fc8be6067f64d2a8fa5c97f54ca130dbc..0b27a5bd7bb2b7360dbba351919da0c5a8a13c08 100644 (file)
@@ -23,7 +23,7 @@
 #include <urcu.h>
 #include <urcu/futex.h>
 
-#include <common/error.h>
+#include <common/common.h>
 
 #include "futex.h"
 
@@ -49,7 +49,7 @@
  * futex() call. If active, we set the value and wake everyone else we indicate
  * that we are gone (cleanup() case).
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 void futex_wait_update(int32_t *futex, int active)
 {
        if (active) {
@@ -66,7 +66,7 @@ void futex_wait_update(int32_t *futex, int active)
 /*
  * Prepare futex.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 void futex_nto1_prepare(int32_t *futex)
 {
        uatomic_set(futex, -1);
@@ -78,7 +78,7 @@ void futex_nto1_prepare(int32_t *futex)
 /*
  * Wait futex.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 void futex_nto1_wait(int32_t *futex)
 {
        cmm_smp_mb();
@@ -93,7 +93,7 @@ void futex_nto1_wait(int32_t *futex)
 /*
  * Wake 1 futex.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 void futex_nto1_wake(int32_t *futex)
 {
        if (caa_unlikely(uatomic_read(futex) == -1)) {
index dd599d798e03417d7e0dd26eea7d7b4db9f34c98..850f9e5db3d905be2f83da28221fc18ab6e589cb 100644 (file)
@@ -48,7 +48,7 @@
  * with 12*3 instructions on 3 integers than you can with 3 instructions on 1
  * byte), but shoehorning those bytes into integers efficiently is messy.
  */
-
+#define _GNU_SOURCE
 #include <assert.h>
 #include <stdint.h>     /* defines uint32_t etc */
 #include <stdio.h>      /* defines printf for tests */
@@ -59,6 +59,7 @@
 
 #include "utils.h"
 #include <common/compat/endian.h>    /* attempt to define endianness */
+#include <common/common.h>
 
 /*
  * My best guess at if you are big-endian or little-endian.  This may
@@ -449,7 +450,7 @@ static uint32_t __attribute__((unused)) hashlittle(const void *key,
 /*
  * Hash function for number value.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 unsigned long hash_key_ulong(void *_key, unsigned long seed)
 {
        union {
@@ -470,7 +471,7 @@ unsigned long hash_key_ulong(void *_key, unsigned long seed)
 /*
  * Hash function for number value.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 unsigned long hash_key_ulong(void *_key, unsigned long seed)
 {
        uint32_t key = (uint32_t) _key;
@@ -482,7 +483,7 @@ unsigned long hash_key_ulong(void *_key, unsigned long seed)
 /*
  * Hash function for string.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 unsigned long hash_key_str(void *key, unsigned long seed)
 {
        return hashlittle(key, strlen((char *) key), seed);
@@ -491,7 +492,7 @@ unsigned long hash_key_str(void *key, unsigned long seed)
 /*
  * Hash function compare for number value.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int hash_match_key_ulong(void *key1, void *key2)
 {
        if (key1 == key2) {
@@ -504,7 +505,7 @@ int hash_match_key_ulong(void *key1, void *key2)
 /*
  * Hash compare function for string.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int hash_match_key_str(void *key1, void *key2)
 {
        if (strcmp(key1, key2) == 0) {
index d75eb21027ce0ae2b7df768698d8c913bb4297ea..bd51cd4ed2b7b6b8c00221b19209a63dba10c698 100644 (file)
@@ -30,7 +30,7 @@
 #include <sched.h>
 #include <sys/signal.h>
 
-#include <common/error.h>
+#include <common/common.h>
 #include <common/utils.h>
 #include <common/compat/mman.h>
 #include <common/compat/clone.h>
@@ -297,7 +297,7 @@ int run_as(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid)
        }
 }
 
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid)
 {
        struct run_as_mkdir_data data;
@@ -309,7 +309,7 @@ int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid)
        return run_as(_mkdir_recursive, &data, uid, gid);
 }
 
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid)
 {
        struct run_as_mkdir_data data;
@@ -325,7 +325,7 @@ int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid)
  * Note: open_run_as is currently not working. We'd need to pass the fd
  * opened in the child to the parent.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int run_as_open(const char *path, int flags, mode_t mode, uid_t uid, gid_t gid)
 {
        struct run_as_open_data data;
index 7aee725602f1441f72093cc42ffdac7e16257117..f55482e422f173dd28921201b2815651299ad205 100644 (file)
@@ -26,8 +26,7 @@
 #include <unistd.h>
 #include <errno.h>
 
-#include <common/defaults.h>
-#include <common/error.h>
+#include <common/common.h>
 
 #include "inet.h"
 
@@ -47,7 +46,7 @@ static const struct lttcomm_proto_ops inet_ops = {
 /*
  * Creates an PF_INET socket.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_create_inet_sock(struct lttcomm_sock *sock, int type, int proto)
 {
        int val = 1, ret;
@@ -78,7 +77,7 @@ error:
 /*
  * Bind socket and return.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_bind_inet_sock(struct lttcomm_sock *sock)
 {
        int ret;
@@ -95,7 +94,7 @@ int lttcomm_bind_inet_sock(struct lttcomm_sock *sock)
 /*
  * Connect PF_INET socket.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_connect_inet_sock(struct lttcomm_sock *sock)
 {
        int ret, closeret;
@@ -125,7 +124,7 @@ error_connect:
  * Do an accept(2) on the sock and return the new lttcomm socket. The socket
  * MUST be bind(2) before.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 struct lttcomm_sock *lttcomm_accept_inet_sock(struct lttcomm_sock *sock)
 {
        int new_fd;
@@ -169,7 +168,7 @@ error:
 /*
  * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_listen_inet_sock(struct lttcomm_sock *sock, int backlog)
 {
        int ret;
@@ -200,7 +199,7 @@ end:
  *
  * Return the size of received data.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_recvmsg_inet_sock(struct lttcomm_sock *sock, void *buf,
                size_t len, int flags)
 {
@@ -243,7 +242,7 @@ ssize_t lttcomm_recvmsg_inet_sock(struct lttcomm_sock *sock, void *buf,
  *
  * Return the size of sent data.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_sendmsg_inet_sock(struct lttcomm_sock *sock, void *buf,
                size_t len, int flags)
 {
@@ -286,7 +285,7 @@ ssize_t lttcomm_sendmsg_inet_sock(struct lttcomm_sock *sock, void *buf,
 /*
  * Shutdown cleanly and close.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_close_inet_sock(struct lttcomm_sock *sock)
 {
        int ret;
index ddbb50ed43aa96dc94b6f2fe4b8201c4925b8c5c..e9558d948652e7a7c2930645bf98c9238d66c860 100644 (file)
@@ -26,8 +26,7 @@
 #include <unistd.h>
 #include <errno.h>
 
-#include <common/defaults.h>
-#include <common/error.h>
+#include <common/common.h>
 
 #include "inet6.h"
 
@@ -47,7 +46,7 @@ static const struct lttcomm_proto_ops inet6_ops = {
 /*
  * Creates an PF_INET socket.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_create_inet6_sock(struct lttcomm_sock *sock, int type, int proto)
 {
        int val = 1, ret;
@@ -78,7 +77,7 @@ error:
 /*
  * Bind socket and return.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_bind_inet6_sock(struct lttcomm_sock *sock)
 {
        int ret;
@@ -95,7 +94,7 @@ int lttcomm_bind_inet6_sock(struct lttcomm_sock *sock)
 /*
  * Connect PF_INET socket.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_connect_inet6_sock(struct lttcomm_sock *sock)
 {
        int ret, closeret;
@@ -125,7 +124,7 @@ error_connect:
  * Do an accept(2) on the sock and return the new lttcomm socket. The socket
  * MUST be bind(2) before.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 struct lttcomm_sock *lttcomm_accept_inet6_sock(struct lttcomm_sock *sock)
 {
        int new_fd;
@@ -169,7 +168,7 @@ error:
 /*
  * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_listen_inet6_sock(struct lttcomm_sock *sock, int backlog)
 {
        int ret;
@@ -200,7 +199,7 @@ end:
  *
  * Return the size of received data.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_recvmsg_inet6_sock(struct lttcomm_sock *sock, void *buf,
                size_t len, int flags)
 {
@@ -243,7 +242,7 @@ ssize_t lttcomm_recvmsg_inet6_sock(struct lttcomm_sock *sock, void *buf,
  *
  * Return the size of sent data.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_sendmsg_inet6_sock(struct lttcomm_sock *sock, void *buf,
                size_t len, int flags)
 {
@@ -286,7 +285,7 @@ ssize_t lttcomm_sendmsg_inet6_sock(struct lttcomm_sock *sock, void *buf,
 /*
  * Shutdown cleanly and close.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_close_inet6_sock(struct lttcomm_sock *sock)
 {
        int ret;
index d1324d53013a696cea0289711d29c69bf17be4a9..ef51e0a85f697ecc5b1902a16294e2c6b4dc0c17 100644 (file)
@@ -27,8 +27,7 @@
 #include <unistd.h>
 #include <errno.h>
 
-#include <common/defaults.h>
-#include <common/error.h>
+#include <common/common.h>
 
 #include "sessiond-comm.h"
 
@@ -73,7 +72,7 @@ static const char *lttcomm_readable_code[] = {
  *
  * These code MUST be negative in other to treat that as an error value.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 const char *lttcomm_get_readable_code(enum lttcomm_return_code code)
 {
        code = -code;
@@ -89,7 +88,7 @@ const char *lttcomm_get_readable_code(enum lttcomm_return_code code)
  * Create socket from an already allocated lttcomm socket structure and init
  * sockaddr in the lttcomm sock.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_create_sock(struct lttcomm_sock *sock)
 {
        int ret, _sock_type, _sock_proto, domain;
@@ -129,7 +128,7 @@ error:
 /*
  * Return allocated lttcomm socket structure.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto)
 {
        struct lttcomm_sock *sock;
@@ -154,7 +153,7 @@ end:
  * This is mostly useful when lttcomm_sock are passed between process where the
  * fd and ops have to be changed within the correct address space.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 struct lttcomm_sock *lttcomm_alloc_copy_sock(struct lttcomm_sock *src)
 {
        struct lttcomm_sock *sock;
@@ -179,7 +178,7 @@ alloc_error:
  * This is mostly useful when lttcomm_sock are passed between process where the
  * fd and ops have to be changed within the correct address space.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 void lttcomm_copy_sock(struct lttcomm_sock *dst, struct lttcomm_sock *src)
 {
        /* Safety net */
@@ -196,7 +195,7 @@ void lttcomm_copy_sock(struct lttcomm_sock *dst, struct lttcomm_sock *src)
 /*
  * Init IPv4 sockaddr structure.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_init_inet_sockaddr(struct lttcomm_sockaddr *sockaddr,
                const char *ip, unsigned int port)
 {
@@ -227,7 +226,7 @@ error:
 /*
  * Init IPv6 sockaddr structure.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr,
                const char *ip, unsigned int port)
 {
@@ -256,7 +255,7 @@ error:
 /*
  * Return allocated lttcomm socket structure from lttng URI.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 struct lttcomm_sock *lttcomm_alloc_sock_from_uri(struct lttng_uri *uri)
 {
        int ret;
@@ -309,7 +308,7 @@ alloc_error:
 /*
  * Destroy and free lttcomm socket.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 void lttcomm_destroy_sock(struct lttcomm_sock *sock)
 {
        free(sock);
index 46076e5d71e8dbac37b22ce505deb19bc47cbadc..fea56e8efa19a404bc1170627ef5300101a39f4a 100644 (file)
 #include <unistd.h>
 #include <errno.h>
 
-#include <common/defaults.h>
-#include <common/error.h>
+#include <common/common.h>
 
 #include "unix.h"
 
 /*
  * Connect to unix socket using the path name.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_connect_unix_sock(const char *pathname)
 {
        struct sockaddr_un sun;
@@ -77,7 +76,7 @@ error:
  * Do an accept(2) on the sock and return the new file descriptor. The socket
  * MUST be bind(2) before.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_accept_unix_sock(int sock)
 {
        int new_fd;
@@ -97,7 +96,7 @@ int lttcomm_accept_unix_sock(int sock)
  * Creates a AF_UNIX local socket using pathname bind the socket upon creation
  * and return the fd.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_create_unix_sock(const char *pathname)
 {
        struct sockaddr_un sun;
@@ -132,7 +131,7 @@ error:
 /*
  * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_listen_unix_sock(int sock)
 {
        int ret;
@@ -151,7 +150,7 @@ int lttcomm_listen_unix_sock(int sock)
  *
  * Return the size of received data.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len)
 {
        struct msghdr msg;
@@ -190,7 +189,7 @@ ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len)
  *
  * Return the size of sent data.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_send_unix_sock(int sock, void *buf, size_t len)
 {
        struct msghdr msg;
@@ -221,7 +220,7 @@ ssize_t lttcomm_send_unix_sock(int sock, void *buf, size_t len)
 /*
  * Shutdown cleanly a unix socket.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_close_unix_sock(int sock)
 {
        int ret, closeret;
@@ -245,7 +244,7 @@ int lttcomm_close_unix_sock(int sock)
  *
  * Returns the size of data sent, or negative error value.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd)
 {
        struct msghdr msg;
@@ -301,7 +300,7 @@ ssize_t lttcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd)
  * Expect at most "nb_fd" file descriptors. Returns the number of fd
  * actually received in nb_fd.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd)
 {
        struct iovec iov[1];
@@ -367,7 +366,7 @@ end:
  *
  * Returns the size of data sent, or negative error value.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len)
 {
        struct msghdr msg;
@@ -424,7 +423,7 @@ ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len)
  *
  * Returns the size of received data, or negative error value.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len,
                lttng_sock_cred *creds)
 {
@@ -514,7 +513,7 @@ end:
  * Set socket option to use credentials passing.
  */
 #ifdef __linux__
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_setsockopt_creds_unix_sock(int sock)
 {
        int ret, on = 1;
@@ -527,7 +526,7 @@ int lttcomm_setsockopt_creds_unix_sock(int sock)
        return ret;
 }
 #elif (defined(__FreeBSD__) || defined(__CYGWIN__))
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_setsockopt_creds_unix_sock(int sock)
 {
        return 0;
@@ -539,7 +538,7 @@ int lttcomm_setsockopt_creds_unix_sock(int sock)
 /*
  * Set socket reciving timeout.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int sec)
 {
        int ret;
@@ -560,7 +559,7 @@ int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int sec)
 /*
  * Set socket sending timeout.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int lttcomm_setsockopt_snd_timeout(int sock, unsigned int sec)
 {
        int ret;
index 5cc53525f1f09a37c1dd9ae73ebae40d15316656..740a6d5c50fc6d7fad8e027bb024d9ff9527f8c5 100644 (file)
@@ -140,7 +140,7 @@ error:
 /*
  * Build a string URL from a lttng_uri object.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size)
 {
        int ipver, ret;
@@ -177,7 +177,7 @@ int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size)
  *
  * Return 0 if equal else 1.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int uri_compare(struct lttng_uri *uri1, struct lttng_uri *uri2)
 {
        return memcmp(uri1, uri2, sizeof(struct lttng_uri));
@@ -186,7 +186,7 @@ int uri_compare(struct lttng_uri *uri1, struct lttng_uri *uri2)
 /*
  * Free URI memory.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 void uri_free(struct lttng_uri *uri)
 {
        free(uri);
@@ -195,7 +195,7 @@ void uri_free(struct lttng_uri *uri)
 /*
  * Return an allocated URI.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 struct lttng_uri *uri_create(void)
 {
        struct lttng_uri *uri;
@@ -224,7 +224,7 @@ struct lttng_uri *uri_create(void)
  * This code was originally licensed GPLv2 so we acknolwedge the Free Software
  * Foundation here for the work and to make sure we are compliant with it.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris)
 {
        int ret, i = 0;
index d8cb4a60f1574a936fab23bcf3a9535b2875a136..a18e906d7f6b303d834482b2b00ce7f93a1fcdf5 100644 (file)
@@ -36,7 +36,7 @@
  * /tmp/test1 does, the real path is returned. In normal time, realpath(3)
  * fails if the end point directory does not exist.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 char *utils_expand_path(const char *path)
 {
        const char *end_path = path;
@@ -89,7 +89,7 @@ error:
 /*
  * Create a pipe in dst.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int utils_create_pipe(int *dst)
 {
        int ret;
@@ -112,7 +112,7 @@ int utils_create_pipe(int *dst)
  * Make sure the pipe opened by this function are closed at some point. Use
  * utils_close_pipe().
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int utils_create_pipe_cloexec(int *dst)
 {
        int ret, i;
@@ -141,7 +141,7 @@ error:
 /*
  * Close both read and write side of the pipe.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 void utils_close_pipe(int *src)
 {
        int i, ret;
@@ -166,7 +166,7 @@ void utils_close_pipe(int *src)
 /*
  * Create a new string using two strings range.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 char *utils_strdupdelim(const char *begin, const char *end)
 {
        char *str;
@@ -187,7 +187,7 @@ error:
 /*
  * Set CLOEXEC flag to the give file descriptor.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int utils_set_fd_cloexec(int fd)
 {
        int ret;
@@ -210,7 +210,7 @@ end:
 /*
  * Create pid file to the given path and filename.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int utils_create_pid_file(pid_t pid, const char *filepath)
 {
        int ret;
@@ -241,7 +241,7 @@ error:
  *
  * On success, return 0 else a negative error code.
  */
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
 int utils_mkdir_recursive(const char *path, mode_t mode)
 {
        char *p, tmp[PATH_MAX];
This page took 0.03909 seconds and 4 git commands to generate.