From 5e17a3eaac535abc59841793d34ce4a8049542b5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 9 Oct 2012 07:08:00 +0000 Subject: [PATCH] fix EINTERN to be more portable and not require e.h in mixer pulse SVN revision: 77613 --- src/modules/mixer/Pulse.h | 13 +++++++++++++ src/modules/mixer/pa.c | 3 +-- src/modules/mixer/pa.h | 22 +++++++++++++++++++--- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/modules/mixer/Pulse.h b/src/modules/mixer/Pulse.h index c4ac584..72ac3cc 100644 --- a/src/modules/mixer/Pulse.h +++ b/src/modules/mixer/Pulse.h @@ -4,6 +4,19 @@ #include #include +# ifdef EINTERN +# undef EINTERN +# endif +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EINTERN __attribute__ ((visibility("hidden"))) +# else +# define EINTERN +# endif +# else +# define EINTERN +# endif + #define PULSE_SUCCESS (void*)1 extern int PULSE_EVENT_CONNECTED; diff --git a/src/modules/mixer/pa.c b/src/modules/mixer/pa.c index aaab026..924a9e9 100644 --- a/src/modules/mixer/pa.c +++ b/src/modules/mixer/pa.c @@ -1,4 +1,3 @@ -#include "e.h" #include #include #include @@ -747,7 +746,7 @@ pulse_connect(Pulse *conn) return !!conn->svr; } -EINTERN void +void pulse_disconnect(Pulse *conn) { EINA_SAFETY_ON_NULL_RETURN(conn); diff --git a/src/modules/mixer/pa.h b/src/modules/mixer/pa.h index b8f4cb2..c5870f0 100644 --- a/src/modules/mixer/pa.h +++ b/src/modules/mixer/pa.h @@ -1,7 +1,9 @@ #ifndef PA_HACKS_H #define PA_HACKS_H -#include "e.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include #include @@ -17,14 +19,28 @@ # define __UNUSED__ __attribute__((unused)) #endif +# ifdef EINTERN +# undef EINTERN +# endif +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EINTERN __attribute__ ((visibility("hidden"))) +# else +# define EINTERN +# endif +# else +# define EINTERN +# endif + #define PA_PROTOCOL_VERSION 16 #define PA_NATIVE_COOKIE_LENGTH 256 #ifndef PA_MACHINE_ID # define PA_MACHINE_ID "/var/lib/dbus/machine-id" #endif -#undef _ -#define _(X) (X) +#ifndef _ +# define _(X) (X) +#endif #undef DBG #undef INF -- 2.7.4