Mercurial > SDL_sound_CoreAudio
changeset 569:d02c00ce16d9 stable-1.0
Clean up symbol visibility in the stable-1.0 branch.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 05 Jan 2010 15:03:43 -0500 |
parents | 1c7d570fcee8 |
children | fa4ea28fd997 |
files | SDL_sound.h configure.in decoders/timidity/instrum_dls.c |
diffstat | 3 files changed, 31 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 ---------------------------------------------------------------------
--- 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); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*-------------------------------------------------------------------------*/