elementary: fix ELM_MAIN macro to properly expose symbol.
authorCedric BAIL <cedric@osg.samsung.com>
Tue, 7 Nov 2017 23:51:52 +0000 (15:51 -0800)
committerCedric BAIL <cedric@osg.samsung.com>
Wed, 8 Nov 2017 00:08:39 +0000 (16:08 -0800)
src/lib/elementary/Elementary.h

index 9cfd3ad..3913084 100644 (file)
@@ -85,6 +85,7 @@
 #endif
 
 #ifdef _WIN32
+# define EAPI_MAIN
 # ifdef ELEMENTARY_BUILD
 #  ifdef DLL_EXPORT
 #   define EAPI __declspec(dllexport)
 # ifdef __GNUC__
 #  if __GNUC__ >= 4
 #   define EAPI __attribute__ ((visibility("default")))
+#   define EAPI_MAIN __attribute__ ((visibility("default")))
 #  else
 #   define EAPI
+#   define EAPI_MAIN
 #  endif
 # else
 #  define EAPI
+#  define EAPI_MAIN
 # endif
 #endif /* ! _WIN32 */
 
-#ifdef _WIN32
-# define EAPI_MAIN
-#else
-# define EAPI_MAIN EAPI
-#endif
-
 /* allow usage from c++ */
 #ifdef __cplusplus
 extern "C"