Commit e0c405fa authored by Sam Lantinga's avatar Sam Lantinga

Default to use the visibility attribute, on gcc (is this okay?)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401578
parent 0fc4f947
......@@ -719,7 +719,7 @@ CheckVisibilityHidden()
CFLAGS="$save_CFLAGS"
if test x$have_gcc_fvisibility = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS -DDECLSPEC=SDL_GCC_ATTR_VIS_DEFAULT"
EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
fi
}
......
......@@ -31,20 +31,15 @@
#endif
#define _begin_code_h
#ifdef __GNUC__
#define SDL_GCC_ATTR_VIS_DEFAULT __attribute__((visibility("default")))
#endif
/* Some compilers use a special export keyword */
#ifndef DECLSPEC
# ifdef __BEOS__
# if defined(__BEOS__)
# if defined(__GNUC__)
# define DECLSPEC __declspec(dllexport)
# else
# define DECLSPEC __declspec(export)
# endif
# else
# ifdef __WIN32__
# elif defined(__WIN32__)
# ifdef __BORLANDC__
# ifdef BUILD_SDL
# define DECLSPEC
......@@ -54,8 +49,7 @@
# else
# define DECLSPEC __declspec(dllexport)
# endif
# else
# ifdef __OS2__
# elif defined(__OS2__)
# ifdef __WATCOMC__
# ifdef BUILD_SDL
# define DECLSPEC __declspec(dllexport)
......@@ -66,10 +60,12 @@
# define DECLSPEC
# endif
# else
# if defined(__GNUC__)
# define DECLSPEC __attribute__ ((visibility("default")))
# else
# define DECLSPEC
# endif
# endif
# endif
#endif
/* By default SDL uses the C calling convention */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment