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

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

View file

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