diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2013-12-18 23:33:50 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2013-12-18 23:33:50 +0400 |
commit | 7635570ffa95f64f8d225f3c39a618c288d1c9f1 (patch) | |
tree | fadaafa8d84217a0a8fa68087d8dc525ee3833b3 /extra | |
parent | 09304d190755782866524aa9b6d06ea83f69a023 (diff) | |
download | bdwgc-7635570ffa95f64f8d225f3c39a618c288d1c9f1.tar.gz |
Fix 'attribute declaration must precede definition' warning (clang-3.1)
* extra/gc.c: Include gc_inline.h explicitly before including mallocx.c
(to workaround "attribute declaration must precede definition" warning
reported by clang-3.1 for GC_generic_malloc_many); define
GC_PTHREAD_REDIRECTS_ONLY before including gc_pthread_redirects.h.
* include/gc_pthread_redirects.h (GC_dlopen, GC_pthread_sigmask,
GC_PTHREAD_CREATE_CONST, GC_pthread_create, GC_pthread_join,
GC_pthread_detach, GC_pthread_cancel, GC_pthread_exit): Do not declare
if GC_PTHREAD_REDIRECTS_ONLY defined (to workaround
"attribute declaration must precede definition" warning reported by
clang-3.1).
Diffstat (limited to 'extra')
-rw-r--r-- | extra/gc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -44,6 +44,7 @@ #include "../ptr_chck.c" #include "../stubborn.c" +#include "gc_inline.h" #include "../allchblk.c" #include "../alloc.c" #include "../dbg_mlc.c" @@ -79,6 +80,7 @@ /* This is only useful if directly included from application */ /* (instead of linking gc). */ #ifndef GC_NO_THREAD_REDIRECTS +# define GC_PTHREAD_REDIRECTS_ONLY # include "gc_pthread_redirects.h" #endif |