diff options
author | Kévin Redon <kredon@sysmocom.de> | 2019-06-13 13:41:00 +0200 |
---|---|---|
committer | laforge <laforge@gnumonks.org> | 2019-06-13 13:49:30 +0000 |
commit | d1e220fb67e14115512b9020b26ad74c49daefc5 (patch) | |
tree | 432e3e512b0e083a4aa828171e6d0a588219e09d /include/osmocom | |
parent | 1af2cd56248b449f4bca7e5763c27043c4a78873 (diff) |
minor: don't redefine macros
the DEBUG macro name and ARRAY_SIZE macro function are frequently
used in other projects. If these projects also use libosmocore,
the macros will be redefined. This also generates a warning message
during compilation.
Not redefining the macros removes the warning message and possible
(but unlikely) mis-redefinition.
Change-Id: I0ba91eae8eacc5542d1647601b372e417ed1713c
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/core/logging.h | 2 | ||||
-rw-r--r-- | include/osmocom/core/utils.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 295e5a85..803b4a94 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -16,7 +16,9 @@ /*! Maximum number of logging filters */ #define LOG_MAX_FILTERS 8 +#ifndef DEBUG #define DEBUG +#endif #ifdef DEBUG /*! Log a debug message through the Osmocom logging framework diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index f429ba6c..0673444b 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -14,7 +14,9 @@ * \file utils.h */ /*! Determine number of elements in an array of static size */ +#ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#endif /*! Return the maximum of two specified values */ #define OSMO_MAX(a, b) ((a) >= (b) ? (a) : (b)) /*! Return the minimum of two specified values */ |