path: root/include/osmocom/gsm/gsm_utils.h
diff options
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-08-12 18:31:59 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-08-12 18:46:25 +0200
commit3f69ceb3a466750c0029fb25688c3daa34adf307 (patch)
tree09e63778673dfdcc4794cf5fcdab607fa11e44d1 /include/osmocom/gsm/gsm_utils.h
parent1810925dfb6115f50d6b82eede833468145349c0 (diff)
sms: Disable deprecated message
This is a workaround to make the FreeBSD8.4 and Debian6.0 target build again. The deprecated attribute doesn't have arguments.
Diffstat (limited to 'include/osmocom/gsm/gsm_utils.h')
1 files changed, 20 insertions, 6 deletions
diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h
index c111f94a..1c55dfb0 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)))
+#define OSMO_DEPRECATED(text) __attribute__((__deprecated__))
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");