add visibility attribute for GCC, now you can compile using -fvisibility=hidden

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8918 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-03-01 07:14:57 +00:00
commit 64fe0620cb

View file

@ -50,6 +50,12 @@
# endif
#endif
#if (__GNUC__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY
# endif
#endif
/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
@ -69,7 +75,11 @@
# define SWIGEXPORT __declspec(dllexport)
# endif
# else
# define SWIGEXPORT
# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
# define SWIGEXPORT __attribute__ ((visibility("default")))
# else
# define SWIGEXPORT
# endif
# endif
#endif