ector: fix EAPI on Windows
authorVincent Torri <vincent.torri@gmail.com>
Tue, 15 Aug 2017 14:42:13 +0000 (16:42 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 15 Aug 2017 21:13:25 +0000 (14:13 -0700)
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/ector/Ector.h
src/lib/ector/cairo/Ector_Cairo.h
src/lib/ector/gl/Ector_GL.h
src/lib/ector/software/Ector_Software.h

index 2f479e1..ba0efb7 100644 (file)
@@ -185,4 +185,7 @@ EAPI Eina_Bool ector_glsym_set(void *(*glsym)(void *lib, const char *name), void
 }
 #endif
 
+#undef EAPI
+#define EAPI
+
 #endif
index b0c6058..b0f0f95 100644 (file)
@@ -3,6 +3,32 @@
 
 #include <Ector.h>
 
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+# ifdef EFL_ECTOR_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
+# else
+#  define EAPI __declspec(dllimport)
+# endif /* ! EFL_EO_BUILD */
+#else
+# ifdef __GNUC__
+#  if __GNUC__ >= 4
+#   define EAPI __attribute__ ((visibility("default")))
+#  else
+#   define EAPI
+#  endif
+# else
+#  define EAPI
+# endif
+#endif /* ! _WIN32 */
+
 #ifdef EFL_BETA_API_SUPPORT
 
 #ifndef _ECTOR_CAIRO_SURFACE_EO_CLASS_TYPE
@@ -23,4 +49,7 @@ typedef struct _cairo_t cairo_t;
 
 #endif
 
+#undef EAPI
+#define EAPI
+
 #endif
index df6ece4..d382ac2 100644 (file)
@@ -3,6 +3,32 @@
 
 #include <Ector.h>
 
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+# ifdef EFL_ECTOR_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
+# else
+#  define EAPI __declspec(dllimport)
+# endif /* ! EFL_EO_BUILD */
+#else
+# ifdef __GNUC__
+#  if __GNUC__ >= 4
+#   define EAPI __attribute__ ((visibility("default")))
+#  else
+#   define EAPI
+#  endif
+# else
+#  define EAPI
+# endif
+#endif /* ! _WIN32 */
+
 #ifdef EFL_BETA_API_SUPPORT
 
 #ifndef _ECTOR_GL_SURFACE_EO_CLASS_TYPE
@@ -24,4 +50,7 @@ typedef short        GLshort;
 
 #endif
 
+#undef EAPI
+#define EAPI
+
 #endif
index 7c94b89..1a43a29 100644 (file)
@@ -3,6 +3,32 @@
 
 #include <Ector.h>
 
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+# ifdef EFL_ECTOR_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
+# else
+#  define EAPI __declspec(dllimport)
+# endif /* ! EFL_EO_BUILD */
+#else
+# ifdef __GNUC__
+#  if __GNUC__ >= 4
+#   define EAPI __attribute__ ((visibility("default")))
+#  else
+#   define EAPI
+#  endif
+# else
+#  define EAPI
+# endif
+#endif /* ! _WIN32 */
+
 #ifdef EFL_BETA_API_SUPPORT
 
 #include "software/ector_software_surface.eo.h"
@@ -15,4 +41,7 @@
 
 #endif
 
+#undef EAPI
+#define EAPI
+
 #endif