Fix for 64-bit build compatibility 24/37324/3 accepted/tizen_common tizen_3.0.2015.q2_common accepted/tizen/common/20150408.103055 accepted/tizen/mobile/20150403.075042 accepted/tizen/tv/20150402.122855 accepted/tizen/wearable/20150402.065338 submit/tizen_common/20150406.051135 submit/tizen_mobile/20150326.074553 submit/tizen_mobile/20150326.075046 submit/tizen_mobile/20150402.005016 submit/tizen_tv/20150401.081735 submit/tizen_wearable/20150401.070435
authorJiwan Kim <ji-wan.kim@samsung.com>
Tue, 24 Mar 2015 11:36:26 +0000 (20:36 +0900)
committerJiwan Kim <ji-wan.kim@samsung.com>
Thu, 26 Mar 2015 04:39:42 +0000 (13:39 +0900)
Change-Id: I6c26175039cfffcc9f092994f3bb7215c0403ffe
Signed-off-by: Jiwan Kim <ji-wan.kim@samsung.com>
CMakeLists.txt
packaging/tel-plugin-imc.spec
src/imc_phonebook.c
src/imc_sim.c
src/imc_sms.c

index 63190cc..277d2a0 100644 (file)
@@ -55,7 +55,7 @@ SET_TARGET_PROPERTIES(imc-plugin PROPERTIES PREFIX "" OUTPUT_NAME imc-plugin)
 
 # install
 INSTALL(TARGETS imc-plugin
-       LIBRARY DESTINATION ${LIB_INSTALL_DIR}/telephony/plugins/modems)
+       LIBRARY DESTINATION ${LIBDIR}/telephony/plugins/modems)
 
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/wiki_mcc_mnc_oper_list.sql DESTINATION /tmp RENAME mcc_mnc_oper_list.sql)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME tel-plugin-imc)
index bd474ba..eadfd08 100755 (executable)
@@ -2,7 +2,6 @@
 %define minor 1
 %define patchlevel 69
 
-
 Name:             tel-plugin-imc
 Version:          %{major}.%{minor}.%{patchlevel}
 Release:          1
@@ -27,7 +26,8 @@ IMC plugin for telephony
 %setup -q
 
 %build
-%cmake .
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+       -DLIB_INSTALL_DIR=%{_libdir}
 make %{?_smp_mflags}
 
 %post
