[trunk] Use new gcc feature to actually hide exported symbols

Right now we are only using the Windows/POSIX compatibility layer. This means that we have only been marking explicitely which symbols to export.
What this also means is that for one to explicitely remove non-explicitely marked symbols, one has to set -fvisibility=hidden as CFLAGS
This commit is contained in:
Mathieu Malaterre 2012-09-10 12:38:22 +00:00
parent c8b8c4cf30
commit 0452ebdfcd
1 changed files with 7 additions and 0 deletions

View File

@ -53,7 +53,14 @@
#endif
#if defined(OPJ_STATIC) || !defined(_WIN32)
/* http://gcc.gnu.org/wiki/Visibility */
#if __GNUC__ >= 4
#define OPJ_API __attribute__ ((visibility ("default")))
#define OPJ_LOCAL __attribute__ ((visibility ("hidden")))
#else
#define OPJ_API
#define OPJ_LOCAL
#endif
#define OPJ_CALLCONV
#else
#define OPJ_CALLCONV __stdcall