various fixes for vc++. I'll add the Visual Studio projects later
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 5 Apr 2010 08:26:48 +0000 (08:26 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 5 Apr 2010 08:26:48 +0000 (08:26 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@47758 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

16 files changed:
configure.ac
src/lib/ecore/Ecore.h
src/lib/ecore/Makefile.am
src/lib/ecore/ecore.c
src/lib/ecore/ecore_app.c
src/lib/ecore/ecore_exe_win32.c
src/lib/ecore/ecore_getopt.c
src/lib/ecore/ecore_main.c
src/lib/ecore/ecore_signal.c
src/lib/ecore_file/ecore_file.c
src/lib/ecore_file/ecore_file_download.c
src/lib/ecore_input/ecore_input.c
src/lib/ecore_input_evas/Ecore_Input_Evas.h
src/lib/ecore_input_evas/Makefile.am
src/lib/ecore_input_evas/ecore_input_evas.c
src/lib/ecore_win32/ecore_win32_dnd.c

index 11790c4..d8bb3a6 100644 (file)
@@ -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
 
index 4ea2ba9..164e9ed 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef _ECORE_H
 #define _ECORE_H
 
+#ifdef _MSC_VER
+# include <Evil.h>
+#endif
+
 #include <Eina.h>
 
 #ifdef EAPI
index da710ad..c1fb716 100644 (file)
@@ -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
 
index 7c10b96..8ccb8d2 100644 (file)
@@ -9,10 +9,13 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
 
+#ifndef _MSC_VER
+# include <unistd.h>
+#endif
+
 #ifdef HAVE_LOCALE_H
 # include <locale.h>
 #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
index 2c7bab0..93c2436 100644 (file)
@@ -7,7 +7,10 @@
 #endif
 
 #include <stdlib.h>
-#include <unistd.h>
+
+#ifndef _MSC_VER
+# include <unistd.h>
+#endif
 
 #ifdef HAVE_EVIL
 # include <Evil.h>
index 42da785..c2d99f6 100644 (file)
 # include <config.h>
 #endif
 
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#include <process.h>
+
 #ifdef HAVE_EVIL
 # include <Evil.h>
 #endif
 #include "Ecore.h"
 #include "ecore_private.h"
 
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#include <process.h>
-
 #define ECORE_EXE_WIN32_TIMEOUT 3000
 
 typedef enum
index 08d5b22..09e47dd 100644 (file)
@@ -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]))
                 {
index e4280bf..2f38cb3 100644 (file)
@@ -7,8 +7,12 @@
 #endif
 
 #ifdef _WIN32
+# define WIN32_LEAN_AND_MEAN
 # include <winsock2.h>
-# define USER_TIMER_MINIMUM 0x0a
+# undef WIN32_LEAN_AND_MEAN
+# ifndef USER_TIMER_MINIMUM
+#  define USER_TIMER_MINIMUM 0x0a
+# endif
 #endif
 
 #ifdef __SUNPRO_C
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
-#include <sys/time.h>
 #include <sys/types.h>
-#include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
 
+#ifndef _MSC_VER
+#include <sys/time.h>
+# include <unistd.h>
+#else
+# include <float.h>
+#endif
+
 #define FIX_HZ 1
 
 #ifdef FIX_HZ
-# include <sys/param.h>
+# ifndef _MSC_VER
+#  include <sys/param.h>
+# 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;
index 5d5a42b..5d0ddb5 100644 (file)
@@ -2,8 +2,6 @@
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
 
-#ifndef _WIN32
-
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
@@ -624,4 +622,3 @@ _ecore_signal_exe_exit_delay(void *data)
      }
    return 0;
 }
-#endif
index 97544b8..385307a 100644 (file)
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <dirent.h>
-#include <libgen.h>
+
+#ifndef _MSC_VER
+# include <unistd.h>
+# include <libgen.h>
+#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++;
index 8cf3863..94682c5 100644 (file)
@@ -9,7 +9,10 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "Ecore_Con.h"
+#ifdef BUILD_ECORE_CON
+# include "Ecore_Con.h"
+#endif
+
 #include "ecore_file_private.h"
 
 #ifdef BUILD_ECORE_CON
index 9ff510f..448772e 100644 (file)
 #include <string.h>
 
 #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;
index fa13bd3..265d611 100644 (file)
@@ -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
index 8a0ae99..b0fe622 100644 (file)
@@ -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@
index e537a31..15664da 100644 (file)
@@ -9,9 +9,10 @@
 #include <string.h>
 
 #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;
 
index 6ce9367..25363b2 100755 (executable)
@@ -55,20 +55,18 @@ int ecore_win32_dnd_shutdown()
 int ecore_win32_dnd_begin(const char *data,
                           int         size)
 {
-   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 };
+   int res = 0;
 
-   stgmed.hGlobal = DataToHandle(data, size);
+   if (data == NULL)
+      return 0;
+   if (size < 0)
+      size = strlen(data) + 1;
 
-   int res = 0;
+   stgmed.hGlobal = DataToHandle(data, size);
 
    // create the data object
    pDataObject = (IDataObject *)_ecore_win32_dnd_data_object_new((void *)&fmtetc,
@@ -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);
 }