Skip to content

Commit

Permalink
Clean up symbol visibility in the stable-1.0 branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 5, 2010
1 parent 414ac91 commit 849d4a6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
2 changes: 2 additions & 0 deletions SDL_sound.h
Expand Up @@ -79,6 +79,8 @@ extern "C" {

#ifdef SDL_SOUND_DLL_EXPORTS
# define SNDDECLSPEC __declspec(dllexport)
#elif (__GNUC__ >= 3)
# define SNDDECLSPEC __attribute__((visibility("default")))
#else
# define SNDDECLSPEC
#endif
Expand Down
24 changes: 24 additions & 0 deletions configure.in
Expand Up @@ -57,6 +57,30 @@ AC_PROG_LN_S
AM_PROG_LIBTOOL


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 ---------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions decoders/timidity/instrum_dls.c
Expand Up @@ -51,9 +51,9 @@ typedef struct _RIFF_Chunk {
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);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*-------------------------------------------------------------------------*/
Expand Down Expand Up @@ -353,8 +353,8 @@ typedef struct _DLS_Data {
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);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*-------------------------------------------------------------------------*/
Expand Down

0 comments on commit 849d4a6

Please sign in to comment.