API visibility support (GCC/SUNCC) (FSCORE-264)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12061 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2009-02-16 18:17:01 +00:00
parent 104c99ea85
commit ffe2ad4bbd
6 changed files with 175 additions and 15 deletions
+11 -3
View File
@@ -164,11 +164,19 @@ typedef int gid_t;
#define SWITCH_THREAD_FUNC __stdcall
#else //not win32
#define O_BINARY 0
#define SWITCH_DECLARE(type) type
#define SWITCH_DECLARE_NONSTD(type) type
#define SWITCH_MOD_DECLARE(type) type
#if (defined(__GNUC__) || defined(__SUNCC__)) && defined(SWITCH_API_VISIBILITY)
#define SWITCH_DECLARE(type) __attribute__((visibility("default"))) type
#define SWITCH_DECLARE_NONSTD(type) __attribute__((visibility("default"))) type
#define SWITCH_DECLARE_DATA __attribute__((visibility("default")))
#define SWITCH_MOD_DECLARE(type) __attribute__((visibility("default"))) type
#define SWITCH_MOD_DECLARE_DATA __attribute__((visibility("default")))
#else
#define SWITCH_DECLARE(type) type
#define SWITCH_DECLARE_NONSTD(type) type
#define SWITCH_DECLARE_DATA
#define SWITCH_MOD_DECLARE(type) type
#define SWITCH_MOD_DECLARE_DATA
#endif
#define SWITCH_THREAD_FUNC
#endif
#define SWITCH_DECLARE_CONSTRUCTOR SWITCH_DECLARE_DATA