Commits

Sepehr Taghdisian committed 8a83663

change export defines for gcc

Comments (0)

Files changed (3)

include/efsw/efsw.h

 		#endif
 	#endif
 #else
-	#if ( __GNUC__ >= 4 ) && defined( EFSW_EXPORTS )
-		#define EFSW_API __attribute__ ((visibility("default")))
+	#if ( __GNUC__ >= 4 )
+		#if defined( EFSW_EXPORTS )
+			#define EFSW_API __attribute__ ((visibility("protected")))
+		#else
+			#define EFSW_API __attribute__ ((visibility("default")))
+		#endif
 	#endif
 
 	// Other platforms don't need to define anything

include/efsw/efsw.hpp

 		#endif
 	#endif
 #else
-	#if ( __GNUC__ >= 4 ) && defined( EFSW_EXPORTS )
-		#define EFSW_API __attribute__ ((visibility("default")))
+	#if ( __GNUC__ >= 4 )
+		#if defined( EFSW_EXPORTS )
+			#define EFSW_API __attribute__ ((visibility("protected")))
+		#else
+			#define EFSW_API __attribute__ ((visibility("default")))
+		#endif
 	#endif
 
 	// Other platforms don't need to define anything
     if compiler_is_msvc(conf):
         conf.env.append_unique('DEFINES', ['_CRT_SECURE_NO_WARNINGS', '_CRT_NONSTDC_NO_DEPRECATE',
             '_SCL_SECURE_NO_WARNINGS', '_MBCS'])
+    else:
+        conf.env.append_unique('CXXFLAGS', '-fvisibility=internal')
 
     # debug specific flags
     base_env = conf.env.derive()