Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e523db51
Commit
e523db51
authored
Feb 05, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added support for visibility attribute for GCC 4.x for controlling export symbols
parent
ec497404
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
1 deletion
+44
-1
configure.ac
configure.ac
+31
-1
include/vlc/vlc.h
include/vlc/vlc.h
+2
-0
include/vlc_common.h
include/vlc_common.h
+8
-0
include/vlc_modules_macros.h
include/vlc_modules_macros.h
+3
-0
No files found.
configure.ac
View file @
e523db51
...
...
@@ -1011,6 +1011,26 @@ if test "${ac_cv_c_omit_frame_pointer}" != "no"; then
VLC_ADD_CFLAGS([i420_yuy2_mmx],[-fomit-frame-pointer])
fi
dnl Check for -fvisibility=hidden
AC_CACHE_CHECK([if \$CC accepts -fvisibility=hidden],
[ac_cv_c_visibility_hidden],
[CFLAGS="${CFLAGS_save} -fvisibility=hidden"
AC_TRY_COMPILE([],,ac_cv_c_visibility_hidden=yes, ac_cv_c_visibility_hidden=no)])
if test "${ac_cv_c_visibility_hidden}" != "no"; then
VLC_ADD_CFLAGS([libvlc],[-fvisibility=hidden])
VLC_ADD_CFLAGS([plugin],[-fvisibility=hidden])
fi
dnl Check for -fvisibility-inlines-hidden
AC_CACHE_CHECK([if \$CC accepts -fvisibility-inlines-hidden],
[ac_cv_c_visibility_inlines_hidden],
[CFLAGS="${CFLAGS_save} -fvisibility-inlines-hidden"
AC_TRY_COMPILE([],,ac_cv_c_visibility_inlines_hidden=yes, ac_cv_c_visibility_inlines_hidden=no)])
if test "${ac_cv_c_visibility_inlines_hidden}" != "no"; then
VLC_ADD_CFLAGS([libvlc],[-fvisibility-inlines-hidden])
VLC_ADD_CFLAGS([plugin],[-fvisibility-inlines-hidden])
fi
dnl Check for -mdynamic-no-pic
AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
[ac_cv_c_dynamic_no_pic],
...
...
@@ -1089,7 +1109,7 @@ if test "${ac_cv_c_attribute_format}" != "no"; then
AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
fi
dnl Check for __attribute__(())
dnl Check for __attribute__((
packed
))
AC_CACHE_CHECK([for __attribute__((packed))],
[ac_cv_c_attribute_packed],
[ac_cv_c_attribute_packed=no
...
...
@@ -1099,6 +1119,16 @@ if test "${ac_cv_c_attribute_packed}" != "no"; then
AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
fi
dnl Check for __attribute__((visibility()))
AC_CACHE_CHECK([for __attribute__((visibility()))],
[ac_cv_c_attribute_visibility],
[ac_cv_c_attribute_visibility=no
AC_TRY_COMPILE(, [extern __attribute__((visibility("default"))) int foo(int);],
[ac_cv_c_attribute_visibility=yes])])
if test "${ac_cv_c_attribute_visibility}" != "no"; then
AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1, Support for __attribute__((visibility())) for exporting symbols)
fi
dnl
dnl Check the CPU
dnl
...
...
include/vlc/vlc.h
View file @
e523db51
...
...
@@ -160,6 +160,8 @@ struct vlc_list_t
*****************************************************************************/
#if defined(WIN32) && defined(DLL_EXPORT)
# define VLC_PUBLIC_API extern __declspec(dllexport)
#elif HAVE_ATTRIBUTE_VISIBILITY
# define VLC_PUBLIC_API extern __attribute__((visibility("default")))
#else
# define VLC_PUBLIC_API extern
#endif
...
...
include/vlc_common.h
View file @
e523db51
...
...
@@ -480,6 +480,14 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
# define VLC_EXPORT( type, name, args ) __declspec(dllexport) type name args
# define VLC_INTERNAL( type, name, args ) type name args
# endif
#elif HAVE_ATTRIBUTE_VISIBILITY
# ifdef __cplusplus
# define VLC_EXPORT( type, name, args ) extern "C" __attribute__((visibility("default"))) type name args
# define VLC_INTERNAL( type, name, args ) extern "C" __attribute__((visibility("hidden"))) type name args
# else
# define VLC_EXPORT( type, name, args ) __attribute__((visibility("default"))) type name args
# define VLC_INTERNAL( type, name, args ) __attribute__((visibility("hidden"))) type name args
# endif
#else
# if !defined (__PLUGIN__) || defined (HAVE_SHARED_LIBVLC)
# ifdef __cplusplus
...
...
include/vlc_modules_macros.h
View file @
e523db51
...
...
@@ -71,6 +71,9 @@
#if defined( __PLUGIN__ ) && ( defined( WIN32 ) || defined( UNDER_CE ) )
# define DLL_SYMBOL __declspec(dllexport)
# define CDECL_SYMBOL __cdecl
#elif HAVE_ATTRIBUTE_VISIBILITY
# define DLL_SYMBOL __attribute__((visibility("default")))
# define CDECL_SYMBOL
#else
# define DLL_SYMBOL
# define CDECL_SYMBOL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment