# HG changeset patch # User Ryan C. Gordon # Date 1262721823 18000 # Node ID d02c00ce16d9fd513e666bafc5a0400de644d944 # Parent 1c7d570fcee898a5755f8b4553f4591214f6171e Clean up symbol visibility in the stable-1.0 branch. diff -r 1c7d570fcee8 -r d02c00ce16d9 SDL_sound.h --- a/SDL_sound.h Tue Jan 27 14:09:55 2009 -0500 +++ b/SDL_sound.h Tue Jan 05 15:03:43 2010 -0500 @@ -79,6 +79,8 @@ #ifdef SDL_SOUND_DLL_EXPORTS # define SNDDECLSPEC __declspec(dllexport) +#elif (__GNUC__ >= 3) +# define SNDDECLSPEC __attribute__((visibility("default"))) #else # define SNDDECLSPEC #endif diff -r 1c7d570fcee8 -r d02c00ce16d9 configure.in --- a/configure.in Tue Jan 27 14:09:55 2009 -0500 +++ b/configure.in Tue Jan 05 15:03:43 2010 -0500 @@ -58,6 +58,30 @@ dnl --------------------------------------------------------------------- +dnl Have GCC's -fvisibility option? +dnl --------------------------------------------------------------------- +AC_MSG_CHECKING(for GCC -fvisibility=hidden option) +have_gcc_fvisibility=no +visibility_CFLAGS="-fvisibility=hidden" +save_CFLAGS="$CFLAGS" +CFLAGS="$save_CFLAGS $visibility_CFLAGS" +AC_TRY_COMPILE([ +#if !defined(__GNUC__) || __GNUC__ < 4 +#error SDL only uses visibility attributes in GCC 4 or newer +#endif +],[ +],[ +have_gcc_fvisibility=yes +]) +AC_MSG_RESULT($have_gcc_fvisibility) +CFLAGS="$save_CFLAGS" + +if test x$have_gcc_fvisibility = xyes; then + CFLAGS="$CFLAGS $visibility_CFLAGS" +fi + + +dnl --------------------------------------------------------------------- dnl Debug mode? dnl --------------------------------------------------------------------- diff -r 1c7d570fcee8 -r d02c00ce16d9 decoders/timidity/instrum_dls.c --- a/decoders/timidity/instrum_dls.c Tue Jan 27 14:09:55 2009 -0500 +++ b/decoders/timidity/instrum_dls.c Tue Jan 05 15:03:43 2010 -0500 @@ -51,9 +51,9 @@ struct _RIFF_Chunk *next; } RIFF_Chunk; -extern DECLSPEC RIFF_Chunk* SDLCALL LoadRIFF(SDL_RWops *src); -extern DECLSPEC void SDLCALL FreeRIFF(RIFF_Chunk *chunk); -extern DECLSPEC void SDLCALL PrintRIFF(RIFF_Chunk *chunk, int level); +extern RIFF_Chunk* LoadRIFF(SDL_RWops *src); +extern void FreeRIFF(RIFF_Chunk *chunk); +extern void PrintRIFF(RIFF_Chunk *chunk, int level); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*-------------------------------------------------------------------------*/ @@ -353,8 +353,8 @@ const char *comments; } DLS_Data; -extern DECLSPEC DLS_Data* SDLCALL LoadDLS(SDL_RWops *src); -extern DECLSPEC void SDLCALL FreeDLS(DLS_Data *chunk); +extern DLS_Data* LoadDLS(SDL_RWops *src); +extern void FreeDLS(DLS_Data *chunk); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*-------------------------------------------------------------------------*/