%define tizen_feature_prelink 0
%endif
-%if "%{?tizen_build_devel_mode}" == "1"
-%define tizen_debug_mode 1
-%else
-%define tizen_debug_mode 0
-%endif
-
%prep
%setup -q
sed -i 's|TZ_SYS_DB|%{TZ_SYS_DB}|g' %{SOURCE1001}
%if 0%{?tizen_feature_prelink}
_TIZEN_FEATURE_PRELINK=ON
-%endif
-
-%if 0%{?tizen_debug_mode}
+%else
_TIZEN_FEATURE_DEBUG_MODE=ON
%endif
#define _GNU_SOURCE
+#include <dlfcn.h>
+#include <execinfo.h>
#include <signal.h>
#include <stdio.h>
#include "aul_unix_signal.h"
#include "aul_util.h"
-#ifdef TIZEN_FEATURE_DEBUG_MODE
-#include <dlfcn.h>
-#include <execinfo.h>
-
#define BT_BUF_SIZE 128
#define PRINT_BACKTRACE() do { \
} \
} \
} while (0)
-#endif /* TIZEN_FEATURE_DEBUG_MODE */
+
+#if TIZEN_FEATURE_DEBUG_MODE
typedef enum {
AUL_SIGHUP,
_E("[__SIGNAL__] signal: %d(%s)",
signo, __get_aul_signo_string(__get_aul_signo(signo)));
-#ifdef TIZEN_FEATURE_DEBUG_MODE
PRINT_BACKTRACE();
-#endif /* TIZEN_FEATURE_DEBUG_MODE */
if (__callback)
__callback(signo, __user_data);
raise(signo);
}
}
+#endif /* TIZEN_FEATURE_DEBUG_MODE */
int aul_unix_signal_set_event_cb(aul_unix_signal_cb callback,
void *user_data)
{
+#if TIZEN_FEATURE_DEBUG_MODE
__callback = callback;
__user_data = user_data;
+#endif /* TIZEN_FEATURE_DEBUG_MODE */
return 0;
}
int aul_unix_signal_init(void)
{
+#if TIZEN_FEATURE_DEBUG_MODE
struct sigaction action = { 0, };
int signo;
int i;
if (signo != -1)
sigaction(signo, &action, &__old_action[i]);
}
+#endif /* TIZEN_FEATURE_DEBUG_MODE */
return 0;
}
void aul_unix_signal_fini(void)
{
+#if TIZEN_FEATURE_DEBUG_MODE
int signo;
int i;
if (signo != -1)
sigaction(signo, &__old_action[i], NULL);
}
+#endif /* TIZEN_FEATURE_DEBUG_MODE */
}