Ecore: ecore_con : make ecore_ipc compile on Windows.
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 14 May 2011 18:30:43 +0000 (18:30 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 14 May 2011 18:30:43 +0000 (18:30 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@59389 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
configure.ac
src/lib/ecore_ipc/Ecore_Ipc.h
src/lib/ecore_ipc/Makefile.am
src/lib/ecore_ipc/ecore_ipc.c
src/lib/ecore_ipc/ecore_ipc_private.h

index 9266d94..b26b72f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
        * Make ecore_con work on Windows (only the local connections
        need a port)
+       * Make ecore_ipc compile on Windows
index aabb223..d6c39dc 100644 (file)
@@ -108,7 +108,7 @@ want_glib="no"
 
 # core modules
 want_ecore_con="yes"
-want_ecore_ipc="no"
+want_ecore_ipc="yes"
 want_ecore_file="yes"
 #want_ecore_config="no"
 want_ecore_imf="no"
@@ -165,6 +165,7 @@ want_ecore_evas_software_16_wince="no"
 case "$host_os" in
    mingw32ce* | cegcc*)
       want_ecore_con="no"
+      want_ecore_ipc="no"
       want_ecore_wince="yes"
       want_ecore_evas_software_16_wince="yes"
       ;;
@@ -187,7 +188,6 @@ case "$host_os" in
       want_glib="auto"
       want_gnutls="auto"
       want_openssl="auto"
-      want_ecore_ipc="yes"
       want_ecore_imf="yes"
       want_ecore_cocoa="yes"
       want_ecore_evas_software_sdl="yes"
@@ -204,7 +204,6 @@ case "$host_os" in
       want_inotify="yes"
       want_tslib="yes"
       want_ecore_fb="yes"
-      want_ecore_ipc="yes"
       want_ecore_imf="yes"
       want_ecore_x="yes"
       want_ecore_evas_software_x11="yes"
@@ -367,6 +366,7 @@ case "$host_os" in
       EFL_ECORE_IMF_EVAS_BUILD="-DEFL_ECORE_IMF_EVAS_BUILD"
       EFL_ECORE_INPUT_BUILD="-DEFL_ECORE_INPUT_BUILD"
       EFL_ECORE_INPUT_EVAS_BUILD="-DEFL_ECORE_INPUT_EVAS_BUILD"
+      EFL_ECORE_IPC_BUILD="-DEFL_ECORE_IPC_BUILD"
       ;;
 esac
 
@@ -395,6 +395,7 @@ AC_SUBST(EFL_ECORE_IMF_BUILD)
 AC_SUBST(EFL_ECORE_IMF_EVAS_BUILD)
 AC_SUBST(EFL_ECORE_INPUT_BUILD)
 AC_SUBST(EFL_ECORE_INPUT_EVAS_BUILD)
+AC_SUBST(EFL_ECORE_IPC_BUILD)
 AC_SUBST(EFL_ECORE_WINCE_BUILD)
 AC_SUBST(EFL_ECORE_WIN32_BUILD)
 AC_SUBST(EFL_ECORE_SDL_BUILD)
index 000fca9..fa12b40 100644 (file)
@@ -5,9 +5,13 @@
 # undef EAPI
 #endif
 
-#ifdef _MSC_VER
-# ifdef BUILDING_DLL
-#  define EAPI __declspec(dllexport)
+#ifdef _WIN32
+# ifdef EFL_ECORE_IPC_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif
 # else
 #  define EAPI __declspec(dllimport)
 # endif
 #ifdef __cplusplus
 extern "C" {
 #endif
-#ifndef _ECORE_IPC_PRIVATE_H
-   typedef void Ecore_Ipc_Server; /**< An IPC connection handle */
-   typedef void Ecore_Ipc_Client; /**< An IPC connection handle */
-#endif
+
+typedef struct _Ecore_Ipc_Server Ecore_Ipc_Server; /**< An IPC connection handle */
+typedef struct _Ecore_Ipc_Client Ecore_Ipc_Client; /**< An IPC connection handle */
 
 /**
  * Macros used for generic data packing
index 03b392d..9cbed43 100644 (file)
@@ -7,7 +7,9 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/ecore \
 -I$(top_srcdir)/src/lib/ecore_con \
 -I$(top_srcdir)/src/lib/ecore_ipc \
-@SSL_CFLAGS@ @EINA_CFLAGS@
+@EFL_ECORE_IPC_BUILD@ \
+@SSL_CFLAGS@ \
+@EINA_CFLAGS@
 
 lib_LTLIBRARIES = libecore_ipc.la
 includes_HEADERS = Ecore_Ipc.h
index 4024280..c9819e7 100644 (file)
 # include <winsock2.h>
 #endif
 
-#include "Ecore.h"
-#include "ecore_private.h"
-#include "Ecore_Con.h"
-#include "ecore_ipc_private.h"
+#if USE_GNUTLS_OPENSSL
+# include <gnutls/openssl.h>
+#elif USE_OPENSSL
+# include <openssl/ssl.h>
+#endif
+
+#include <Ecore.h>
+#include <ecore_private.h>
+#include <Ecore_Con.h>
+
 #include "Ecore_Ipc.h"
+#include "ecore_ipc_private.h"
 
 #define DLT_ZERO   0
 #define DLT_ONE    1
index b46f62b..57f7849 100644 (file)
@@ -34,20 +34,21 @@ extern int _ecore_ipc_log_dom;
 #endif
 #define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_ipc_log_dom, __VA_ARGS__)
 
-#if USE_GNUTLS_OPENSSL
-# include <gnutls/openssl.h>
-#elif USE_OPENSSL
-# include <openssl/ssl.h>
-#endif
-
 #define ECORE_MAGIC_IPC_SERVER             0x87786556
 #define ECORE_MAGIC_IPC_CLIENT             0x78875665
 
-typedef struct _Ecore_Ipc_Client Ecore_Ipc_Client;
-typedef struct _Ecore_Ipc_Server Ecore_Ipc_Server;
 typedef struct _Ecore_Ipc_Msg_Head Ecore_Ipc_Msg_Head;
 
 
+#if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
+# pragma pack(1)
+# define ECORE_IPC_STRUCT_PACKED
+#elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100)
+# define ECORE_IPC_STRUCT_PACKED __attribute__((packed))
+#else
+# define ECORE_IPC_STRUCT_PACKED
+#endif
+
 #ifdef __sgi
 #pragma pack 4
 #endif
@@ -59,11 +60,7 @@ struct _Ecore_Ipc_Msg_Head
       int ref_to;
       int response;
       int size;
-} 
-#ifdef _GNU_C_
-__attribute__ ((packed));
-#endif
-;
+} ECORE_IPC_STRUCT_PACKED;
 #ifdef __sgi
 #pragma pack 0
 #endif