eina: fixup EAPI definition.
authorCedric BAIL <cedric@osg.samsung.com>
Tue, 19 Dec 2017 17:54:45 +0000 (09:54 -0800)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 10 Jan 2018 11:08:13 +0000 (20:08 +0900)
src/lib/eina/eina_internal.h

index 391ad94..acf55fe 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef EINA_INTERNAL_H
-#define EINA_INTERNAL_H
+# define EINA_INTERNAL_H
 
 /*
  * eina_internal.h
@@ -8,9 +8,49 @@
  * not stable API.
  */
 
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+# ifdef EFL_EINA_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
+# else
+#  define EAPI __declspec(dllimport)
+# endif /* ! EFL_EINA_BUILD */
+# define EAPI_WEAK
+#else
+# ifdef __GNUC__
+#  if __GNUC__ >= 4
+#   define EAPI __attribute__ ((visibility("default")))
+#   define EAPI_WEAK __attribute__ ((weak))
+#  else
+#   define EAPI
+#   define EAPI_WEAK
+#  endif
+# else
+/**
+ * @def EAPI
+ * @brief Used to export functions (by changing visibility).
+ */
+#  define EAPI
+# endif
+#endif
+
 /**
  * @brief Cancels all pending promise/futures.
+ *
+ * Internal function. Do not use.
+ *
+ * @internal
  */
 EAPI void __eina_promise_cancel_all(void);
 
+#undef EAPI
+#define EAPI
+
 #endif