index 5be6bdb..c5f0358 100644 (file)
@@ -76,8 +76,8 @@ typedef struct {
  *****************************************************************************/
 static gint __phonebook_compare_index(gconstpointer a, gconstpointer b)
 {
-       guint index1 = (guint)a;
-       guint index2 = (guint)b;
+       guint index1 = GPOINTER_TO_UINT(a);
+       guint index2 = GPOINTER_TO_UINT(b);
 
        return index1 - index2;
 }
@@ -214,7 +214,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co,
         * Check if 'index' is already available (UPDATE operation).
         */
        while (list) {
-               if ((guint)list->data == req_index) {
+               if (GPOINTER_TO_UINT(list->data) == req_index) {
                        /*
                         * index 'present', no need to update
                         */
@@ -234,7 +234,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co,
        case PB_TYPE_FDN:
                private_info->used_index_fdn = g_slist_insert_sorted(
                        private_info->used_index_fdn,
-                       (gpointer)req_index,
+                       GUINT_TO_POINTER(req_index),
                        __phonebook_compare_index);
 
                /* Update Phonebook list valid */
@@ -245,7 +245,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co,
        case PB_TYPE_ADN:
                private_info->used_index_adn = g_slist_insert_sorted(
                        private_info->used_index_adn,
-                       (gpointer)req_index,
+                       GUINT_TO_POINTER(req_index),
                        __phonebook_compare_index);
 
                /* Update Phonebook list valid */
@@ -256,7 +256,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co,
        case PB_TYPE_SDN:
                private_info->used_index_sdn = g_slist_insert_sorted(
                        private_info->used_index_sdn,
-                       (gpointer)req_index,
+                       GUINT_TO_POINTER(req_index),
                        __phonebook_compare_index);
 
                /* Update Phonebook list valid */
@@ -267,7 +267,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co,
        case PB_TYPE_USIM:
                private_info->used_index_usim = g_slist_insert_sorted(
                        private_info->used_index_usim,
-                       (gpointer)req_index,
+                       GUINT_TO_POINTER(req_index),
                        __phonebook_compare_index);
 
                /* Update Phonebook list valid */
@@ -337,9 +337,9 @@ static void __phonebook_check_used_index(CoreObject *co,
        }
 
        /* Use first used_index in case req_index is not used */
-       *used_index = (guint)g_slist_nth_data(list, VAL_ZERO);
+       *used_index = GPOINTER_TO_UINT(g_slist_nth_data(list, VAL_ZERO));
        while (list) {
-               if ((guint)list->data == req_index) {
+               if (GPOINTER_TO_UINT(list->data) == req_index) {
                        /*
                         * req_index is equal to one of used_index
                         */
@@ -595,7 +595,7 @@ static void __on_resp_phonebook_get_used_index(TcorePending *p,
                                if (temp) {
                                        /* Insert used_index in PrivateInfo sorted in ascending */
                                        *list = g_slist_insert_sorted(*list,
-                                               (gpointer)atoi(temp),
+                                               GUINT_TO_POINTER(atoi(temp)),
                                                __phonebook_compare_index);
                                }
                                tcore_at_tok_free(tokens);
@@ -1141,10 +1141,10 @@ static void on_resp_read_record(TcorePending *p,
                if (__phonebook_get_index_list_by_type(co,
                                req_data->phonebook_type, &list) == TRUE) {
                        while (list) {
-                               if ((guint)list->data == resp_read_record.index) {
+                               if (GPOINTER_TO_UINT(list->data) == resp_read_record.index) {
                                        if ((list = g_slist_next(list)) != NULL) {
                                                /* If exist, set next_index */
-                                               resp_read_record.next_index = (guint)list->data;
+                                               resp_read_record.next_index = GPOINTER_TO_UINT(list->data);
                                                dbg("next_index is [%u]", resp_read_record.next_index);
                                        } else {
                                                /* read_record.index is the end of used_index */
@@ -1310,8 +1310,8 @@ static void on_resp_delete_record(TcorePending *p,
                        err("used_index list is NOT valid");
                }
                else {
-                       const int del_index = (const int)req_data->index;
-                       list = g_slist_remove(list, (gconstpointer)del_index);
+                       const guint del_index = GPOINTER_TO_UINT(req_data->index);
+                       list = g_slist_remove(list, (gconstpointer)GUINT_TO_POINTER(del_index));
                        dbg("Remove index: [%u] list: [0x%x]", req_data->index, list);
                }
        }
index 6880cae..6060fa9 100755 (executable)
@@ -4082,7 +4082,7 @@ static TReturn imc_transmit_apdu(CoreObject *o, UserRequest *ur)
        result = util_byte_to_hex((const char *)req_data->apdu, apdu, req_data->apdu_length);
        dbg("result %d", result);
 
-       cmd_str = g_strdup_printf("AT+CSIM=%d,\"%s\"", strlen(apdu), apdu);
+       cmd_str = g_strdup_printf("AT+CSIM=%d,\"%s\"", (unsigned int)strlen(apdu), apdu);
 
        ret = tcore_prepare_and_send_at_request(o, cmd_str, "+CSIM:",
                                                                TCORE_AT_SINGLELINE, ur,
index 84293ec..b88d3df 100644 (file)
@@ -648,7 +648,7 @@ static void on_response_sms_delete_msg(TcorePending *p, int data_len, const void
        struct tresp_sms_delete_msg delMsgInfo = {0,};
        UserRequest *ur = NULL;
        const TcoreATResponse *atResp = data;
-       int index = (int) user_data;
+       int index = GPOINTER_TO_INT(user_data);
 
        dbg(" Func Entrance");