From: Ivan Maidanski Date: Mon, 22 Aug 2011 11:49:57 +0000 (+0400) Subject: Remove gc_amiga_redirects.h (included internally) from public headers. X-Git-Tag: gc7_3alpha2~398 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d952e81c138b6cf1ade1d9f786844eb2c01eae8b;p=gc Remove gc_amiga_redirects.h (included internally) from public headers. * Makefile.direct (SRCS): Remove gc_amiga_redirects.h. * include/include.am (pkginclude_HEADERS): Ditto. * windows-untested/vc60/gc.dsp (SOURCE): Ditto. * windows-untested/vc60/libgc.dsp (SOURCE): Ditto. * windows-untested/vc70/gc.vcproj (Header Files): Ditto. * windows-untested/vc70/libgc.vcproj (Header Files): Ditto. * windows-untested/vc71/gc.vcproj (Header Files): Ditto. * windows-untested/vc71/libgc.vcproj (Header Files): Ditto. * include/gc.h: Insert the contents of gc_amiga_redirects.h instead of including it (only if _AMIGA and not GC_AMIGA_MAKINGLIB). * include/gc.h (GC_amiga_realloc, GC_amiga_set_toany): Remove "extern" keyword. * include/gc.h (GC_amiga_allocwrapper_do): Add GC_CALL to the function argument. * include/gc.h (GC_amiga_realloc, GC_amiga_set_toany, GC_amiga_allocwrapper_do): Remove identifiers for arguments from the declaration. --- diff --git a/Makefile.direct b/Makefile.direct index 4d268096..d0e19de2 100644 --- a/Makefile.direct +++ b/Makefile.direct @@ -100,7 +100,7 @@ SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \ hpux_test_and_clear.s include/gc_gcj.h \ include/private/dbg_mlc.h \ include/private/specific.h \ - include/leak_detector.h include/gc_amiga_redirects.h \ + include/leak_detector.h \ include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \ include/gc_config_macros.h include/private/pthread_support.h \ include/private/pthread_stop_world.h include/private/darwin_semaphore.h \ diff --git a/include/gc.h b/include/gc.h index ae7d046f..19d61f06 100644 --- a/include/gc.h +++ b/include/gc.h @@ -1440,9 +1440,27 @@ GC_API int GC_CALL GC_get_force_unmap_on_gcollect(void); GC_API void GC_CALL GC_win32_free_heap(void); #if defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) - /* Allocation really goes through GC_amiga_allocwrapper_do */ -# include "gc_amiga_redirects.h" -#endif + /* Allocation really goes through GC_amiga_allocwrapper_do. */ + void *GC_amiga_realloc(void *, size_t); +# define GC_realloc(a,b) GC_amiga_realloc(a,b) + void GC_amiga_set_toany(void (*)(void)); + extern int GC_amiga_free_space_divisor_inc; + extern void *(*GC_amiga_allocwrapper_do)(size_t, void *(GC_CALL *)(size_t)); +# define GC_malloc(a) \ + (*GC_amiga_allocwrapper_do)(a,GC_malloc) +# define GC_malloc_atomic(a) \ + (*GC_amiga_allocwrapper_do)(a,GC_malloc_atomic) +# define GC_malloc_uncollectable(a) \ + (*GC_amiga_allocwrapper_do)(a,GC_malloc_uncollectable) +# define GC_malloc_stubborn(a) \ + (*GC_amiga_allocwrapper_do)(a,GC_malloc_stubborn) +# define GC_malloc_atomic_uncollectable(a) \ + (*GC_amiga_allocwrapper_do)(a,GC_malloc_atomic_uncollectable) +# define GC_malloc_ignore_off_page(a) \ + (*GC_amiga_allocwrapper_do)(a,GC_malloc_ignore_off_page) +# define GC_malloc_atomic_ignore_off_page(a) \ + (*GC_amiga_allocwrapper_do)(a,GC_malloc_atomic_ignore_off_page) +#endif /* _AMIGA && !GC_AMIGA_MAKINGLIB */ #ifdef __cplusplus } /* end of extern "C" */ diff --git a/include/gc_amiga_redirects.h b/include/gc_amiga_redirects.h deleted file mode 100644 index 9e975c8c..00000000 --- a/include/gc_amiga_redirects.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef GC_AMIGA_REDIRECTS_H - -# define GC_AMIGA_REDIRECTS_H - -# if ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) ) - extern void *GC_amiga_realloc(void *old_object,size_t new_size_in_bytes); -# define GC_realloc(a,b) GC_amiga_realloc(a,b) - extern void GC_amiga_set_toany(void (*func)(void)); - extern int GC_amiga_free_space_divisor_inc; - extern void *(*GC_amiga_allocwrapper_do) \ - (size_t size,void *(*AllocFunction)(size_t size2)); -# define GC_malloc(a) \ - (*GC_amiga_allocwrapper_do)(a,GC_malloc) -# define GC_malloc_atomic(a) \ - (*GC_amiga_allocwrapper_do)(a,GC_malloc_atomic) -# define GC_malloc_uncollectable(a) \ - (*GC_amiga_allocwrapper_do)(a,GC_malloc_uncollectable) -# define GC_malloc_stubborn(a) \ - (*GC_amiga_allocwrapper_do)(a,GC_malloc_stubborn) -# define GC_malloc_atomic_uncollectable(a) \ - (*GC_amiga_allocwrapper_do)(a,GC_malloc_atomic_uncollectable) -# define GC_malloc_ignore_off_page(a) \ - (*GC_amiga_allocwrapper_do)(a,GC_malloc_ignore_off_page) -# define GC_malloc_atomic_ignore_off_page(a) \ - (*GC_amiga_allocwrapper_do)(a,GC_malloc_atomic_ignore_off_page) -# endif /* _AMIGA && !GC_AMIGA_MAKINGLIB */ - -#endif /* GC_AMIGA_REDIRECTS_H */ - - diff --git a/include/include.am b/include/include.am index 399e5420..9918c21a 100644 --- a/include/include.am +++ b/include/include.am @@ -17,42 +17,41 @@ # installed headers # pkginclude_HEADERS += \ - include/gc.h \ - include/gc_typed.h \ - include/gc_inline.h \ - include/gc_mark.h \ - include/gc_cpp.h \ - include/weakpointer.h \ - include/new_gc_alloc.h \ - include/gc_allocator.h \ - include/gc_backptr.h \ - include/gc_gcj.h \ - include/leak_detector.h \ - include/gc_amiga_redirects.h \ - include/gc_pthread_redirects.h \ - include/gc_config_macros.h \ - include/gc_tiny_fl.h \ - include/gc_version.h + include/gc.h \ + include/gc_typed.h \ + include/gc_inline.h \ + include/gc_mark.h \ + include/gc_cpp.h \ + include/weakpointer.h \ + include/new_gc_alloc.h \ + include/gc_allocator.h \ + include/gc_backptr.h \ + include/gc_gcj.h \ + include/leak_detector.h \ + include/gc_pthread_redirects.h \ + include/gc_config_macros.h \ + include/gc_tiny_fl.h \ + include/gc_version.h # headers which are not installed # dist_noinst_HEADERS += \ - include/private/gc_hdrs.h \ - include/private/gc_priv.h \ - include/private/gcconfig.h \ - include/private/gc_pmark.h \ - include/private/gc_locks.h \ - include/private/dbg_mlc.h \ - include/private/specific.h \ - include/private/cord_pos.h \ - include/private/pthread_support.h \ - include/private/pthread_stop_world.h \ - include/private/darwin_semaphore.h \ - include/private/darwin_stop_world.h \ - include/private/thread_local_alloc.h \ - include/cord.h \ - include/ec.h \ - include/javaxfc.h + include/private/gc_hdrs.h \ + include/private/gc_priv.h \ + include/private/gcconfig.h \ + include/private/gc_pmark.h \ + include/private/gc_locks.h \ + include/private/dbg_mlc.h \ + include/private/specific.h \ + include/private/cord_pos.h \ + include/private/pthread_support.h \ + include/private/pthread_stop_world.h \ + include/private/darwin_semaphore.h \ + include/private/darwin_stop_world.h \ + include/private/thread_local_alloc.h \ + include/cord.h \ + include/ec.h \ + include/javaxfc.h # unprefixed header include_HEADERS += \ diff --git a/windows-untested/vc60/gc.dsp b/windows-untested/vc60/gc.dsp index 0d6e8a54..e207fc54 100644 --- a/windows-untested/vc60/gc.dsp +++ b/windows-untested/vc60/gc.dsp @@ -221,10 +221,6 @@ SOURCE=..\..\include\gc_allocator.h # End Source File # Begin Source File -SOURCE=..\..\include\gc_amiga_redirects.h -# End Source File -# Begin Source File - SOURCE=..\..\include\gc_backptr.h # End Source File # Begin Source File diff --git a/windows-untested/vc60/libgc.dsp b/windows-untested/vc60/libgc.dsp index 16e64ca1..89b87732 100644 --- a/windows-untested/vc60/libgc.dsp +++ b/windows-untested/vc60/libgc.dsp @@ -210,10 +210,6 @@ SOURCE=..\..\include\gc_allocator.h # End Source File # Begin Source File -SOURCE=..\..\include\gc_amiga_redirects.h -# End Source File -# Begin Source File - SOURCE=..\..\include\gc_backptr.h # End Source File # Begin Source File diff --git a/windows-untested/vc70/gc.vcproj b/windows-untested/vc70/gc.vcproj index 39f56e4e..3e729267 100644 --- a/windows-untested/vc70/gc.vcproj +++ b/windows-untested/vc70/gc.vcproj @@ -246,9 +246,6 @@ - - diff --git a/windows-untested/vc70/libgc.vcproj b/windows-untested/vc70/libgc.vcproj index 9728b68a..2379aa22 100644 --- a/windows-untested/vc70/libgc.vcproj +++ b/windows-untested/vc70/libgc.vcproj @@ -209,9 +209,6 @@ - - diff --git a/windows-untested/vc71/gc.vcproj b/windows-untested/vc71/gc.vcproj index 924a76e4..804d5bbf 100644 --- a/windows-untested/vc71/gc.vcproj +++ b/windows-untested/vc71/gc.vcproj @@ -728,9 +728,6 @@ - - diff --git a/windows-untested/vc71/libgc.vcproj b/windows-untested/vc71/libgc.vcproj index 0e2c9b54..3af14694 100644 --- a/windows-untested/vc71/libgc.vcproj +++ b/windows-untested/vc71/libgc.vcproj @@ -689,9 +689,6 @@ - -