diff options
| author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2010-01-11 21:11:55 +0000 |
|---|---|---|
| committer | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2010-01-20 20:19:06 +0000 |
| commit | e3fe32b6a4ecb340fa7c9802285711cc52b8a101 (patch) | |
| tree | f70dcd0924f1d58e9b68ec47fae83d29696865d7 /src/git/common.h | |
| parent | 0ef9d2aa934d6e5861206e8c5dd829dc09f4026a (diff) | |
| download | libgit2-e3fe32b6a4ecb340fa7c9802285711cc52b8a101.tar.gz | |
Fix "'__thread' not at start of declaration" warnings (-Wextra)
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Diffstat (limited to 'src/git/common.h')
| -rw-r--r-- | src/git/common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/git/common.h b/src/git/common.h index c470e0e0a..375649f87 100644 --- a/src/git/common.h +++ b/src/git/common.h @@ -1,6 +1,8 @@ #ifndef INCLUDE_git_common_h__ #define INCLUDE_git_common_h__ +#include "thread-utils.h" + #ifdef __cplusplus # define GIT_BEGIN_DECL extern "C" { # define GIT_END_DECL } @@ -20,6 +22,16 @@ # define GIT_EXTERN(type) extern type #endif +/** Declare a public TLS symbol exported for application use. */ +#ifdef __GNUC__ +# define GIT_EXTERN_TLS(type) extern \ + __attribute__((visibility("default"))) \ + GIT_TLS \ + type +#else +# define GIT_EXTERN_TLS(type) extern GIT_TLS type +#endif + /** Declare a function as always inlined. */ #if defined(_MSC_VER) # define GIT_INLINE(type) static __inline type |
