From: caro Date: Sat, 30 Jan 2010 00:09:29 +0000 (+0000) Subject: * undef close() and open() in evas_module also for mingw X-Git-Tag: submit/trunk/20120815.174732~2947 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a499f8617f438165f68f07093f28740cfe96df4;p=profile%2Fivi%2Fevas.git * undef close() and open() in evas_module also for mingw * init Evil in eina as it uses fcntl() with the winsock2 library * fix compilation of evas_cache_image.c with mingw * formatting git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@45724 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/cache/evas_cache_image.c b/src/lib/cache/evas_cache_image.c index 534130d..0821b3a 100644 --- a/src/lib/cache/evas_cache_image.c +++ b/src/lib/cache/evas_cache_image.c @@ -786,10 +786,18 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char * return im; on_stat_error: +#ifndef _WIN32 if ((errno == ENOENT) || (errno == ENOTDIR) || (errno == ENAMETOOLONG) || (errno == ELOOP)) +#else + if (errno == ENOENT) +#endif *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; +#ifndef _WIN32 else if ((errno == ENOMEM) || (errno == EOVERFLOW)) +#else + else if (errno == ENOMEM) +#endif *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; else if (errno == EACCES) *error = EVAS_LOAD_ERROR_PERMISSION_DENIED; diff --git a/src/lib/canvas/evas_main.c b/src/lib/canvas/evas_main.c index 1507349..8b18367 100644 --- a/src/lib/canvas/evas_main.c +++ b/src/lib/canvas/evas_main.c @@ -21,13 +21,18 @@ evas_init(void) if (++_evas_init_count != 1) return _evas_init_count; - if (!eina_init()) +#ifdef HAVE_EVIL + if (!evil_init()) return --_evas_init_count; +#endif + + if (!eina_init()) + goto shutdown_evil; _evas_log_dom_global = eina_log_domain_register("evas_main",EVAS_DEFAULT_LOG_COLOR); if (_evas_log_dom_global < 0) { - EINA_LOG_ERR("Evas could not create a default log domain\n"); + EINA_LOG_ERR("Evas could not create a default log domain\n"); goto shutdown_eina; } @@ -52,6 +57,10 @@ evas_init(void) #endif shutdown_eina: eina_shutdown(); + shutdown_evil: +#ifdef HAVE_EVIL + evil_shutdown(); +#endif return --_evas_init_count; } @@ -88,6 +97,9 @@ evas_shutdown(void) evas_module_shutdown(); eina_log_domain_unregister(_evas_log_dom_global); eina_shutdown(); +#ifdef HAVE_EVIL + evil_shutdown(); +#endif return _evas_init_count; } diff --git a/src/lib/file/evas_module.c b/src/lib/file/evas_module.c index 1dde1f1..e00f4e7 100644 --- a/src/lib/file/evas_module.c +++ b/src/lib/file/evas_module.c @@ -8,7 +8,7 @@ #include #include -#ifdef _MSC_VER +#ifdef _WIN32 # ifdef open # undef open # endif diff --git a/src/lib/include/evas_common.h b/src/lib/include/evas_common.h index aab86c3..c5c0fe9 100644 --- a/src/lib/include/evas_common.h +++ b/src/lib/include/evas_common.h @@ -9,6 +9,10 @@ # include "config.h" /* so that EAPI in Evas.h is correctly defined */ #endif +#ifdef HAVE_EVIL +# include +#endif + #include #include "Evas.h"