Fix: global logging symbols defined multiple times
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 23 Aug 2017 20:41:53 +0000 (16:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 29 Aug 2017 18:31:25 +0000 (14:31 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/logging-internal.h
logging/log.c

index 0816103047de20d935c6962a315472bf2f2a890d..ee93660fa677395d9e75f699274962ee0915c463 100644 (file)
  * corresponding BT_LOG_DEFINE_XXX macro MUST be used exactly once somewhere.
  * Otherwise build will fail with link error (undefined symbol).
  */
-#define BT_LOG_DEFINE_TAG_PREFIX const char *_bt_log_tag_prefix
-#define BT_LOG_DEFINE_GLOBAL_FORMAT bt_log_format _bt_log_global_format
-#define BT_LOG_DEFINE_GLOBAL_OUTPUT bt_log_output _bt_log_global_output
-#define BT_LOG_DEFINE_GLOBAL_OUTPUT_LEVEL int _bt_log_global_output_lvl
+#define BT_LOG_DEFINE_TAG_PREFIX BT_HIDDEN const char *_bt_log_tag_prefix
+#define BT_LOG_DEFINE_GLOBAL_FORMAT BT_HIDDEN bt_log_format _bt_log_global_format
+#define BT_LOG_DEFINE_GLOBAL_OUTPUT BT_HIDDEN bt_log_output _bt_log_global_output
+#define BT_LOG_DEFINE_GLOBAL_OUTPUT_LEVEL BT_HIDDEN int _bt_log_global_output_lvl
 
 /* Pointer to global format options. Direct modification is not allowed. Use
  * bt_log_set_mem_width() instead. Could be used to initialize bt_log_spec
index 7af09e54ed0d77ee00484b67e3aab9d9b7c7ba10..78a0361de7c5e89d3586028fbd6e49a9a03999cf 100644 (file)
@@ -685,6 +685,7 @@ static const bt_log_output out_stderr = {BT_LOG_OUT_STDERR};
        BT_LOG_DEFINE_GLOBAL_OUTPUT_LEVEL = 0;
 #endif
 
+BT_HIDDEN
 const bt_log_spec _bt_log_stderr_spec =
 {
        BT_LOG_GLOBAL_FORMAT,
This page took 0.025969 seconds and 4 git commands to generate.