Add _buf() functions to bypass static string buffers

We have a number of static buffers in use in libosmo*.  This means
the related functions are not usable in a thread-safe way.  While
we so far don't have many multi-threaded programs in the osmocom
universe, the static buffers also prevent us from calling the same
e.g. string-ify function twice within a single printf() call.

Let's make sure there's an alternative function in all those cases,
where the user can pass in a caller-allocated buffer + size, and make
the 'classic' function with the static buffer a wrapper around that
_buf() variant.

Change-Id: Ibf85f79e93244f53b2684ff6f1095c5b41203e05
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 3fadc5a..a69fb60 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -9,6 +9,7 @@
 abis_nm_chcomb4pchan;
 abis_nm_debugp_foh;
 abis_nm_dump_foh;
+abis_nm_dump_foh_buf;
 abis_nm_event_type_name;
 abis_nm_nack_cause_name;
 abis_nm_nack_name;
@@ -225,6 +226,7 @@
 gsm0808_permitted_speech_names;
 gsm0808_chosen_enc_alg_names;
 gsm0808_channel_type_name;
+gsm0808_channel_type_name_buf;
 gsm0808_lcls_config_names;
 gsm0808_lcls_control_names;
 gsm0808_lcls_status_names;
@@ -250,7 +252,9 @@
 osmo_dec_gcr;
 osmo_gcr_eq;
 osmo_gcr_dump;
+osmo_gcr_dump_buf;
 osmo_lcls_dump;
+osmo_lcls_dump_buf;
 
 gsm0858_rsl_ul_meas_enc;
 
@@ -345,6 +349,7 @@
 gsm48_dtx_mode;
 gsm48_mi_type_name;
 osmo_mi_name;
+osmo_mi_name_buf;
 gsm48_mcc_mnc_to_bcd;
 gsm48_mcc_mnc_from_bcd;
 gsm48_generate_lai2;
@@ -354,14 +359,21 @@
 osmo_plmn_to_bcd;
 osmo_plmn_from_bcd;
 osmo_mcc_name;
+osmo_mcc_name_buf;
 osmo_mnc_name;
+osmo_mnc_name_buf;
 osmo_plmn_name;
+osmo_plmn_name_buf;
 osmo_plmn_name2;
 osmo_lai_name;
+osmo_lai_name_buf;
 osmo_rai_name;
+osmo_rai_name_buf;
 osmo_cgi_name;
+osmo_cgi_name_buf;
 osmo_cgi_name2;
 osmo_gummei_name;
+osmo_gummei_name_buf;
 osmo_mnc_from_str;
 osmo_mnc_cmp;
 osmo_plmn_cmp;
@@ -378,6 +390,7 @@
 gsm48_cc_msgtype_names;
 gsm48_cc_cause_names;
 gsm48_pdisc_msgtype_name;
+gsm48_pdisc_msgtype_name_buf;
 gsm48_reject_value_names;
 
 gsm_7bit_decode;
@@ -403,6 +416,7 @@
 gsm_get_octet_len;
 gsm_gsmtime2fn;
 osmo_dump_gsmtime;
+osmo_dump_gsmtime_buf;
 
 gsm_milenage;
 gsm_septet_encode;
@@ -472,6 +486,7 @@
 rsl_ccch_conf_to_bs_cc_chans;
 rsl_ccch_conf_to_bs_ccch_sdcch_comb;
 rsl_chan_nr_str;
+rsl_chan_nr_str_buf;
 rsl_dec_chan_nr;
 rsl_enc_chan_nr;
 rsl_err_name;
@@ -533,7 +548,9 @@
 ipa_send;
 
 osmo_apn_qualify;
+osmo_apn_qualify_buf;
 osmo_apn_qualify_from_imsi;
+osmo_apn_qualify_from_imsi_buf;
 osmo_apn_to_str;
 osmo_apn_from_str;
 
@@ -592,6 +609,7 @@
 osmo_gsm48_classmark2_is_r99;
 osmo_gsm48_classmark_supports_a5;
 osmo_gsm48_classmark_a5_name;
+osmo_gsm48_classmark_a5_name_buf;
 osmo_gsm48_classmark_update;
 
 local: *;