summaryrefslogtreecommitdiff
path: root/gcj_mlc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2014-04-23 01:28:32 +0400
committerIvan Maidanski <ivmai@mail.ru>2014-04-23 01:28:32 +0400
commit36aa13da6c202b354537c08fa909f7bf122b420f (patch)
treee9a1ddfb70f1e7959c0a6786d5025dfebf4c3b7f /gcj_mlc.c
parent991ec30cfbfbfa7440aef32cb354d2d295cb9ac4 (diff)
downloadbdwgc-36aa13da6c202b354537c08fa909f7bf122b420f.tar.gz
Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page, GC_debug_malloc_atomic_ignore_off_page, GC_debug_malloc_stubborn, GC_debug_malloc_atomic, GC_debug_strdup, GC_debug_strndup, GC_debug_wcsdup, GC_debug_malloc_uncollectable, GC_debug_malloc_atomic_uncollectable, GC_debug_generic_or_special_malloc, GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute to API function definition (to avoid MS VC warning about redefinition of a symbol previously declared with __declspec). * fnlz_mlc.c (GC_finalized_malloc): Likewise. * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise. * malloc.c (GC_generic_malloc, GC_malloc_atomic, GC_malloc, GC_malloc_uncollectable): Likewise. * mallocx.c (GC_generic_or_special_malloc, GC_generic_malloc_ignore_off_page, GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page, GC_malloc_many, GC_memalign, GC_malloc_atomic_uncollectable, GC_strdup, GC_strndup, GC_wcsdup): Likewise. * stubborn.c (GC_malloc_stubborn): Likewise. * thread_local_alloc.c (GC_malloc, GC_malloc_atomic, GC_gcj_malloc): Likewise. * typd_mlc.c (GC_malloc_explicitly_typed, GC_malloc_explicitly_typed_ignore_off_page, GC_calloc_explicitly_typed): Likewise.
Diffstat (limited to 'gcj_mlc.c')
-rw-r--r--gcj_mlc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcj_mlc.c b/gcj_mlc.c
index c2aee253..195a215a 100644
--- a/gcj_mlc.c
+++ b/gcj_mlc.c
@@ -159,7 +159,7 @@ static void maybe_finalize(void)
GC_INNER void * GC_core_gcj_malloc(size_t lb,
void * ptr_to_struct_containing_descr)
#else
- GC_API void * GC_CALL GC_gcj_malloc(size_t lb,
+ GC_API GC_ATTR_MALLOC void * GC_CALL GC_gcj_malloc(size_t lb,
void * ptr_to_struct_containing_descr)
#endif
{
@@ -204,7 +204,7 @@ static void maybe_finalize(void)
/* Similar to GC_gcj_malloc, but add debug info. This is allocated */
/* with GC_gcj_debug_kind. */
-GC_API void * GC_CALL GC_debug_gcj_malloc(size_t lb,
+GC_API GC_ATTR_MALLOC void * GC_CALL GC_debug_gcj_malloc(size_t lb,
void * ptr_to_struct_containing_descr, GC_EXTRA_PARAMS)
{
void * result;
@@ -232,7 +232,7 @@ GC_API void * GC_CALL GC_debug_gcj_malloc(size_t lb,
}
/* There is no THREAD_LOCAL_ALLOC for GC_gcj_malloc_ignore_off_page(). */
-GC_API void * GC_CALL GC_gcj_malloc_ignore_off_page(size_t lb,
+GC_API GC_ATTR_MALLOC void * GC_CALL GC_gcj_malloc_ignore_off_page(size_t lb,
void * ptr_to_struct_containing_descr)
{
ptr_t op;