diff --git a/legacy/ecore/ChangeLog b/legacy/ecore/ChangeLog index 9266d94af2..b26b72f533 100644 --- a/legacy/ecore/ChangeLog +++ b/legacy/ecore/ChangeLog @@ -181,3 +181,4 @@ * Make ecore_con work on Windows (only the local connections need a port) + * Make ecore_ipc compile on Windows diff --git a/legacy/ecore/configure.ac b/legacy/ecore/configure.ac index aabb223757..d6c39dc0fc 100644 --- a/legacy/ecore/configure.ac +++ b/legacy/ecore/configure.ac @@ -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) diff --git a/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h b/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h index 000fca9150..fa12b40c4b 100644 --- a/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h +++ b/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h @@ -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 @@ -31,11 +35,9 @@ #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 diff --git a/legacy/ecore/src/lib/ecore_ipc/Makefile.am b/legacy/ecore/src/lib/ecore_ipc/Makefile.am index 03b392d56d..9cbed43df6 100644 --- a/legacy/ecore/src/lib/ecore_ipc/Makefile.am +++ b/legacy/ecore/src/lib/ecore_ipc/Makefile.am @@ -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 diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c index 4024280e8f..c9819e7801 100644 --- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c +++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c @@ -13,11 +13,18 @@ # include #endif -#include "Ecore.h" -#include "ecore_private.h" -#include "Ecore_Con.h" -#include "ecore_ipc_private.h" +#if USE_GNUTLS_OPENSSL +# include +#elif USE_OPENSSL +# include +#endif + +#include +#include +#include + #include "Ecore_Ipc.h" +#include "ecore_ipc_private.h" #define DLT_ZERO 0 #define DLT_ONE 1 diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h index b46f62bfef..57f784976d 100644 --- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h +++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h @@ -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 -#elif USE_OPENSSL -# include -#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