This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has submitted this change and it was merged.
Change subject: Fix compilation warning on deprecated macro
......................................................................
Fix compilation warning on deprecated macro
A warning was printed even if the deprecation didn't apply to
libosmocore because it is still allowed to use it internally.
This patch fixes this case while still printing a warning if external
projects build using libosmocore headers.
Change-Id: I32212f20756f828af1017482a71e29e4b3adbad4
---
M configure.ac
M include/osmocom/core/defs.h
M include/osmocom/core/logging.h
3 files changed, 11 insertions(+), 2 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/configure.ac b/configure.ac
index 04d126e..340a896 100644
--- a/configure.ac
+++ b/configure.ac
@@ -235,6 +235,9 @@
CPPFLAGS+=" -fsanitize=address -fsanitize=undefined"
fi
+CFLAGS+=" -DBUILDING_LIBOSMOCORE"
+CPPFLAGS+=" -DBUILDING_LIBOSMOCORE"
+
AC_ARG_ENABLE(simd,
[AS_HELP_STRING(
[--disable-simd],
diff --git a/include/osmocom/core/defs.h b/include/osmocom/core/defs.h
index aebe925..51ac4e5 100644
--- a/include/osmocom/core/defs.h
+++ b/include/osmocom/core/defs.h
@@ -41,6 +41,12 @@
# define OSMO_DEPRECATED(text)
#endif
+#if BUILDING_LIBOSMOCORE
+# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE
+#else
+# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE OSMO_DEPRECATED("For internal use inside libosmocore only.")
+#endif
+
#undef _OSMO_HAS_ATTRIBUTE_DEPRECATED_WITH_MESSAGE
#undef _OSMO_HAS_ATTRIBUTE_DEPRECATED
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 77343e9..7af0ad2 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -332,8 +332,8 @@
void log_del_target(struct log_target *target);
/* Generate command string for VTY use */
-const char *log_vty_command_string() OSMO_DEPRECATED("For internal use inside libosmocore only.");
-const char *log_vty_command_description() OSMO_DEPRECATED("For internal use inside libosmocore only.");
+const char *log_vty_command_string() OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE;
+const char *log_vty_command_description() OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE;
struct log_target *log_target_find(int type, const char *fname);
extern struct llist_head osmo_log_target_list;
--
To view, visit https://gerrit.osmocom.org/2948
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I32212f20756f828af1017482a71e29e4b3adbad4
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>