summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-12-18 23:33:50 +0400
committerIvan Maidanski <ivmai@mail.ru>2013-12-18 23:33:50 +0400
commit7635570ffa95f64f8d225f3c39a618c288d1c9f1 (patch)
treefadaafa8d84217a0a8fa68087d8dc525ee3833b3 /extra
parent09304d190755782866524aa9b6d06ea83f69a023 (diff)
downloadbdwgc-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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/extra/gc.c b/extra/gc.c
index fa70a0a8..a77fba65 100644
--- a/extra/gc.c
+++ b/extra/gc.c
@@ -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