Ecore: fix some warnings on Windows
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Nov 2011 20:20:39 +0000 (20:20 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Nov 2011 20:20:39 +0000 (20:20 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@65497 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore/ecore_main.c
src/lib/ecore/ecore_pipe.c
src/lib/ecore_evas/ecore_evas_win32.c
src/lib/ecore_file/ecore_file.c

index 9ae043d..152836a 100644 (file)
@@ -1932,11 +1932,11 @@ _ecore_main_win32_select(int             nfds __UNUSED__,
    /* The result tells us the type of event we have. */
    if (result == WAIT_FAILED)
      {
-        char *msg;
+        char *m;
 
-        msg = evil_last_error_get();
-        ERR(" * %s\n", msg);
-        free(msg);
+        m = evil_last_error_get();
+        ERR(" * %s\n", m);
+        free(m);
         res = -1;
      }
    else if (result == WAIT_TIMEOUT)
index 8447d18..0ab7dd0 100644 (file)
 #include "Ecore.h"
 #include "ecore_private.h"
 
+#ifdef _WIN32
+# define FMT_SSIZE_T "%Id"
+#else
+# define FMT_SSIZE_T "%zd"
+#endif
+
 /* How of then we should retry to write to the pipe */
 #define ECORE_PIPE_WRITE_RETRY 6
 
@@ -407,7 +413,7 @@ ecore_pipe_write(Ecore_Pipe  *p,
           ;
         else
           {
-             ERR("An unhandled error (ret: %zd errno: %d)"
+             ERR("An unhandled error (ret: " FMT_SSIZE_T " errno: %d)"
                  "occurred while writing to the pipe the length",
                  ret, errno);
           }
@@ -441,7 +447,7 @@ ecore_pipe_write(Ecore_Pipe  *p,
           ;
         else
           {
-             ERR("An unhandled error (ret: %zd errno: %d)"
+             ERR("An unhandled error (ret: " FMT_SSIZE_T " errno: %d)"
                  "occurred while writing to the pipe the length",
                  ret, errno);
           }
index 11abe96..2ca7cb0 100644 (file)
@@ -185,9 +185,9 @@ _ecore_evas_win32_event_window_focus_in(void *data __UNUSED__, int type __UNUSED
    Ecore_Win32_Event_Window_Focus_In *e;
 
    e = event;
-   ee = ecore_event_window_match(e->window);
+   ee = ecore_event_window_match((Ecore_Window)e->window);
    if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
-   if (e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+   if ((Ecore_Window)e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
 
    ee->prop.focused = 1;
    evas_focus_in(ee->evas);
@@ -202,9 +202,9 @@ _ecore_evas_win32_event_window_focus_out(void *data __UNUSED__, int type __UNUSE
    Ecore_Win32_Event_Window_Focus_Out *e;
 
    e = event;
-   ee = ecore_event_window_match(e->window);
+   ee = ecore_event_window_match((Ecore_Window)e->window);
    if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
-   if (e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+   if ((Ecore_Window)e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
 
    evas_focus_out(ee->evas);
    ee->prop.focused = 0;
index 8e58787..2546f2f 100644 (file)
 # include <libgen.h>
 #endif
 
+#ifdef _WIN32
+# include <direct.h>
+#endif
+
 #ifdef HAVE_FEATURES_H
 # include <features.h>
 #endif