Default to use the visibility attribute, on gcc (is this okay?)
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401578
This commit is contained in:
parent
0fc4f94726
commit
e0c405fad1
2 changed files with 13 additions and 17 deletions
|
@ -719,7 +719,7 @@ CheckVisibilityHidden()
|
||||||
CFLAGS="$save_CFLAGS"
|
CFLAGS="$save_CFLAGS"
|
||||||
|
|
||||||
if test x$have_gcc_fvisibility = xyes; then
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,44 +31,40 @@
|
||||||
#endif
|
#endif
|
||||||
#define _begin_code_h
|
#define _begin_code_h
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#define SDL_GCC_ATTR_VIS_DEFAULT __attribute__((visibility("default")))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Some compilers use a special export keyword */
|
/* Some compilers use a special export keyword */
|
||||||
#ifndef DECLSPEC
|
#ifndef DECLSPEC
|
||||||
# ifdef __BEOS__
|
# if defined(__BEOS__)
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__)
|
||||||
# define DECLSPEC __declspec(dllexport)
|
# define DECLSPEC __declspec(dllexport)
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC __declspec(export)
|
# define DECLSPEC __declspec(export)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# elif defined(__WIN32__)
|
||||||
# ifdef __WIN32__
|
|
||||||
# ifdef __BORLANDC__
|
# ifdef __BORLANDC__
|
||||||
# ifdef BUILD_SDL
|
# ifdef BUILD_SDL
|
||||||
# define DECLSPEC
|
# define DECLSPEC
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC __declspec(dllimport)
|
# define DECLSPEC __declspec(dllimport)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC __declspec(dllexport)
|
# define DECLSPEC __declspec(dllexport)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# elif defined(__OS2__)
|
||||||
# ifdef __OS2__
|
|
||||||
# ifdef __WATCOMC__
|
# ifdef __WATCOMC__
|
||||||
# ifdef BUILD_SDL
|
# ifdef BUILD_SDL
|
||||||
# define DECLSPEC __declspec(dllexport)
|
# define DECLSPEC __declspec(dllexport)
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC
|
# define DECLSPEC
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC
|
# define DECLSPEC
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC
|
# if defined(__GNUC__)
|
||||||
# endif
|
# define DECLSPEC __attribute__ ((visibility("default")))
|
||||||
# endif
|
# else
|
||||||
|
# define DECLSPEC
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue