* 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
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;
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;
}
#endif
shutdown_eina:
eina_shutdown();
+ shutdown_evil:
+#ifdef HAVE_EVIL
+ evil_shutdown();
+#endif
return --_evas_init_count;
}
evas_module_shutdown();
eina_log_domain_unregister(_evas_log_dom_global);
eina_shutdown();
+#ifdef HAVE_EVIL
+ evil_shutdown();
+#endif
return _evas_init_count;
}
#include <evas_private.h>
#include <evas_module.h>
-#ifdef _MSC_VER
+#ifdef _WIN32
# ifdef open
# undef open
# endif
# include "config.h" /* so that EAPI in Evas.h is correctly defined */
#endif
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
#include <Eina.h>
#include "Evas.h"