diff --git a/legacy/ecore/configure.ac b/legacy/ecore/configure.ac index 11790c46e0..d8bb3a6766 100644 --- a/legacy/ecore/configure.ac +++ b/legacy/ecore/configure.ac @@ -346,6 +346,7 @@ case "$host_os" in EFL_ECORE_EVAS_BUILD="-DEFL_ECORE_EVAS_BUILD" EFL_ECORE_IMF_BUILD="-DEFL_ECORE_IMF_BUILD" EFL_ECORE_INPUT_BUILD="-DEFL_ECORE_INPUT_BUILD" + EFL_ECORE_INPUT_EVAS_BUILD="-DEFL_ECORE_INPUT_EVAS_BUILD" ;; esac diff --git a/legacy/ecore/src/lib/ecore/Ecore.h b/legacy/ecore/src/lib/ecore/Ecore.h index 4ea2ba9e64..164e9ed5d6 100644 --- a/legacy/ecore/src/lib/ecore/Ecore.h +++ b/legacy/ecore/src/lib/ecore/Ecore.h @@ -1,6 +1,10 @@ #ifndef _ECORE_H #define _ECORE_H +#ifdef _MSC_VER +# include +#endif + #include #ifdef EAPI diff --git a/legacy/ecore/src/lib/ecore/Makefile.am b/legacy/ecore/src/lib/ecore/Makefile.am index da710ad70d..c1fb7165ca 100644 --- a/legacy/ecore/src/lib/ecore/Makefile.am +++ b/legacy/ecore/src/lib/ecore/Makefile.am @@ -21,7 +21,6 @@ ecore_job.c \ ecore_main.c \ ecore_pipe.c \ ecore_poll.c \ -ecore_signal.c \ ecore_time.c \ ecore_timer.c \ ecore_thread.c \ @@ -39,7 +38,7 @@ libecore_la_SOURCES += ecore_exe_wince.c else -libecore_la_SOURCES += ecore_exe.c +libecore_la_SOURCES += ecore_signal.c ecore_exe.c endif diff --git a/legacy/ecore/src/lib/ecore/ecore.c b/legacy/ecore/src/lib/ecore/ecore.c index 7c10b965e8..8ccb8d2ec0 100644 --- a/legacy/ecore/src/lib/ecore/ecore.c +++ b/legacy/ecore/src/lib/ecore/ecore.c @@ -9,10 +9,13 @@ #include #include #include -#include #include #include +#ifndef _MSC_VER +# include +#endif + #ifdef HAVE_LOCALE_H # include #endif @@ -48,7 +51,7 @@ static pid_t _ecore_memory_pid = 0; static const char *_ecore_magic_string_get(Ecore_Magic m); static int _ecore_init_count = 0; -EAPI int _ecore_log_dom = -1; +int _ecore_log_dom = -1; int _ecore_fps_debug = 0; /** OpenBSD does not define CODESET diff --git a/legacy/ecore/src/lib/ecore/ecore_app.c b/legacy/ecore/src/lib/ecore/ecore_app.c index 2c7bab08b0..93c2436f3b 100644 --- a/legacy/ecore/src/lib/ecore/ecore_app.c +++ b/legacy/ecore/src/lib/ecore/ecore_app.c @@ -7,7 +7,10 @@ #endif #include -#include + +#ifndef _MSC_VER +# include +#endif #ifdef HAVE_EVIL # include diff --git a/legacy/ecore/src/lib/ecore/ecore_exe_win32.c b/legacy/ecore/src/lib/ecore/ecore_exe_win32.c index 42da785ab6..c2d99f603a 100644 --- a/legacy/ecore/src/lib/ecore/ecore_exe_win32.c +++ b/legacy/ecore/src/lib/ecore/ecore_exe_win32.c @@ -14,6 +14,11 @@ # include #endif +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN +#include + #ifdef HAVE_EVIL # include #endif @@ -21,11 +26,6 @@ #include "Ecore.h" #include "ecore_private.h" -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#include - #define ECORE_EXE_WIN32_TIMEOUT 3000 typedef enum diff --git a/legacy/ecore/src/lib/ecore/ecore_getopt.c b/legacy/ecore/src/lib/ecore/ecore_getopt.c index 08d5b2233e..09e47dda68 100644 --- a/legacy/ecore/src/lib/ecore/ecore_getopt.c +++ b/legacy/ecore/src/lib/ecore/ecore_getopt.c @@ -100,13 +100,13 @@ _ecore_getopt_help_line(FILE *fp, const int base, const int total, int used, con /* process line considering spaces (new line and tabs are spaces!) */ while ((used < total) && (len > 0)) { + const char *space = NULL; int i, todo; todo = total - used; if (todo > len) todo = len; - const char *space = NULL; for (i = 0; i < todo; i++) if (isspace(text[i])) { diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c index e4280bf324..2f38cb3df6 100644 --- a/legacy/ecore/src/lib/ecore/ecore_main.c +++ b/legacy/ecore/src/lib/ecore/ecore_main.c @@ -7,8 +7,12 @@ #endif #ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN # include -# define USER_TIMER_MINIMUM 0x0a +# undef WIN32_LEAN_AND_MEAN +# ifndef USER_TIMER_MINIMUM +# define USER_TIMER_MINIMUM 0x0a +# endif #endif #ifdef __SUNPRO_C @@ -19,16 +23,23 @@ #include #include #include -#include #include -#include #include #include +#ifndef _MSC_VER +#include +# include +#else +# include +#endif + #define FIX_HZ 1 #ifdef FIX_HZ -# include +# ifndef _MSC_VER +# include +# endif # ifndef HZ # define HZ 100 # endif @@ -1039,12 +1050,12 @@ _ecore_main_win32_select(int nfds, fd_set *readfds, fd_set *writefds, } else { - ERR(stderr, "unknown result...\n"); + ERR("unknown result...\n"); res = -1; } /* Remove event objects again */ - for(i = 0; i < events_nbr; i++) + for(i = 0; i < (int)events_nbr; i++) WSACloseEvent(objects[i]); return res; diff --git a/legacy/ecore/src/lib/ecore/ecore_signal.c b/legacy/ecore/src/lib/ecore/ecore_signal.c index 5d5a42b77c..5d0ddb51e9 100644 --- a/legacy/ecore/src/lib/ecore/ecore_signal.c +++ b/legacy/ecore/src/lib/ecore/ecore_signal.c @@ -2,8 +2,6 @@ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ -#ifndef _WIN32 - #ifdef HAVE_CONFIG_H # include #endif @@ -624,4 +622,3 @@ _ecore_signal_exe_exit_delay(void *data) } return 0; } -#endif diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c index 97544b8c80..385307a11b 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c @@ -10,9 +10,12 @@ #include #include #include -#include #include -#include + +#ifndef _MSC_VER +# include +# include +#endif #ifndef _FILE_OFFSET_BITS # define _FILE_OFFSET_BITS 64 @@ -177,10 +180,10 @@ ecore_file_mkdir(const char *dir) EAPI int ecore_file_mkdirs(const char **dirs) { - if (!dirs) return -1; - int i = 0; + if (!dirs) return -1; + for (; *dirs != NULL; dirs++) if (ecore_file_mkdir(*dirs)) i++; @@ -417,11 +420,10 @@ ecore_file_mkpath(const char *path) EAPI int ecore_file_mkpaths(const char **paths) { + int i = 0; if (!paths) return -1; - int i = 0; - for (; *paths != NULL; paths++) if (ecore_file_mkpath(*paths)) i++; diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_download.c b/legacy/ecore/src/lib/ecore_file/ecore_file_download.c index 8cf3863f08..94682c5ca0 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file_download.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file_download.c @@ -9,7 +9,10 @@ #include #include -#include "Ecore_Con.h" +#ifdef BUILD_ECORE_CON +# include "Ecore_Con.h" +#endif + #include "ecore_file_private.h" #ifdef BUILD_ECORE_CON diff --git a/legacy/ecore/src/lib/ecore_input/ecore_input.c b/legacy/ecore/src/lib/ecore_input/ecore_input.c index 9ff510fcb8..448772e573 100644 --- a/legacy/ecore/src/lib/ecore_input/ecore_input.c +++ b/legacy/ecore/src/lib/ecore_input/ecore_input.c @@ -10,9 +10,10 @@ #include #include "Ecore.h" -#include "ecore_input_private.h" #include "ecore_private.h" + #include "Ecore_Input.h" +#include "ecore_input_private.h" int _ecore_input_log_dom = -1; diff --git a/legacy/ecore/src/lib/ecore_input_evas/Ecore_Input_Evas.h b/legacy/ecore/src/lib/ecore_input_evas/Ecore_Input_Evas.h index fa13bd3ab6..265d611690 100644 --- a/legacy/ecore/src/lib/ecore_input_evas/Ecore_Input_Evas.h +++ b/legacy/ecore/src/lib/ecore_input_evas/Ecore_Input_Evas.h @@ -12,7 +12,7 @@ #endif #ifdef _WIN32 -# ifdef EFL_ECORE_INPUT_BUILD +# ifdef EFL_ECORE_INPUT_EVAS_BUILD # ifdef DLL_EXPORT # define EAPI __declspec(dllexport) # else diff --git a/legacy/ecore/src/lib/ecore_input_evas/Makefile.am b/legacy/ecore/src/lib/ecore_input_evas/Makefile.am index 8a0ae99cc9..b0fe622e87 100644 --- a/legacy/ecore/src/lib/ecore_input_evas/Makefile.am +++ b/legacy/ecore/src/lib/ecore_input_evas/Makefile.am @@ -5,7 +5,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/src/lib/ecore_input \ -I$(top_srcdir)/src/lib/ecore \ -I$(top_builddir)/src/lib/ecore \ -@EFL_ECORE_INPUT_BUILD@ \ +@EFL_ECORE_INPUT_EVAS_BUILD@ \ @EVAS_CFLAGS@ \ @EINA_CFLAGS@ \ @EVIL_CFLAGS@ diff --git a/legacy/ecore/src/lib/ecore_input_evas/ecore_input_evas.c b/legacy/ecore/src/lib/ecore_input_evas/ecore_input_evas.c index e537a3193a..15664dafe6 100644 --- a/legacy/ecore/src/lib/ecore_input_evas/ecore_input_evas.c +++ b/legacy/ecore/src/lib/ecore_input_evas/ecore_input_evas.c @@ -9,9 +9,10 @@ #include #include "Ecore.h" -#include "ecore_input_evas_private.h" #include "Ecore_Input.h" + #include "Ecore_Input_Evas.h" +#include "ecore_input_evas_private.h" int _ecore_input_evas_log_dom = -1; diff --git a/legacy/ecore/src/lib/ecore_win32/ecore_win32_dnd.c b/legacy/ecore/src/lib/ecore_win32/ecore_win32_dnd.c index 6ce9367ece..25363b2beb 100755 --- a/legacy/ecore/src/lib/ecore_win32/ecore_win32_dnd.c +++ b/legacy/ecore/src/lib/ecore_win32/ecore_win32_dnd.c @@ -55,21 +55,19 @@ int ecore_win32_dnd_shutdown() int ecore_win32_dnd_begin(const char *data, int size) { + IDataObject *pDataObject = NULL; + IDropSource *pDropSource = NULL; + FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; + STGMEDIUM stgmed = { TYMED_HGLOBAL, { 0 }, 0 }; + int res = 0; + if (data == NULL) return 0; if (size < 0) size = strlen(data) + 1; - IDataObject *pDataObject = NULL; - IDropSource *pDropSource = NULL; - - FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; - STGMEDIUM stgmed = { TYMED_HGLOBAL, { 0 }, 0 }; - stgmed.hGlobal = DataToHandle(data, size); - int res = 0; - // create the data object pDataObject = (IDataObject *)_ecore_win32_dnd_data_object_new((void *)&fmtetc, (void *)&stgmed, @@ -112,10 +110,11 @@ int ecore_win32_dnd_begin(const char *data, int ecore_win32_dnd_register_drop_target(Ecore_Win32_Window *window, Ecore_Win32_Dnd_DropTarget_Callback callback) { + struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window; + if (window == NULL) return 0; - struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window; wnd->dnd_drop_target = _ecore_win32_dnd_register_drop_window(wnd->window, callback, (void *)wnd); @@ -124,10 +123,11 @@ int ecore_win32_dnd_register_drop_target(Ecore_Win32_Window *win void ecore_win32_dnd_unregister_drop_target(Ecore_Win32_Window *window) { + struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window; + if (window == NULL) return; - struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window; if (wnd->dnd_drop_target != NULL) _ecore_win32_dnd_unregister_drop_window(wnd->window, wnd->dnd_drop_target); }