#define LOG_TAG "WIDGET_TOOLKIT"
#define API __attribute__((visibility("default")))
+#define ERR_BUFFER_SIZE 1024
struct compositor_handler {
char *app_id;
static void __set_runtime_dir(void)
{
char buf[256];
+ char err_buf[ERR_BUFFER_SIZE];
snprintf(buf, sizeof(buf) - 1, "/run/user/%d", getuid());
if (setenv("XDG_RUNTIME_DIR", buf, 0) < 0)
- _E("Unable to set XDB_RUNTIME_DIR: %s (%s)\n", buf, strerror(errno));
+ _E("Unable to set XDB_RUNTIME_DIR: %s (%s)\n", buf, strerror_r(errno, err_buf, sizeof(err_buf)));
}
API const char *_compositor_init(Evas_Object *win)
{
static const char *compositor_name = NULL;
char app_id[255];
+ char err_buf[ERR_BUFFER_SIZE];
if (__compositor_name)
return __compositor_name;
}
if (setenv("WAYLAND_DISPLAY", compositor_name, 1) < 0)
- _E("failed to set WAYLAND_DISPLAY: %s\n", strerror(errno));
+ _E("failed to set WAYLAND_DISPLAY: %s\n", strerror_r(errno, err_buf, sizeof(err_buf)));
evas_object_smart_callback_add(win, PEPPER_EFL_OBJ_ADD, __obj_added_cb, NULL);
evas_object_smart_callback_add(win, PEPPER_EFL_OBJ_DEL, __obj_deleted_cb, NULL);
#define DEFAULT_CATEGORY "default"
#define WIDGET_INFO_TAG "__WIDGET_INFO__"
+#define ERR_BUFFER_SIZE 1024
/*!
* \note
widget_viewer_evas_activate_faulted_widget(info->layout);
}
-static inline struct widget_info *create_info(Evas_Object *parent, const char *widget_id, const char *instance_id, const char *content_info)
+static struct widget_info *create_info(Evas_Object *parent, const char *widget_id, const char *instance_id, const char *content_info)
{
struct widget_info *info;
+ char err_buf[ERR_BUFFER_SIZE];
info = (struct widget_info *)calloc(1, sizeof(*info));
if (!info) {
- ErrPrint("malloc: %s", strerror(errno));
+ ErrPrint("malloc: %s", strerror_r(errno, err_buf, sizeof(err_buf)));
goto out;
}
#include "main.h"
#include "debug.h"
+#define ERR_BUFFER_SIZE 1024
#define WATCH_CATEGORY "http://tizen.org/category/wearable_clock"
#define DEFAULT_WATCH "org.tizen.digitalclock"
#define LAZY_WATCH_TIME 3.0f
int main(int argc, char *argv[])
{
+ char err_buf[ERR_BUFFER_SIZE];
ui_app_lifecycle_callback_s event_callback;
event_callback.create = app_create;
event_callback.app_control = _app_control;
if (setenv("BUFMGR_LOCK_TYPE", "once", 0) < 0)
- LOGE("setenv(BUFMGR_LOCK_TYPE) is failed: %s", strerror(errno));
+ LOGE("setenv(BUFMGR_LOCK_TYPE) is failed: %s", strerror_r(errno, err_buf, sizeof(err_buf)));
if (setenv("BUFMGR_MAP_CACHE", "true", 0) < 0)
- LOGE("setenv(BUFMGR_MAP_CACHE) is failed: %s", strerror(errno));
+ LOGE("setenv(BUFMGR_MAP_CACHE) is failed: %s", strerror_r(errno, err_buf, sizeof(err_buf)));
return ui_app_main(argc, argv, &event_callback, NULL);
}