This is a workaround to make the freeBSD target work again.
---
include/osmocom/gsm/gsm_utils.h | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h
index c111f94..1c55dfb 100644
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -28,6 +28,8 @@
#include <stddef.h>
#include <stdint.h>
+#include <osmocom/gsm/gsm_utils.h>
+
#define ADD_MODULO(sum, delta, modulo) do { \
if ((sum += delta) >= modulo) \
sum -= modulo; \
@@ -35,6 +37,18 @@
#define GSM_MAX_FN (26*51*2048)
+/*! \brief Set the deprecated attribute with a message.
+ *
+ * \todo Move this to a global header utility file.
+ * \todo Check for compiler version to selectivly enable the message.
+ */
+#if 0
+#define OSMO_DEPRECATED(text) __attribute__((deprecated(text)))
+#else
+#define OSMO_DEPRECATED(text) __attribute__((__deprecated__))
+#endif
+
+
struct gsm_time {
uint32_t fn; /* FN count */
uint16_t t1; /* FN div (26*51) */
@@ -79,7 +93,7 @@ int gsm_7bit_decode_n(char *decoded, size_t n, const uint8_t *user_data,
uint8_t
*/
int gsm_7bit_decode_n_ussd(char *decoded, size_t n, const uint8_t *user_data, uint8_t
length);
-/**
+/*!
* \brief Encode a text string into GSM 03.38 encoded 7 bit characters.
*
* \param result The destination buffer for the packed 7 bit sequence.
@@ -193,11 +207,11 @@ enum gsm_chan_t {
};
/* Deprectated functions */
-int gsm_7bit_decode(char *decoded, const uint8_t *user_data, uint8_t length)
__attribute__((deprecated ("Use gsm_7bit_decode_n() instead")));
-int gsm_7bit_decode_ussd(char *decoded, const uint8_t *user_data, uint8_t length)
__attribute__((deprecated ("Use gsm_7bit_decode_n_ussd() instead")));
-int gsm_7bit_encode(uint8_t *result, const char *data) __attribute__((deprecated
("Use gsm_7bit_encode_n() instead")));
-int gsm_7bit_encode_ussd(uint8_t *result, const char *data, int *octets_written)
__attribute__((deprecated ("Use gsm_7bit_encode_n_ussd() instead")));
-int gsm_7bit_encode_oct(uint8_t *result, const char *data, int *octets_written)
__attribute__((deprecated ("Use gsm_7bit_encode_n() instead")));
+int gsm_7bit_decode(char *decoded, const uint8_t *user_data, uint8_t length)
OSMO_DEPRECATED("Use gsm_7bit_decode_n() instead");
+int gsm_7bit_decode_ussd(char *decoded, const uint8_t *user_data, uint8_t length)
OSMO_DEPRECATED("Use gsm_7bit_decode_n_ussd() instead");
+int gsm_7bit_encode(uint8_t *result, const char *data) OSMO_DEPRECATED("Use
gsm_7bit_encode_n() instead");
+int gsm_7bit_encode_ussd(uint8_t *result, const char *data, int *octets_written)
OSMO_DEPRECATED("Use gsm_7bit_encode_n_ussd() instead");
+int gsm_7bit_encode_oct(uint8_t *result, const char *data, int *octets_written)
OSMO_DEPRECATED("Use gsm_7bit_encode_n() instead");
#endif
--
1.7.9.5
Show replies by date
On Mon, Aug 12, 2013 at 06:31:59PM +0200, Jacob Erlbeck wrote:
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -28,6 +28,8 @@
#include <stddef.h>
#include <stdint.h>
+#include <osmocom/gsm/gsm_utils.h>
the pragma once/ifndef/define is saving us here. We will fix this properly
today.
On 08/13/2013 07:19 AM, Holger Hans Peter Freyther wrote:
On Mon, Aug 12, 2013 at 06:31:59PM +0200, Jacob
Erlbeck wrote:
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -28,6 +28,8 @@
#include <stddef.h>
#include <stdint.h>
+#include <osmocom/gsm/gsm_utils.h>
the pragma once/ifndef/define is saving
us here. We will fix this properly
today.
Oops, this should have become osmocom/core/utils.h but then I decided to
leave the
macro definition in gsm_utils.h. I wasn't very happy with including
core/utils.h in a
header file just to get some macro definitions. I'd rather have a header
file meant
to be included by other header files that just includes some macro
definitions and/or
types and no function prototypes or variables.
Jacob