Commit e311519dce6c64b9ad5ce4e74a0dcef298d9ece7

Vicent Martí 2011-09-18T19:38:14

Merge pull request #411 from boyski/gcc4 Don't use '__attribute__ visibility' with gcc unless it's at version 4 or better

diff --git a/include/git2/common.h b/include/git2/common.h
index 1a595b0..0849816 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -22,7 +22,7 @@
 #endif
 
 /** Declare a public function exported for application use. */
-#ifdef __GNUC__
+#if __GNUC__ >= 4
 # define GIT_EXTERN(type) extern \
 			 __attribute__((visibility("default"))) \
 			 type
@@ -33,7 +33,7 @@
 #endif
 
 /** Declare a public TLS symbol exported for application use. */
-#ifdef __GNUC__
+#if __GNUC__ >= 4
 # define GIT_EXTERN_TLS(type) extern \
 					__attribute__((visibility("default"))) \
 					GIT_TLS \