From 8db978aa4cf216632581c629053fb90ed16de33d Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Wed, 22 May 2019 07:59:05 -0400 Subject: [PATCH] include evil_private.h in last files, and disable symbolic links on Windows in a couple of files Test Plan: compilation Reviewers: zmike, raster, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8933 --- src/bin/efreet/efreetd_cache.c | 4 ++++ src/lib/ecore_con/efl_net_dialer_windows.c | 2 ++ src/lib/ecore_con/efl_net_server_windows.c | 2 ++ src/lib/ecore_evas/ecore_evas_module.c | 3 ++- src/lib/eio/efl_io_model.c | 2 ++ src/lib/eio/eio_dir.c | 2 ++ src/lib/elua/io.c | 4 ++++ src/lib/emotion/emotion_modules.c | 5 +++++ 8 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c index f0c27ae1a4..4b801a8fc0 100644 --- a/src/bin/efreet/efreetd_cache.c +++ b/src/bin/efreet/efreetd_cache.c @@ -487,12 +487,14 @@ icon_changes_monitor_add(const struct stat *st, const char *path) const char *monpath = path; if (eina_hash_find(icon_change_monitors, path)) return; +#ifndef _WIN32 if (S_ISLNK(st->st_mode)) { realp = ecore_file_realpath(path); if (!realp) return; monpath = realp; } +#endif if (ecore_file_is_dir(monpath)) { mon = eio_monitor_add(monpath); @@ -513,12 +515,14 @@ desktop_changes_monitor_add(const struct stat *st, const char *path) const char *monpath = path; if (eina_hash_find(desktop_change_monitors, path)) return; +#ifndef _WIN32 if (S_ISLNK(st->st_mode)) { realp = ecore_file_realpath(path); if (!realp) return; monpath = realp; } +#endif if (ecore_file_is_dir(monpath)) { mon = eio_monitor_add(monpath); diff --git a/src/lib/ecore_con/efl_net_dialer_windows.c b/src/lib/ecore_con/efl_net_dialer_windows.c index bf6d525e36..a38633e5f0 100644 --- a/src/lib/ecore_con/efl_net_dialer_windows.c +++ b/src/lib/ecore_con/efl_net_dialer_windows.c @@ -9,6 +9,8 @@ # include #endif +#include /* evil_format_message evil_last_error_get */ + #include "Ecore.h" #include "Ecore_Con.h" #include "ecore_con_private.h" diff --git a/src/lib/ecore_con/efl_net_server_windows.c b/src/lib/ecore_con/efl_net_server_windows.c index 454e87c547..4adea75ef5 100644 --- a/src/lib/ecore_con/efl_net_server_windows.c +++ b/src/lib/ecore_con/efl_net_server_windows.c @@ -6,6 +6,8 @@ # include #endif +#include /* evil_format_message evil_last_error_get */ + #include "Ecore.h" #include "Ecore_Con.h" #include "ecore_con_private.h" diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c index a6ce6bec51..2b5394b06f 100644 --- a/src/lib/ecore_evas/ecore_evas_module.c +++ b/src/lib/ecore_evas/ecore_evas_module.c @@ -224,7 +224,8 @@ _ecore_evas_available_engines_get(void) const char *name; #ifdef _WIN32 - EVIL_PATH_SEP_WIN32_TO_UNIX(info->path); + name = strrchr(info->path, '\\'); + if (name) name++; #endif name = strrchr(info->path, '/'); if (name) name++; diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c index 87d219cfb0..54dc6a2882 100644 --- a/src/lib/eio/efl_io_model.c +++ b/src/lib/eio/efl_io_model.c @@ -274,8 +274,10 @@ _efl_io_model_info_type_get(const Eina_File_Direct_Info *info, const Eina_Stat * return EINA_FILE_BLK; else if (S_ISFIFO(st->mode)) return EINA_FILE_FIFO; +#ifndef _WIN32 else if (S_ISLNK(st->mode)) return EINA_FILE_LNK; +#endif #ifdef S_ISSOCK else if (S_ISSOCK(st->mode)) return EINA_FILE_SOCK; diff --git a/src/lib/eio/eio_dir.c b/src/lib/eio/eio_dir.c index 22544c9df7..0ae68befde 100644 --- a/src/lib/eio/eio_dir.c +++ b/src/lib/eio/eio_dir.c @@ -95,8 +95,10 @@ _eio_file_recursiv_ls(Ecore_Thread *thread, if (_eio_lstat(info->path, &buffer) != 0) continue; +#ifndef _WIN32 if (S_ISLNK(buffer.st_mode)) info->type = EINA_FILE_LNK; +#endif default: break; } diff --git a/src/lib/elua/io.c b/src/lib/elua/io.c index 186170b87c..77ac3df94c 100644 --- a/src/lib/elua/io.c +++ b/src/lib/elua/io.c @@ -1,5 +1,9 @@ #include "elua_private.h" +#ifdef _WIN32 +# include /* realpath */ +#endif + /* expand fname to full path name (so that PATH is ignored) plus turn * stuff into a command, and also verify whether the path exists */ static char * diff --git a/src/lib/emotion/emotion_modules.c b/src/lib/emotion/emotion_modules.c index 5f079b2983..da665e7aa4 100644 --- a/src/lib/emotion/emotion_modules.c +++ b/src/lib/emotion/emotion_modules.c @@ -2,6 +2,11 @@ # include "config.h" #endif +#ifdef _WIN32 +/* normally, they will never be called as it's for Wayland */ +# include /* setenv unsetenv */ +#endif + #include "emotion_private.h" #include "../../static_libs/buildsystem/buildsystem.h" #include