[vlc-devel] commit: Remove HAVE_ATTRIBUTE_VISIBILITY - refs #297 ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon May 26 17:52:35 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Mon May 26 18:37:33 2008 +0300| [cd5d7f6391d47ff860cfecc71cad36ba5cf953a1]

Remove HAVE_ATTRIBUTE_VISIBILITY - refs #297

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd5d7f6391d47ff860cfecc71cad36ba5cf953a1
---

 include/vlc_common.h |   40 +++++++++++-----------------------------
 include/vlc_plugin.h |    3 ---
 2 files changed, 11 insertions(+), 32 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index bd81a06..a3fcd43 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -387,38 +387,20 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
  * Plug-in stuff
  *****************************************************************************/
 
+#ifdef __cplusplus
+# define LIBVLC_EXTERN extern "C"
+#else
+# define LIBVLC_EXTERN extern
+#endif
 #if defined (WIN32) && defined (DLL_EXPORT)
-#  ifdef __cplusplus
-#    define VLC_PUBLIC_API extern "C" __declspec(dllexport)
-#    define VLC_PRIVATE_API extern "C" __declspec(dllexport)
-#    define   VLC_EXPORT( type, name, args ) extern "C" __declspec(dllexport) type name args
-#  else
-#    define VLC_PUBLIC_API extern __declspec(dllexport)
-#    define VLC_PRIVATE_API extern __declspec(dllexport)
-#    define   VLC_EXPORT( type, name, args ) __declspec(dllexport) type name args
-#  endif
+# define LIBVLC_EXPORT __declspec(dllexport)
 #else
-#  ifdef __cplusplus
-#    ifdef HAVE_ATTRIBUTE_VISIBILITY
-#      define VLC_PUBLIC_API extern "C" __attribute__((visibility("default")))
-#      define VLC_PRIVATE_API extern "C" __attribute__((visibility("default")))
-#      define   VLC_EXPORT( type, name, args ) extern "C" __attribute__((visibility("default"))) type name args
-#    else
-#      define VLC_PUBLIC_API extern "C"
-#      define   VLC_EXPORT( type, name, args ) extern "C" type name args
-#    endif
-#  else
-#    ifdef HAVE_ATTRIBUTE_VISIBILITY
-#      define VLC_PUBLIC_API extern __attribute__((visibility("default")))
-#      define VLC_PRIVATE_API extern __attribute__((visibility("default")))
-#      define   VLC_EXPORT( type, name, args ) __attribute__((visibility("default"))) type name args
-#    else
-#      define VLC_PUBLIC_API extern
-#      define VLC_PRIVATE_API extern
-#      define   VLC_EXPORT( type, name, args ) extern type name args
-#    endif
-#  endif
+# define LIBVLC_EXPORT
 #endif
+#define VLC_PUBLIC_API  LIBVLC_EXTERN LIBVLC_EXPORT
+#define VLC_PRIVATE_API LIBVLC_EXTERN LIBVLC_EXPORT /* FIXME: dubious! */
+#define VLC_EXPORT( type, name, args ) \
+                        LIBVLC_EXTERN LIBVLC_EXPORT type name args
 
 /*****************************************************************************
  * OS-specific headers and thread types
diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index 134dfe2..7ee7f08 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -66,9 +66,6 @@
 #if defined( __PLUGIN__ ) && ( defined( WIN32 ) || defined( UNDER_CE ) )
 #   define DLL_SYMBOL              __declspec(dllexport)
 #   define CDECL_SYMBOL            __cdecl
-#elif defined (HAVE_ATTRIBUTE_VISIBILITY)
-#   define DLL_SYMBOL __attribute__((visibility("default")))
-#   define CDECL_SYMBOL
 #else
 #   define DLL_SYMBOL
 #   define CDECL_SYMBOL




More information about the vlc-devel mailing list