diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2012-09-09 12:57:38 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2012-09-09 13:00:49 +0400 |
commit | 347e5ff7cae8f4d27e6a3b0f4ab7fc84854b29bb (patch) | |
tree | 423b7520a5df066520719c15df8107948bfc081d /include/gc_pthread_redirects.h | |
parent | 3e9fa7e2e86241629781fa595eeb215177b263a9 (diff) | |
download | bdwgc-347e5ff7cae8f4d27e6a3b0f4ab7fc84854b29bb.tar.gz |
Eliminate Clang warning for GC_pthread_exit attribute
* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_DECLARED): Test and
define new macro (only if GC_PTHREAD_EXIT_ATTRIBUTE) to prevent Clang
warning "attribute declaration must precede definition" for
GC_pthread_exit when this header included from extra/gc.c tail.
Diffstat (limited to 'include/gc_pthread_redirects.h')
-rw-r--r-- | include/gc_pthread_redirects.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/gc_pthread_redirects.h b/include/gc_pthread_redirects.h index b4b2b131..37cb249a 100644 --- a/include/gc_pthread_redirects.h +++ b/include/gc_pthread_redirects.h @@ -58,7 +58,8 @@ GC_API int GC_pthread_detach(pthread_t); GC_API int GC_pthread_cancel(pthread_t); #endif -#ifdef GC_PTHREAD_EXIT_ATTRIBUTE +#if defined(GC_PTHREAD_EXIT_ATTRIBUTE) && !defined(GC_PTHREAD_EXIT_DECLARED) +# define GC_PTHREAD_EXIT_DECLARED GC_API void GC_pthread_exit(void *) GC_PTHREAD_EXIT_ATTRIBUTE; #endif |