From 83aa8876ff9553db655aac06c40f5f1946ccf2ab Mon Sep 17 00:00:00 2001 From: Nam KwanWoo Date: Mon, 8 Jul 2013 11:32:18 +0900 Subject: [PATCH] apply visibiliry hidden Change-Id: I56bc28e7cb5dc29b35a27a9ae78b5691ccb88bef --- CMakeLists.txt | 4 ++-- include/runtime_info_private.h | 4 ++++ src/runtime_info.c | 12 ++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) mode change 100755 => 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 index 5add3fb..70ed8d7 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ FOREACH(flag ${${fw_name}_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -fvisibility=hidden") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") IF("${ARCH}" STREQUAL "arm") @@ -29,7 +29,7 @@ ENDIF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DSLP_DEBUG") -SET(CMAKE_EXE_LINKER_FLAGS "-fvisibility=hidden -Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}") +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}") aux_source_directory(src SOURCES) ADD_LIBRARY(${fw_name} SHARED ${SOURCES}) diff --git a/include/runtime_info_private.h b/include/runtime_info_private.h index 381916e..0b2bb56 100644 --- a/include/runtime_info_private.h +++ b/include/runtime_info_private.h @@ -25,6 +25,10 @@ extern "C" { #endif +#ifndef API +#define API __attribute__ ((visibility("default"))) +#endif + typedef enum { RUNTIME_INFO_DATA_TYPE_STRING, RUNTIME_INFO_DATA_TYPE_INT, diff --git a/src/runtime_info.c b/src/runtime_info.c index 946e52f..ed51614 100644 --- a/src/runtime_info.c +++ b/src/runtime_info.c @@ -359,7 +359,7 @@ int runtime_info_get_value(runtime_info_key_e key, runtime_info_data_type_e data return RUNTIME_INFO_ERROR_NONE; } -int runtime_info_get_value_int(runtime_info_key_e key, int *value) +API int runtime_info_get_value_int(runtime_info_key_e key, int *value) { int retcode; runtime_info_value_u runtime_info_value; @@ -377,7 +377,7 @@ int runtime_info_get_value_int(runtime_info_key_e key, int *value) return retcode; } -int runtime_info_get_value_bool(runtime_info_key_e key, bool *value) +API int runtime_info_get_value_bool(runtime_info_key_e key, bool *value) { int retcode; runtime_info_value_u runtime_info_value; @@ -395,7 +395,7 @@ int runtime_info_get_value_bool(runtime_info_key_e key, bool *value) return retcode; } -int runtime_info_get_value_double(runtime_info_key_e key, double *value) +API int runtime_info_get_value_double(runtime_info_key_e key, double *value) { int retcode; runtime_info_value_u runtime_info_value; @@ -413,7 +413,7 @@ int runtime_info_get_value_double(runtime_info_key_e key, double *value) return retcode; } -int runtime_info_get_value_string(runtime_info_key_e key, char **value) +API int runtime_info_get_value_string(runtime_info_key_e key, char **value) { int retcode; runtime_info_value_u runtime_info_value; @@ -431,7 +431,7 @@ int runtime_info_get_value_string(runtime_info_key_e key, char **value) return retcode; } -int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb callback, void *user_data) +API int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb callback, void *user_data) { runtime_info_item_h runtime_info_item; runtime_info_func_set_event_cb set_event_cb; @@ -483,7 +483,7 @@ int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb return RUNTIME_INFO_ERROR_NONE; } -int runtime_info_unset_changed_cb(runtime_info_key_e key) +API int runtime_info_unset_changed_cb(runtime_info_key_e key) { runtime_info_item_h runtime_info_item; runtime_info_func_unset_event_cb unset_event_cb; -- 2.7.4