From 55d4370c5b5c308e8fd298882105add233a2a54a Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 13 Jun 2017 23:41:10 +0300 Subject: [PATCH] Move pcr_interface.c, real_malloc.c to 'extra' folder (code refactoring) * Makefile.am (EXTRA_DIST): Add extra/ prefix to pcr_interface.c, real_malloc.c. * PCR-Makefile (CSRC): Likewise. * PCR-Makefile (COBJ): Add extra/ prefix to pcr_interface.o, real_malloc.o. * extra/gc.c: Remove include pcr_interface.c; update comment about files which are not included. * pcr_interface.c: Move to "extra" folder. * real_malloc.c: Likewise. * include/private/gc_priv.h (GC_INNER, GC_EXTERN): Update comment. --- Makefile.am | 2 +- PCR-Makefile | 4 ++-- extra/gc.c | 3 +-- pcr_interface.c => extra/pcr_interface.c | 0 real_malloc.c => extra/real_malloc.c | 0 include/private/gc_priv.h | 5 ++--- 6 files changed, 6 insertions(+), 8 deletions(-) rename pcr_interface.c => extra/pcr_interface.c (100%) rename real_malloc.c => extra/real_malloc.c (100%) diff --git a/Makefile.am b/Makefile.am index 4d0174b..719c188 100644 --- a/Makefile.am +++ b/Makefile.am @@ -208,7 +208,7 @@ EXTRA_DIST += tools/if_mach.c tools/if_not_there.c tools/setjmp_t.c \ tools/threadlibs.c gc.mak extra/MacOS.c extra/AmigaOS.c \ extra/symbian/global_end.cpp extra/symbian/global_start.cpp \ extra/symbian/init_global_static_roots.cpp extra/symbian.cpp \ - pcr_interface.c real_malloc.c \ + extra/pcr_interface.c extra/real_malloc.c \ build/s60v3/bld.inf build/s60v3/libgc.mmp \ extra/Mac_files/datastart.c extra/Mac_files/dataend.c \ extra/Mac_files/MacOS_config.h \ diff --git a/PCR-Makefile b/PCR-Makefile index 28d1121..de26a9a 100644 --- a/PCR-Makefile +++ b/PCR-Makefile @@ -32,9 +32,9 @@ LDFLAGS = $(CONFIG_LDFLAGS) # Fix to point to local pcr installation directory. PCRDIR= .. -COBJ= alloc.o reclaim.o allchblk.o misc.o os_dep.o mark_rts.o headers.o mark.o obj_map.o pcr_interface.o blacklst.o finalize.o new_hblk.o real_malloc.o dyn_load.o dbg_mlc.o fnlz_mlc.o malloc.o stubborn.o checksums.o typd_mlc.o ptr_chck.o mallocx.o +COBJ= alloc.o reclaim.o allchblk.o misc.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o extra/pcr_interface.o extra/real_malloc.o dyn_load.o dbg_mlc.o fnlz_mlc.o malloc.o stubborn.o checksums.o typd_mlc.o ptr_chck.o mallocx.o -CSRC= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c fnlz_mlc.c malloc.c stubborn.c checksums.c typd_mlc.c ptr_chck.c mallocx.c +CSRC= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c blacklst.c finalize.c new_hblk.c extra/pcr_interface.c extra/real_malloc.c dyn_load.c dbg_mlc.c fnlz_mlc.c malloc.c stubborn.c checksums.c typd_mlc.c ptr_chck.c mallocx.c SHELL= /bin/sh diff --git a/extra/gc.c b/extra/gc.c index a77fba6..ea3648e 100644 --- a/extra/gc.c +++ b/extra/gc.c @@ -65,7 +65,6 @@ #include "../dyn_load.c" #include "../gc_dlopen.c" #include "../mach_dep.c" -#include "../pcr_interface.c" #include "../pthread_stop_world.c" #include "../pthread_support.c" #include "../specific.c" @@ -84,4 +83,4 @@ # include "gc_pthread_redirects.h" #endif -/* real_malloc.c, extra/MacOS.c, extra/msvc_dbg.c are not included. */ +/* The files from "extra" folder are not included. */ diff --git a/pcr_interface.c b/extra/pcr_interface.c similarity index 100% rename from pcr_interface.c rename to extra/pcr_interface.c diff --git a/real_malloc.c b/extra/real_malloc.c similarity index 100% rename from real_malloc.c rename to extra/real_malloc.c diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index ed2f171..25b88f6 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -126,8 +126,7 @@ typedef char * ptr_t; /* A generic pointer to which we can add */ /* for the GC-scope function definitions and prototypes. Must not be */ /* used in gcconfig.h. Shouldn't be used for the debugging-only */ /* functions. Currently, not used for the functions declared in or */ - /* called from the "dated" source files (pcr_interface.c and files */ - /* located in the "extra" folder). */ + /* called from the "dated" source files (located in "extra" folder). */ # if defined(GC_DLL) && defined(__GNUC__) && !defined(MSWIN32) \ && !defined(MSWINCE) && !defined(CYGWIN32) # if GC_GNUC_PREREQ(4, 0) && !defined(GC_NO_VISIBILITY) @@ -147,7 +146,7 @@ typedef char * ptr_t; /* A generic pointer to which we can add */ /* variables. Must not be used in gcconfig.h. Shouldn't be used for */ /* the debugging-only or profiling-only variables. Currently, not */ /* used for the variables accessed from the "dated" source files */ - /* (pcr_interface.c, specific.c/h, and in the "extra" folder). */ + /* (specific.c/h, and in the "extra" folder). */ /* The corresponding variable definition must start with GC_INNER. */ #endif /* !GC_INNER */ -- 2.7.4