Add _c versions of functions that otherwise return static buffers

We have a habit of returning static buffers from some functions,
particularly when generating some kind of string values.  This is
convenient in terms of memory management, but it comes at the expense
of not being thread-safe, and not allowing for two calls of the
related function within one printf() statement.

Let's introduce _c suffix versions of those functions where the
caller passes in a talloc context from which the output buffer shall
be allocated.

Change-Id: I8481c19b68ff67cfa22abb93c405ebcfcb0ab19b
diff --git a/include/osmocom/gsm/apn.h b/include/osmocom/gsm/apn.h
index 7899bb2..ab5f493 100644
--- a/include/osmocom/gsm/apn.h
+++ b/include/osmocom/gsm/apn.h
@@ -12,6 +12,7 @@
 
 char *osmo_apn_qualify(unsigned int mcc, unsigned int mnc, const char *ni);
 char *osmo_apn_qualify_buf(char *buf, size_t buf_len, unsigned int mcc, unsigned int mnc, const char *ni);
+char *osmo_apn_qualify_c(const void *ctx, unsigned int mcc, unsigned int mnc, const char *ni);
 
 /* Compose a string of the form '<ni>.mnc001.mcc002.gprs\0', returned in a
  * static buffer. */
@@ -19,6 +20,7 @@
 				 const char *ni, int have_3dig_mnc);
 char *osmo_apn_qualify_from_imsi_buf(char *buf, size_t buf_len, const char *imsi,
 				     const char *ni, int have_3dig_mnc);
+char *osmo_apn_qualify_from_imsi_c(const void *ctx, const char *imsi, const char *ni, int have_3dig_mnc);
 
 int osmo_apn_from_str(uint8_t *apn_enc, size_t max_apn_enc_len, const char *str);
 char *osmo_apn_to_str(char *out_str, const uint8_t *apn_enc, size_t apn_enc_len);