From af865ff1bd7a0635c14bf8070584b0e66d6c7a10 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 6 Aug 2011 17:21:07 -0700 Subject: [PATCH] Use hidden visibility by default --- CMakeLists.txt | 6 ++++++ dsound_private.h | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3ee9a3..352ed49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,12 @@ if(NOT MSVC) add_definitions(-Wextra) endif() endif() +if(NOT WIN32) + check_c_compiler_flag(-fvisibility=hidden HAVE_FVISIBILITY_HIDDEN) + if(HAVE_FVISIBILITY_HIDDEN) + add_definitions(-fvisibility=hidden) + endif() +endif() check_include_file(dsound.h HAVE_DSOUND_H) if(NOT HAVE_DSOUND_H) diff --git a/dsound_private.h b/dsound_private.h index 66a7a50..3113bb6 100644 --- a/dsound_private.h +++ b/dsound_private.h @@ -287,9 +287,6 @@ extern LPALSPEEDOFSOUND palSpeedOfSound; /* OpenAL only allows for 1 single access to the device at the same time */ extern CRITICAL_SECTION openal_crst; -extern const ALCchar *DSOUND_getdevicestrings(void); -extern const ALCchar *DSOUND_getcapturedevicestrings(void); - extern LPALCMAKECONTEXTCURRENT set_context; extern LPALCGETCURRENTCONTEXT get_context; extern BOOL local_contexts; @@ -542,12 +539,15 @@ struct DS8Buffer { DSBPOSITIONNOTIFY *notify; }; -extern HRESULT DS8Primary_PreInit(DS8Primary *prim, DS8Impl *parent); -extern void DS8Primary_Clear(DS8Primary *prim); -extern void DS8Primary_starttimer(DS8Primary *prim); +const ALCchar *DSOUND_getdevicestrings(void); +const ALCchar *DSOUND_getcapturedevicestrings(void); + +HRESULT DS8Primary_PreInit(DS8Primary *prim, DS8Impl *parent); +void DS8Primary_Clear(DS8Primary *prim); +void DS8Primary_starttimer(DS8Primary *prim); -extern HRESULT DS8Buffer_Create(DS8Buffer **ppv, DS8Primary *parent, IDirectSoundBuffer *orig); -extern void DS8Buffer_Destroy(DS8Buffer *buf); +HRESULT DS8Buffer_Create(DS8Buffer **ppv, DS8Primary *parent, IDirectSoundBuffer *orig); +void DS8Buffer_Destroy(DS8Buffer *buf); static inline ALdouble gain_to_mB(ALdouble gain) { -- 2.11.4.GIT