]> granicus.if.org Git - gc/log
gc
7 years agoUpdate GCJ link in documentation
Ivan Maidanski [Fri, 16 Jun 2017 07:45:02 +0000 (10:45 +0300)]
Update GCJ link in documentation

* doc/gcdescr.html: Replace http://gcc.gnu.org/java link (which now
points to GCC itself) with https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcj/
one.
* doc/overview.html: Likewise.

7 years agoDocument GWW_VDB in gcdescr.html
Ivan Maidanski [Fri, 16 Jun 2017 07:39:16 +0000 (10:39 +0300)]
Document GWW_VDB in gcdescr.html

* doc/gcdescr.html (Generational Collection and Dirty Bits): Document
GWW_VDB.

7 years agoTravis CI: Update after changing configure to use atomic intrinsics
Ivan Maidanski [Thu, 15 Jun 2017 09:10:09 +0000 (12:10 +0300)]
Travis CI: Update after changing configure to use atomic intrinsics

7 years agoUse compiler atomic intrinsics by default if available (configure)
Ivan Maidanski [Thu, 15 Jun 2017 08:30:57 +0000 (11:30 +0300)]
Use compiler atomic intrinsics by default if available (configure)

* README.md (Installation and Portability): Update information about
libatomic_ops usage.
* configure.ac [with_libatomic_ops=check]: AC_TRY_RUN(test_atomic_ops.c)
(before PKG_CHECK_MODULES(ATOMIC_OPS)) with -D GC_BUILTIN_ATOMIC
added to CFLAGS; set with_libatomic_ops to none if test_atomic_ops
succeeds (unless cross-compiling).

7 years agoAdd test_atomic_ops to perform minimal testing of used atomic primitives
Ivan Maidanski [Wed, 14 Jun 2017 09:16:00 +0000 (12:16 +0300)]
Add test_atomic_ops to perform minimal testing of used atomic primitives

The main purpose of test_atomic_ops is to be able to check whether
it is safe to use compiler atomic intrinsics (enabled by defining
GC_BUILTIN_ATOMIC macro).

* tests/test_atomic_ops.c: New file.
* tests/tests.am [THREADS] (TESTS, check_PROGRAMS): Add
test_atomic_ops.
* tests/tests.am [THREADS] (test_atomic_ops_SOURCES,
test_atomic_ops_LDADD): New variable.
* tests/tests.am (check-without-test-driver): Run test_atomic_ops (if
available).

7 years ago.gitignore: Ignore test_atomic_ops
Ivan Maidanski [Wed, 14 Jun 2017 07:57:15 +0000 (10:57 +0300)]
.gitignore: Ignore test_atomic_ops

7 years agoTravis CI: Scan pcr_interface.c, real_malloc.c in extra (CSA, cppcheck)
Ivan Maidanski [Tue, 13 Jun 2017 20:57:51 +0000 (23:57 +0300)]
Travis CI: Scan pcr_interface.c, real_malloc.c in extra (CSA, cppcheck)

7 years agoMove pcr_interface.c, real_malloc.c to 'extra' folder
Ivan Maidanski [Tue, 13 Jun 2017 20:41:10 +0000 (23:41 +0300)]
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.

7 years agoUpdate Download information in GC overview document
Ivan Maidanski [Tue, 13 Jun 2017 18:31:52 +0000 (21:31 +0300)]
Update Download information in GC overview document

* doc/overview.html: Change Download page link to that on GitHub; add
BDWGC acronym; remove link to gc.tar.gz; recommend to download
"recent stable" version; remove link to ancient boehm-gc in gcc;
provide link to the list of changes (for each version).

7 years agoTravis CI: Use configure --with-checksums instead of -D CHECKSUMS
Ivan Maidanski [Fri, 9 Jun 2017 16:53:22 +0000 (19:53 +0300)]
Travis CI: Use configure --with-checksums instead of -D CHECKSUMS

7 years agoCompile checksums.c only if --with-checksums is given (configure)
Ivan Maidanski [Fri, 9 Jun 2017 16:42:54 +0000 (19:42 +0300)]
Compile checksums.c only if --with-checksums is given (configure)

New configure option (--with-checksums) is added, mainly to workaround
'checksums.a has no symbols' link warning (observed on Darwin).

* Makefile.am [!SINGLE_GC_OBJ] (libgc_la_SOURCES): Do not add checksums.c
unless CHECKSUMS.
* configure.ac (checksums): New AC_ARG_WITH.
* configure.ac [with_checksums && (enable_munmap || THREADS!=none)]:
Issue AC_MSG_ERROR.
* configure.ac (CHECKSUMS): New AC_DEFINE and AM_CONDITIONAL if
with_checksums.

7 years agoSupport with_checksums option in CMake script
Ivan Maidanski [Fri, 9 Jun 2017 16:05:35 +0000 (19:05 +0300)]
Support with_checksums option in CMake script

* CMakeLists.txt (with_checksums): New option (off by default).
* CMakeLists.txt [with_checksums && enable_threads]: Issue MESSAGE that
the configuration is not supported.
* CMakeLists.txt [with_checksums] (CHECKSUMS): Define macro.
* CMakeLists.txt [with_checksums] (SRC): Add checksums.c.

7 years agoDo not produce .tar.bz2 distribution file (configure)
Ivan Maidanski [Fri, 9 Jun 2017 08:05:00 +0000 (11:05 +0300)]
Do not produce .tar.bz2 distribution file (configure)

* configure.ac (AM_INIT_AUTOMAKE): Remove dist-bzip2.

7 years agoFix non-Linux configure-based builds
Ivan Maidanski [Thu, 8 Jun 2017 10:11:58 +0000 (13:11 +0300)]
Fix non-Linux configure-based builds
(fix commit 8240ed0)

* configure.ac (pthread_start_standalone): New variable.
* configure.ac [*-*-*linux* && THREADS=posix] (pthread_start_standalone):
Set to yes (instead of AM_CONDITIONAL(PTHREAD_START_STANDALONE) directly).
* configure.ac (PTHREAD_START_STANDALONE): AM_CONDITIONAL if
pthread_start_standalone.

7 years agoFix pthread_start compilation if single-obj-compilation (Linux)
Ivan Maidanski [Thu, 8 Jun 2017 08:40:36 +0000 (11:40 +0300)]
Fix pthread_start compilation if single-obj-compilation (Linux)

* Makefile.am [SINGLE_GC_OBJ && PTHREAD_START_STANDALONE] (AM_CPPFLAGS):
Add -DGC_PTHREAD_START_STANDALONE.
* Makefile.am [SINGLE_GC_OBJ && PTHREAD_START_STANDALONE]
(libgc_la_SOURCES): Add pthread_start.c entry.
* Makefile.am: Add bank lines (to improve readability).
* configure.ac [*-*-*linux*]: Add AM_CONDITIONAL(PTHREAD_START_STANDALONE).

7 years agoFix PCR-Makefile by removing compilation of a missing file
Ivan Maidanski [Thu, 8 Jun 2017 08:09:55 +0000 (11:09 +0300)]
Fix PCR-Makefile by removing compilation of a missing file

* PCR-Makefile (COBJ): Remove solaris_threads.o entry.
* PCR-Makefile (CSRC): Remove solaris_threads.c entry.

7 years agoDo not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
Ivan Maidanski [Wed, 7 Jun 2017 22:16:58 +0000 (01:16 +0300)]
Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile

These .c files are empty compilation units for targets other than PCR.

* Makefile.am (libgc_la_SOURCES): Remove pcr_interface.c, real_malloc.c.
* Makefile.direct (CSRCS): Likewise.
* Makefile.am (EXTRA_DIST): Add pcr_interface.c, real_malloc.c.
* SMakefile.amiga (OBJS): Remove real_malloc.o.
* SMakefile.amiga (real_malloc.o): Remove.

7 years agowindows-untested: Do not build gc_dlopen/pcr_interface/real_malloc/specific
Ivan Maidanski [Wed, 7 Jun 2017 22:05:52 +0000 (01:05 +0300)]
windows-untested: Do not build gc_dlopen/pcr_interface/real_malloc/specific

These .c files do not define anything for Windows platform.

7 years agoTravis CI: Test also configure --disable-thread-local-alloc
Ivan Maidanski [Wed, 7 Jun 2017 21:46:11 +0000 (00:46 +0300)]
Travis CI: Test also configure --disable-thread-local-alloc

7 years agoSupport configure --disable-thread-local-alloc option (similar for CMake)
Ivan Maidanski [Wed, 7 Jun 2017 21:42:30 +0000 (00:42 +0300)]
Support configure --disable-thread-local-alloc option (similar for CMake)

* CMakeLists.txt (enable_thread_local_alloc): New option (on by
default).
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT
|| CMAKE_USE_WIN32_THREADS_INIT] (SRC): Add thread_local_alloc.c only
if enable_thread_local_alloc.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT
|| CMAKE_USE_WIN32_THREADS_INIT]: Define THREAD_LOCAL_ALLOC macro only
if enable_thread_local_alloc.

* Makefile.am (libgc_la_SOURCES): Add thread_local_alloc.c only if
THREAD_LOCAL_ALLOC.
* configure.ac (thread-local-alloc): New option.
* configure.ac: AC_DEFINE(THREAD_LOCAL_ALLOC) only if
enable_thread_local_alloc is yes or unset.
* configure.ac (THREAD_LOCAL_ALLOC): New AM_CONDITIONAL.

7 years agoGroup common defines for POSIX platforms in configure and CMake scripts
Ivan Maidanski [Wed, 7 Jun 2017 08:53:14 +0000 (11:53 +0300)]
Group common defines for POSIX platforms in configure and CMake scripts
(code refactoring)

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Eliminate duplication of
ADD_DEFINITIONS of GC_THREADS, _REENTRANT, PARALLEL_MARK,
THREAD_LOCAL_ALLOC (and AC_MSG_WARN) for aix, cygwin, darwin, freebsd,
gnu (including kfreebsd), hpux11, irix, linux, nacl, netbsd, openbsd,
osf, solaris platforms; add comment.
* configure.ac [THREADS=posix]: Likewise.
* configure.ac [THREADS=posix]: Remove explicit hpux10 case handling.

7 years agoEliminate 'unused variable' compiler warning in remove_all_threads_but_me
Ivan Maidanski [Wed, 7 Jun 2017 07:18:28 +0000 (10:18 +0300)]
Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
(fix commit 0fc61f2)

* pthread_support.c [CAN_HANDLE_FORK] (GC_remove_all_threads_but_me):
Declare "res" local variable only if THREAD_LOCAL_ALLOC and
not USE_CUSTOM_SPECIFIC.

7 years agoRemove extraneous semicolons after AC_MSG_WARN (configure)
Ivan Maidanski [Tue, 6 Jun 2017 22:14:16 +0000 (01:14 +0300)]
Remove extraneous semicolons after AC_MSG_WARN (configure)

* configure.ac (AC_MSG_WARN): Remove trailing ';' symbol.

7 years agoFix broken external links in documentation
Ivan Maidanski [Tue, 6 Jun 2017 22:00:26 +0000 (01:00 +0300)]
Fix broken external links in documentation

* doc/gcdescr.html: Replace broken URLs to external document with
working ones.
* doc/overview.html: Likewise.

7 years agoFix URL to GitHub bdwgc master in overview.html
Ivan Maidanski [Tue, 6 Jun 2017 21:40:21 +0000 (00:40 +0300)]
Fix URL to GitHub bdwgc master in overview.html
(fix commit e3456e4)

* doc/overview.html (Contacts and new release announcements): Correct
link to GitHub bdwgc master.

7 years agoUpdate documentation about bugs reporting and new releases notification
Ivan Maidanski [Tue, 6 Jun 2017 07:30:50 +0000 (10:30 +0300)]
Update documentation about bugs reporting and new releases notification

* README.md (Download): Add link to BDWGC Download page on GitHub.
* README.md (Overview): Change link (for the further information) from
hboehm.info/gc to doc/overview.html.
* README.md (Bugs): Remove information about bugs reporting from this
section.
* README.md (Feedback, Contribution, Questions and Notifications): New
section.
* configure.ac (AC_INIT): Change URI for reporting bugs.
* doc/gc.man (SEE ALSO): Add link to the BDWGC main page on GitHub.
* doc/gcdescr.html: Remove information how to provide feedback.
* doc/overview.html (Contacts and Mailing List): Update information
(recommend use of GitHub and Stack Overflow, provide links to the
archives of the former mailing lists).

7 years agoUpdate several email addresses in AUTHORS file
Ivan Maidanski [Thu, 1 Jun 2017 19:14:09 +0000 (22:14 +0300)]
Update several email addresses in AUTHORS file

7 years agoUpdate ChangeLog file
Ivan Maidanski [Wed, 31 May 2017 20:15:01 +0000 (23:15 +0300)]
Update ChangeLog file

7 years agoUpdate ChangeLog file (v7.6 changes only)
Ivan Maidanski [Wed, 31 May 2017 18:10:07 +0000 (21:10 +0300)]
Update ChangeLog file (v7.6 changes only)

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Wed, 31 May 2017 17:27:58 +0000 (20:27 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoTravis CI: Test --with-libatomic-ops=none instead of -D GC_BUILTIN_ATOMIC
Ivan Maidanski [Tue, 30 May 2017 08:10:15 +0000 (11:10 +0300)]
Travis CI: Test --with-libatomic-ops=none instead of -D GC_BUILTIN_ATOMIC

7 years agoAllow configure --with-libatomic-ops=none to use GCC atomic intrinsics
Ivan Maidanski [Tue, 30 May 2017 08:08:14 +0000 (11:08 +0300)]
Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics

* configure.ac (libatomic-ops): Allow "none" value for
--with-libatomic-ops option; update help message; use "none" as the
default value if THREADS=none.
* configure.ac [with_libatomic_ops!=no]: Refine comment; call
PKG_CHECK_MODULES(ATOMIC_OPS) only if with_libatomic_ops!=none.
* configure.ac [with_libatomic_ops!=no] (which libatomic_ops to use):
If with_libatomic_ops = none and THREADS != none then
AC_MSG_RESULT(none) and AC_DEFINE(GC_BUILTIN_ATOMIC).

7 years agoTravis CI: Test without clone libatomic_ops
Ivan Maidanski [Tue, 30 May 2017 07:34:49 +0000 (10:34 +0300)]
Travis CI: Test without clone libatomic_ops

7 years agoTravis CI: Fix 'make distcheck' failure caused by missing libatomic_ops
Ivan Maidanski [Mon, 29 May 2017 08:12:14 +0000 (11:12 +0300)]
Travis CI: Fix 'make distcheck' failure caused by missing libatomic_ops
(fix commit e2f72bd)

7 years agoFix external libatomic_ops pkg-config-based detection
Ivan Maidanski [Mon, 29 May 2017 07:51:44 +0000 (10:51 +0300)]
Fix external libatomic_ops pkg-config-based detection

Fall back to AC_CHECK_HEADER-based detection of libatomic_ops library
if PKG_CHECK_MODULES failed to find the library.

* configure.ac [missing_libatomic_ops=true]: Call
AC_CHECK_HEADER(atomic_ops.h) and set missing_libatomic_ops=false if
atomic_ops.h is found; add comment.

7 years agoDo not require libatomic_ops for single-threaded builds (configure)
Ivan Maidanski [Mon, 29 May 2017 07:37:12 +0000 (10:37 +0300)]
Do not require libatomic_ops for single-threaded builds (configure)

* configure.ac [with_libatomic_ops!=no]: Do not call
PKG_CHECK_MODULES(ATOMIC_OPS) if THREADS = none
* configure.ac [with_libatomic_ops!=no] (which libatomic_ops to use):
Report "none" if if THREADS = none.

7 years agoImprove detection of internal libatomic_ops (configure)
Ivan Maidanski [Mon, 29 May 2017 07:22:39 +0000 (10:22 +0300)]
Improve detection of internal libatomic_ops (configure)

* configure.ac [with_libatomic_ops=no]: Check presence of
libatomic_ops/src/atomic_ops.h file instead of libatomic_ops/src
folder.

7 years agoUpdate AUTHORS file (add Bernd Kuhls)
Ivan Maidanski [Mon, 29 May 2017 06:39:10 +0000 (09:39 +0300)]
Update AUTHORS file (add Bernd Kuhls)

7 years agoFix 'missing libc-version.h' build error (uClibc/x86[_64])
Bernd Kuhls [Sun, 28 May 2017 18:21:09 +0000 (20:21 +0200)]
Fix 'missing libc-version.h' build error (uClibc/x86[_64])
(fix commit 3d34255)

uClibc defines __GLIBC__ but does not contain libc-version.h file.

* include/private/gcconfig.h [(I386 || X86_64) && LINUX && __GLIBC__]
(GLIBC_2_19_TSX_BUG): Do not define (and do not include
gnu/libc-version.h) if __UCLIBC__.

7 years agoFix typo in configure help message
Ivan Maidanski [Wed, 24 May 2017 21:37:01 +0000 (00:37 +0300)]
Fix typo in configure help message

* ChangeLog: Fix a typo ("an").
* configure.ac (libatomic-ops): Fix a typo ("an") in help message.

7 years agoWorkaround 'int shift by negative amount' false defect in GC_finalize
Ivan Maidanski [Wed, 24 May 2017 08:30:42 +0000 (11:30 +0300)]
Workaround 'int shift by negative amount' false defect in GC_finalize
(fix commits eeb118dd46fbe0)

* finalize.c [GC_ASSERTIONS || LINT2] (GC_finalize): Replace GC_ASSERT
(for curr_fo and log_fo_table_size) with a conditional ABORT.

7 years agoEliminate 'conditional expression is always true' code defect in GC_init
Ivan Maidanski [Tue, 23 May 2017 07:17:12 +0000 (10:17 +0300)]
Eliminate 'conditional expression is always true' code defect in GC_init

* misc.c (GC_init): Move ALIGNMENT>GC_DS_TAGS expression from
"if" statement to #if.

7 years agoWorkaround 'comparison of identical expressions' false code defects
Ivan Maidanski [Tue, 23 May 2017 06:23:54 +0000 (09:23 +0300)]
Workaround 'comparison of identical expressions' false code defects

* thread_local_alloc.c [THREAD_LOCAL_ALLOC] (GC_init_thread_local):
New local variable (res); save result of GC_setspecific and
GC_key_create to res; replace res!=0 with COVERT_DATAFLOW(res)!=0.
* pthread_support.c [CAN_HANDLE_FORK] (GC_remove_all_threads_but_me):
Likewise.

7 years agoWorkaround 'array compared to 0', 'untrusted loop bound' false defects
Ivan Maidanski [Mon, 22 May 2017 22:01:08 +0000 (01:01 +0300)]
Workaround 'array compared to 0', 'untrusted loop bound' false defects

* dyn_load.c [SOLARISDL && !USE_PROC_FOR_LIBRARIES]
(GC_FirstDLOpenedLinkMap): Wrap access to dynStructureAddr (which value
obtained from a weak symbol) into COVERT_DATAFLOW() in comparison to 0.
* dyn_load.c [HAVE_DL_ITERATE_PHDR && !DL_ITERATE_PHDR_STRONG]
(GC_register_main_static_data): Wrap access to dl_iterate_phdr weak
symbol into COVERT_DATAFLOW() in comparison to 0.
* dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_FirstDLOpenedLinkMap): Wrap
access to _DYNAMIC weak symbol into COVERT_DATAFLOW() in comparison to 0.
* include/private/gc_priv.h (TRUSTED_STRING): Pass the argument through
COVERT_DATAFLOW.
* include/private/gcconfig.h (COVERT_DATAFLOW): New macro.
* os_dep.c [SEARCH_FOR_DATA_START] (GC_init_linux_data_start): Wrap
access to __data_start and GC_data_start into COVERT_DATAFLOW() in
comparison to 0.
* tests/disclaim_bench.c: Update comment for include gc_priv.h.
* tests/disclaim_bench.c (main): Pass the integer value obtained from
command-line argument (and which is used as a loop boundary) through
COVERT_DATAFLOW().
* tests/test_cpp.cc (main): Likewise.

7 years agoTravis CI: Test also 'make distcheck'
Ivan Maidanski [Mon, 22 May 2017 19:51:20 +0000 (22:51 +0300)]
Travis CI: Test also 'make distcheck'

Dependencies used to generate configure:
* autoconf 2.69
* automake 1.15
* m4 1.4.18
* libtool 2.4.6
* pkg-config 0.29.2

7 years agoTravis CI: Setup dist tarball uploading to GitHub on tag creation
Ivan Maidanski [Mon, 22 May 2017 07:50:07 +0000 (10:50 +0300)]
Travis CI: Setup dist tarball uploading to GitHub on tag creation

7 years agoTravis CI: Reformat .yml file by travis tool
Ivan Maidanski [Mon, 22 May 2017 07:33:32 +0000 (10:33 +0300)]
Travis CI: Reformat .yml file by travis tool

7 years agoRemove duplicated sample code in leak.md
Ivan Maidanski [Mon, 22 May 2017 06:06:24 +0000 (09:06 +0300)]
Remove duplicated sample code in leak.md

* doc/leak.md (Example): Remove code snippets which are similar to
that of include/leak_detector.h and leak_test.c; replace
GC_find_leak=1 with GC_set_find_leak(1).

7 years agoConvert some (small) .html files to Markdown format
Ivan Maidanski [Fri, 19 May 2017 15:55:29 +0000 (18:55 +0300)]
Convert some (small) .html files to Markdown format

The "doc" files converted: debugging.html, finalization.html,
leak.html, porting.html, scale.html, simple_example.html.

* README.md: Replace leak.html with leak.md; replace debugging.html with
debugging.md.
* doc/debugging.html: Change file suffix to .md; convert text format
from HTML to Markdown.
* doc/finalization.html: Likewise.
* doc/leak.html: Likewise.
* doc/porting.html: Likewise.
* doc/scale.html: Likewise.
* doc/simple_example.html: Likewise.
* doc/gcdescr.html: Replace scale.html with scale.md; replace
finalization.html with finalization.md.
* doc/gcinterface.html: Likewise.
* doc/doc.am (dist_doc_DATA): Rename doc/debugging.html to
doc/debugging.md, finalization.html to finalization.md, leak.html to
leak.md, porting.html to porting.md, scale.html to scale.md,
simple_example.html to simple_example.md.
* doc/overview.html: Replace simple_example.html with
simple_example.md; replace leak.html with leak.md; replace scale.html
with scale.md; replace finalization.html with finalization.md; replace
debugging.html with debugging.md.

7 years agoFix various typos in doc/README and .html files
Ivan Maidanski [Thu, 18 May 2017 22:52:59 +0000 (01:52 +0300)]
Fix various typos in doc/README and .html files

* doc/README.Mac: Fix a typo ("command-line").
* doc/README.amiga: Fix typos ("recommendation", "compiling",
"favorably").
* doc/README.cords: Fix a typo ("and").
* doc/README.macros: Fix a typo ("canceled").
* doc/README.sgi: Fix a typo ("related").
* doc/README.solaris2: Fix a typo ("offset").
* doc/leak.html: Fix a typo ("e.g.").
* doc/overview.html: Fix a typo ("December").
* doc/porting.html: Fix typos ("not supported yet", "signaled",
"not defined yet").
* doc/scale.html: Fix typos ("free", "busy-waiting").
* doc/simple_example.html: Fix a typo ("have not yet").
* tests/test_cpp.cc (main): Fix a typo ("command line") in comment.

7 years agoRemove unused ALIGN_DOUBLE macro (TILE-Gx/Pro)
Ivan Maidanski [Thu, 18 May 2017 21:44:29 +0000 (00:44 +0300)]
Remove unused ALIGN_DOUBLE macro (TILE-Gx/Pro)
(fix commits e35a4171240658)

* doc/porting.html (ALIGN_DOUBLE): Remove documentation for the macro.
* include/private/gcconfig.h [TILEPRO, TILEGX] (ALIGN_DOUBLE): Remove
macro (no longer needed).

7 years agoReplace XXX_THREADS with GC_THREADS macro in scale.html
Ivan Maidanski [Thu, 18 May 2017 21:30:11 +0000 (00:30 +0300)]
Replace XXX_THREADS with GC_THREADS macro in scale.html
(fix commit e559309)

* doc/scale.html: Replace -DXXX_THREADS with -DGC_THREADS.

7 years agoWorkaround 'waiting while holding lock' code defect in stop_world (Unix)
Ivan Maidanski [Thu, 18 May 2017 09:00:45 +0000 (12:00 +0300)]
Workaround 'waiting while holding lock' code defect in stop_world (Unix)

* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && LINT2]
(GC_stop_world): Redefine WAIT_UNIT to 1; call sched_yield() instead
of usleep(); add comment.

7 years agoWorkaround 'int shift by negative amount' false code defect in finalize
Ivan Maidanski [Tue, 16 May 2017 21:40:33 +0000 (00:40 +0300)]
Workaround 'int shift by negative amount' false code defect in finalize
(fix commit eeb118d)

* finalize.c (GC_register_disappearing_link_inner,
GC_register_finalizer_inner): Replace GC_ASSERT (for log_size) with
a conditional ABORT if LINT2.

7 years agoDefine GC_THREADS instead of GC_x_THREADS in Makefiles
Ivan Maidanski [Fri, 12 May 2017 20:32:23 +0000 (23:32 +0300)]
Define GC_THREADS instead of GC_x_THREADS in Makefiles
(code refactoring)

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT] (SRC): Add
thread_local_alloc.c in a single place.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Define GC_THREADS macro
instead of GC_LINUX_THREADS, GC_AIX_THREADS, GC_HPUX_THREADS,
GC_OPENBSD_THREADS, GC_FREEBSD_THREADS, GC_NETBSD_THREADS,
GC_SOLARIS_THREADS, GC_IRIX_THREADS, GC_DARWIN_THREADS, GC_OSF1_THREADS.
* configure.ac [THREADS=posix]: Likewise.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Handle
*-*-aix*, *-*-*freebsd* (including kfreebsd), *-*-gnu*, *-*-irix*,
*-*-openbsd*, *-*-osf*, *-*-solaris* targets in the same ways as
*-*-*linux*.
* Makefile.direct (CFLAGS): Do not mention GC_HPUX_THREADS in comment.
* README.QUICK: Refine documentation about macro and configure option
for builds with (and without) threads support.
* configure.ac (GC_AIX_THREADS, GC_DARWIN_THREADS, GC_FREEBSD_THREADS,
GC_HPUX_THREADS, GC_IRIX_THREADS, GC_LINUX_THREADS, GC_NETBSD_THREADS,
GC_OPENBSD_THREADS, GC_OSF1_THREADS, GC_SOLARIS_THREADS,
GC_WIN32_THREADS, GC_RTEMS_PTHREADS): Remove AH_TEMPLATE.
* configure.ac [THREADS=posix]: Handle *-*-aix*, *-*-irix* targets in
the same ways as *-*-*linux*.
* configure.ac [THREADS=win32 || THREADS=dgux386 || THREADS=aix
|| THREADS=rtems]: Define GC_THREADS macro instead of GC_WIN32_THREADS,
GC_DGUX386_THREADS, GC_AIX_THREADS, GC_RTEMS_PTHREADS.
* doc/README.darwin: Replace GC_MACOSX_THREADS with GC_THREADS.
* doc/README.environment (doc/README.environment): Replace
GC_OSF1_THREADS with OSF1.
* doc/README.hp: Replace GC_HPUX_THREADS with GC_THREADS.
* doc/README.linux: Replace GC_LINUX_THREADS with GC_THREADS.
* doc/scale.html: Likewise.
* doc/README.macros (GC_SOLARIS_THREADS, GC_IRIX_THREADS,
GC_HPUX_THREADS, GC_LINUX_THREADS, GC_OSF1_THREADS, GC_FREEBSD_THREADS,
GC_NETBSD_THREADS, GC_OPENBSD_THREADS, GC_DARWIN_THREADS,
GC_AIX_THREADS, GC_DGUX386_THREADS, GC_WIN32_THREADS): Add note that
the macro is deprecated (GC_THREADS one should be used instead).
* doc/README.sgi: Replace GC_IRIX_THREADS with GC_THREADS.
* doc/README.solaris2: Do not mention GC_SOLARIS_THREADS.
* doc/gcinterface.html: Do not mention GC_XXXX_THREADS.

7 years agoRemove 'dist' target from Makefile.direct
Ivan Maidanski [Fri, 12 May 2017 14:55:57 +0000 (17:55 +0300)]
Remove 'dist' target from Makefile.direct

Distribution tarballs are now created using autotools-based Makefile.

* Makefile.am (EXTRA_DIST): Remove tools/add_gc_prefix.c,
tools/gcname.c items.
* Makefile.direct (SRCS): Likewise.
* Makefile.direct (DOC_FILES, TESTS, GNU_BUILD_FILES, OTHER_MAKEFILES,
OTHER_FILES): Remove variable.
* Makefile.direct (add_gc_prefix, gcname, dist, gc.tar, gc.tar.Z,
gc.tar.gz): Remove target.
* tools/add_gc_prefix.c: Remove.
* tools/gcname.c: Likewise.

7 years agoRemove GC code fragment (which already merged) from README.Mac
Ivan Maidanski [Fri, 12 May 2017 14:37:56 +0000 (17:37 +0300)]
Remove GC code fragment (which already merged) from README.Mac

* doc/README.Mac (Source changes): Remove section (which consists of
code changes for GC v4.12).

7 years agoFix unpaired quote symbol in README.Mac
Ivan Maidanski [Fri, 12 May 2017 14:21:19 +0000 (17:21 +0300)]
Fix unpaired quote symbol in README.Mac

* doc/README.Mac: Fix a typo (remove unpaired double-quote).

7 years agoUse same style of include gc.h in documentation
Ivan Maidanski [Fri, 12 May 2017 14:11:38 +0000 (17:11 +0300)]
Use same style of include gc.h in documentation

* doc/README.darwin (Important usage notes): Include "gc.h" instead of
include <gc/gc.h>.

7 years agoFix typo in README.hp
Ivan Maidanski [Fri, 12 May 2017 07:05:59 +0000 (10:05 +0300)]
Fix typo in README.hp

* doc/README.hp: Fix typo ("recently") in documentation.

7 years agoMove README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
Ivan Maidanski [Thu, 11 May 2017 08:55:39 +0000 (11:55 +0300)]
Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
(code refactoring)

README.QUICK file is not a part of installed libgc documentation.

* Makefile.direct (DOC_FILES): Remove README.QUICK item.
* Makefile.direct (OTHER_FILES): Add README.QUICK item.

7 years agoFix 'doc' files installation folder
Andy Li [Tue, 9 May 2017 01:54:19 +0000 (09:54 +0800)]
Fix 'doc' files installation folder

Docs are dist_doc_DATA.  They should be installed to /usr/share/doc.

* doc/doc.am (dist_pkgdata_DATA): Move all items to dist_doc_DATA.

7 years agoUpdate documentation as parallel mark is now on by default in configure
Ivan Maidanski [Fri, 5 May 2017 18:04:25 +0000 (21:04 +0300)]
Update documentation as parallel mark is now on by default in configure
(fix commit c7f2147)

* configure.ac (parallel-mark): Provide information about
--disable-parallel-mark option instead of --enable-parallel-mark.
* doc/README.autoconf (Important options): Likewise.
* doc/README.solaris2: Likewise.
* doc/simple_example.html: Likewise.
* doc/README.DGUX386: Remove configure --enable-parallel-mark option
(as it is on by default now).
* doc/README.autoconf (Important options): Do not provide information
about --enable-full-debug which is no longer supported (since v7.0).
* doc/gcinterface.html: update information about parallel marker mode
in configure.
* doc/README.solaris2: Provide information about --disable-threads
option instead of --enable-threads=posix.
* doc/simple_example.html: Likewise.

7 years agoFix typos in README.DGUX386
Ivan Maidanski [Fri, 5 May 2017 16:46:43 +0000 (19:46 +0300)]
Fix typos in README.DGUX386

* doc/README.DGUX386: Fix typos ("version", "x86", "parallel") in
documentation.

7 years agoRemove non-existent configure option in simple_example.html
Ivan Maidanski [Fri, 5 May 2017 08:07:34 +0000 (11:07 +0300)]
Remove non-existent configure option in simple_example.html

* doc/simple_example.html (Threads): Remove --enable-thread-local-alloc
option (for configure).

7 years agoRemove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
Ivan Maidanski [Fri, 5 May 2017 07:41:48 +0000 (10:41 +0300)]
Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
(code refactoring)

* configure.ac [dgux386] (DGUX_THREADS): Remove AC_DEFINE.

7 years agoFix OSF1 host pattern in CMakeLists.txt
Ivan Maidanski [Thu, 4 May 2017 21:49:53 +0000 (00:49 +0300)]
Fix OSF1 host pattern in CMakeLists.txt

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && osf]: Replace ".*-.*-osf*"
pattern ".*-.*-osf.*" (a missing "." before "*" is added).

7 years agoCompile thread_local_alloc only if multi-threaded build (Makefile.am)
Ivan Maidanski [Thu, 4 May 2017 21:26:31 +0000 (00:26 +0300)]
Compile thread_local_alloc only if multi-threaded build (Makefile.am)

* Makefile.am (libgc_la_SOURCES): Remove thread_local_alloc.c.
* Makefile.am [WIN32_THREADS || PTHREADS] (libgc_la_SOURCES): Add
thread_local_alloc.c.

7 years agoAlign IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
Ivan Maidanski [Thu, 4 May 2017 11:17:37 +0000 (14:17 +0300)]
Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h

The condition of defining GC_IRIX_THREADS and GC_OSF1_THREADS
(if GC_THREADS) in gc_config_macros.h is now the same as that of
IRIX5 and OSF1 macros in gcconfig.h, respectively.

* include/gc_config_macros.h [GC_THREADS] (GC_HPUX_THREADS,
GC_SOLARIS_THREADS): Replace !defined(__linux__) with "#elif".
* include/gc_config_macros.h [GC_THREADS] (GC_OPENBSD_THREADS,
GC_FREEBSD_THREADS, GC_NETBSD_THREADS): Handle the case before
GC_OSF1_THREADS, GC_IRIX_THREADS, GC_SOLARIS_THREADS, GC_DARWIN_THREADS;
remove FIXME.
* include/gc_config_macros.h [GC_THREADS] (GC_IRIX_THREADS): Check
mips and _mips predefined macros in addition to __mips; do not define
if any of [_]nec_ews, [__]ultrix predefined macro is defined.

7 years agoRemove GC_GNU_THREADS macro (HURD)
Ivan Maidanski [Wed, 3 May 2017 09:04:16 +0000 (12:04 +0300)]
Remove GC_GNU_THREADS macro (HURD)
(code refactoring)

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-gnu*] (GC_GNU_THREADS):
Define GC_THREADS macro instead.
* configure.ac [THREADS=posix && *-*-gnu*] (GC_GNU_THREADS): Likewise.
* configure.ac (GC_GNU_THREADS): Remove AH_TEMPLATE.
* include/gc_config_macros.h: Remove check for GC_GNU_THREADS.
* include/private/gcconfig.h [!CPPCHECK]: Remove consistency check for
GC_GNU_THREADS.
* pthread_support.c [GC_PTHREADS && !GC_WIN32_THREADS] (GC_get_nprocs):
Replace GC_GNU_THREADS to HURD macro check.
* tools/threadlibs.c (main): Replace GC_GNU_THREADS to HURD and
GC_THREADS macros check.

7 years agoFix missing win32_threads.c compilation for Cygwin (CMake)
Ivan Maidanski [Wed, 3 May 2017 08:09:50 +0000 (11:09 +0300)]
Fix missing win32_threads.c compilation for Cygwin (CMake)

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-cygwin*] (SRC): Add
win32_threads.c.
* CMakeLists.txt (win32_threads): Remove commented out variable
definition.

7 years agoTravis CI: Workaround 'unused function' cppcheck false warnings in extra
Ivan Maidanski [Wed, 3 May 2017 07:35:59 +0000 (10:35 +0300)]
Travis CI: Workaround 'unused function' cppcheck false warnings in extra
(fix commit b89b137)

7 years agoTravis CI: Workaround 'value of GC_API unknown' cppcheck warnings
Ivan Maidanski [Tue, 2 May 2017 20:40:50 +0000 (23:40 +0300)]
Travis CI: Workaround 'value of GC_API unknown' cppcheck warnings
(fix commit b89b137)

Also, turn on silent mode for cppcheck.

7 years agoAdd Coverity Scan (static code analysis status) badge to README
Ivan Maidanski [Fri, 28 Apr 2017 19:10:38 +0000 (22:10 +0300)]
Add Coverity Scan (static code analysis status) badge to README

7 years agoTravis CI: Test also by Coverity Scan
Ivan Maidanski [Fri, 28 Apr 2017 08:48:10 +0000 (11:48 +0300)]
Travis CI: Test also by Coverity Scan

7 years agoUse thread-local allocations for all multi-threaded builds
Ivan Maidanski [Fri, 28 Apr 2017 08:42:43 +0000 (11:42 +0300)]
Use thread-local allocations for all multi-threaded builds

This change affects only builds by configure and CMake.

* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Handle *-*-*linux* and
*-*-nacl* targets in the same way as x86-*-linux*.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT] (THREAD_LOCAL_ALLOC): Define
macro (and add thread_local_alloc.c to SRC) for *-*-aix*, *-*-hpux11*,
*-*-openbsd*, *-*-freebsd*, *-*-netbsd*, *-*-irix* targets.
* configure.ac [THREADS=posix] (THREAD_LOCAL_ALLOC): AC_DEFINE for
*-*-*linux*, *-*-nacl*, *-*-aix*, *-*-openbsd*, *-*-netbsd*, *-*-irix*
targets.
* configure.ac [THREADS=posix && *-*-freebsd*]: Remove AC_MSG_WARN that
threads are not fully supported by GC.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-freebsd*]: Likewise.
* configure.ac [THREADS=posix && *-*-osf*] (THREAD_LOCAL_ALLOC):
Define even if enable_parallel_mark is false.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-osf*]
(THREAD_LOCAL_ALLOC): Likewise.
* configure.ac [THREADS=aix] (THREAD_LOCAL_ALLOC): AC_DEFINE.

7 years agoTravis CI: Test also the distributive file creation
Ivan Maidanski [Thu, 27 Apr 2017 09:03:43 +0000 (12:03 +0300)]
Travis CI: Test also the distributive file creation

7 years agoUpdate EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
Ivan Maidanski [Thu, 27 Apr 2017 08:59:20 +0000 (11:59 +0300)]
Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
(fix commit 8312098)

* Makefile.am (EXTRA_DIST): Remove NT_STATIC_THREADS_MAKEFILE,
NT_X64_STATIC_THREADS_MAKEFILE, NT_X64_THREADS_MAKEFILE.
* Makefile.direct (OTHER_MAKEFILES): Likewise.
* doc/README.win32 (Threads): Do not refer to NT_THREADS_MAKEFILE;
replace NT_STATIC_THREADS_MAKEFILE to NT_MAKEFILE.
* doc/README.win64: Replace NT_X64_STATIC_THREADS_MAKEFILE and
NT_X64_THREADS_MAKEFILE to NT_MAKEFILE; update documentation
accordingly; update note about Test_cpp failures; update note about
suppressed warnings.

7 years agoUpdate GC compilation and usage notes for Win32
Ivan Maidanski [Thu, 27 Apr 2017 07:56:08 +0000 (10:56 +0300)]
Update GC compilation and usage notes for Win32

* doc/README.win32: Remove note that cord test is not ported; do not
refer to GC 6.1alpha4.
* doc/README.win32 (Microsoft Tools): Eliminate gctest description
duplication; remove outdated note that static library is normal in
case of absence of thread support.
* doc/README.win32 (GNU Tools): Add note that MinGW build could be
performed on a Windows host; update information about parallel marker
(it is on by default now).
* doc/README.win32 (Threads): Update information about the default
status of threads support in ./configure; mention CMakeLists.txt as
well; refine information about pthread_create/exit calls in Cygwin;
refine information about GC_CreateThread and GC_INIT.

7 years agoTurn on parallel marker for AIX, Irix, NaCl, NetBSD, OpenBSD, RTEMS
Ivan Maidanski [Mon, 24 Apr 2017 07:32:01 +0000 (10:32 +0300)]
Turn on parallel marker for AIX, Irix, NaCl, NetBSD, OpenBSD, RTEMS
(fix commit c7f2147)

* configure.ac [enable_parallel_mark] (PARALLEL_MARK): Define also for
"*-*-*linux*", "*-*-nacl*", "*-*-aix*", "aix", "*-*-openbsd*",
"*-*-gnu*", "*-*-netbsd*", "*-*-irix*", "rtems" targets.

7 years agoTurn on parallel marker by default for all multi-threaded builds
Ivan Maidanski [Sat, 22 Apr 2017 15:21:09 +0000 (18:21 +0300)]
Turn on parallel marker by default for all multi-threaded builds

Note: if some target does not support PARALLEL_MARK, it should be
fixed (or a workaround should be added).

* CMakeLists.txt (enable_parallel_mark): Change default value to ON.
* CMakeLists.txt [enable_parallel_mark] (PARALLEL_MARK): Define only
along with GC_LINUX_THREADS, or GC_AIX_THREADS, or GC_HPUX_THREADS, or
GC_OPENBSD_THREADS, or GC_FREEBSD_THREADS, or GC_NETBSD_THREADS, or
GC_SOLARIS_THREADS, or GC_IRIX_THREADS, or GC_THREADS, or
GC_DARWIN_THREADS, or GC_OSF1_THREADS.
* configure.ac (PARALLEL_MARK): Always define unless threads are
disabled or enable_parallel_mark is "no".

7 years agoRemove unused USE_GENERIC_PUSH_REGS macro definition (TILE-Gx/Pro)
Ivan Maidanski [Sat, 22 Apr 2017 14:31:10 +0000 (17:31 +0300)]
Remove unused USE_GENERIC_PUSH_REGS macro definition (TILE-Gx/Pro)
(fix commit 1240658)

* include/private/gcconfig.h [TILEPRO, TILEGX] (USE_GENERIC_PUSH_REGS):
Remove macro (not used).

7 years agoRemove unused USE_GENERIC macro definition and description
Ivan Maidanski [Sat, 22 Apr 2017 14:24:05 +0000 (17:24 +0300)]
Remove unused USE_GENERIC macro definition and description
(code refactoring)

* BCC_MAKEFILE: Remove comment about USE_GENERIC macro.
* WCC_MAKEFILE: Likewise.
* BCC_MAKEFILE (defines): Remove -DUSE_GENERIC.
* WCC_MAKEFILE (CFLAGS): Likewise.
* doc/README.win32 (Borland Tools): Remove information about
-DUSE_GENERIC and assembler.

7 years agoEnable alternative finalization interface (DISCLAIM) in all makefiles
Ivan Maidanski [Sat, 22 Apr 2017 14:04:52 +0000 (17:04 +0300)]
Enable alternative finalization interface (DISCLAIM) in all makefiles

* BCC_MAKEFILE (defines): Add -DENABLE_DISCLAIM.
* Makefile.direct (CFLAGS): Likewise.
* NT_MAKEFILE (.c.obj): Likewise.
* OS2_MAKEFILE (CFLAGS): Likewise.
* PCR-Makefile (CFLAGS): Likewise.
* WCC_MAKEFILE (DEFS): Likewise.
* digimars.mak (DEFINES): Likewise.
* gc.mak (CPP_PROJ): Likewise.
* build/s60v3/libgc.mmp (ENABLE_DISCLAIM): Uncomment macro.

7 years ago.gitignore: Ignore cord/tests/de_win.rbj
Ivan Maidanski [Sat, 22 Apr 2017 06:58:56 +0000 (09:58 +0300)]
.gitignore: Ignore cord/tests/de_win.rbj

7 years agoMove de_win compiled resource files to cord/tests
Ivan Maidanski [Sat, 22 Apr 2017 06:57:36 +0000 (09:57 +0300)]
Move de_win compiled resource files to cord/tests

* NT_MAKEFILE (cord\de_win.rbj, cord\de_win.res, cord\de.exe): Rename
cord\de_win.rbj to cord\tests\de_win.rbj; rename cord\de_win.res to
cord\tests\de_win.res.
* NT_MAKEFILE (clean): Rename cord\*.rbj to cord\tests\*.rbj; rename
cord\*.res to cord\tests\*.res.

7 years agoFix tests crash caused by insufficient stack size (NT_MAKEFILE)
Ivan Maidanski [Sat, 22 Apr 2017 06:32:17 +0000 (09:32 +0300)]
Fix tests crash caused by insufficient stack size (NT_MAKEFILE)
(fix commit 8312098)

* NT_MAKEFILE: Refine title comment (list the variables affecting
build configuration).
* NT_MAKEFILE (CPU): Define (uncomment) variable.
* NT_MAKEFILE (LINK_DLL_FLAGS): Remove uuid.lib (not needed).
* NT_MAKEFILE (gctest.exe, cord\de.exe, test_cpp.exe): Remove -stack
option (to use the default stack size); add /MACHINE:$(CPU) option.

7 years agoEliminate 'possible loss of data' MS VC warning in disclaim_and_reclaim
Ivan Maidanski [Fri, 21 Apr 2017 21:28:35 +0000 (00:28 +0300)]
Eliminate 'possible loss of data' MS VC warning in disclaim_and_reclaim

* reclaim.c [ENABLE_DISCLAIM] (GC_disclaim_and_reclaim): Change type
of bit_no local variable from int to word (matching that in other
GC_reclaim_* functions).

7 years agoCollapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
Ivan Maidanski [Fri, 21 Apr 2017 10:24:42 +0000 (13:24 +0300)]
Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE

Now NT_MAKEFILE should support building of static and dynamic,
single- and multi-threaded, 32- and 64-bit GC libraries.
The default is dynamic multi-threaded GC library.

* NT_MAKEFILE: Remove comment about assuming a single thread.
* NT_MAKEFILE (MY_CPU): Replace with CVTRES_CPU; add comment; add
sample for X64.
* NT_MAKEFILE (CPU): Comment out (defined automatically).
* NT_MAKEFILE (CFLAGS_SPECIFIC, GC_DLL, GC_LIB, LINK_GC): New variable;
add samples for X64, static, single-threaded library.
* NT_MAKEFILE (LINK_DLL_FLAGS): New variable (copied from LINK64_FLAGS
of NT_X64_THREADS_MAKEFILE file); remove unneeded system .lib files.
* NT_MAKEFILE (AO_SRC_DIR, AO_INCLUDE_DIR): New variable (copied from
NT_STATIC_THREADS_MAKEFILE file).
* NT_MAKEFILE (OBJS): Add win32_threads.obj, thread_local_alloc.obj.
* NT_MAKEFILE (.c.obj, .cpp.obj): Add -I$(AO_INCLUDE_DIR) option;
replace $(cvars) with $(CFLAGS_SPECIFIC); add /wd4100 /wd4127 /wd4701
options (copied from NT_X64_THREADS_MAKEFILE).
* NT_MAKEFILE (.c.obj): Add -DCORD_NOT_DLL option (copied from
NT_X64_THREADS_MAKEFILE); Add comment about _CRT_SECURE_NO_DEPRECATE
(copied from NT_X64_STATIC_THREADS_MAKEFILE file).
* NT_MAKEFILE (gc_cpp.cpp): Remove target.
* NT_MAKEFILE (gc.lib, gctest.exe, cord\de.exe, test_cpp.exe): Replace
gc.lib with $(GC_LIB).
* NT_MAKEFILE (gc.lib): Replace "lib /MACHINE:i386 /out:gc.lib" with
"$(LINK_GC) /MACHINE:$(CPU)"; remove comment about original NT SDK.
* NT_MAKEFILE (gctest.exe): Remove comments related to win32s.
* NT_MAKEFILE (gctest.exe, cord\de.exe, test_cpp.exe): Replace
"-debug -debugtype:cv" options with $(ldebug).
* NT_MAKEFILE ($(AO_SRC_DIR), clean): New target (copied from
NT_X64_THREADS_MAKEFILE file).
* NT_STATIC_THREADS_MAKEFILE: Remove.
* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_THREADS_MAKEFILE: Likewise.

7 years agoEliminate 'locally defined symbol imported' MS linker warnings (cord)
Ivan Maidanski [Thu, 20 Apr 2017 21:54:16 +0000 (00:54 +0300)]
Eliminate 'locally defined symbol imported' MS linker warnings (cord)

* NT_X64_THREADS_MAKEFILE (.c.obj): Add -DCORD_NOT_DLL option.
* include/cord.h [GC_DLL] (CORD_API): Define to "extern" if CORD_NOT_DLL.

7 years agoPrevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
Ivan Maidanski [Thu, 20 Apr 2017 21:22:10 +0000 (00:22 +0300)]
Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection

* mark.c [WRAP_MARK_SOME] (GC_mark_some): Do not call WARN() about
ACCESS_VIOLATION more than once per garbage collection.

7 years agoSuppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
Ivan Maidanski [Thu, 20 Apr 2017 21:15:14 +0000 (00:15 +0300)]
Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)

* NT_X64_STATIC_THREADS_MAKEFILE (.c.obj): Add /wd4100 /wd4127 options
(to suppress "unreferenced formal parameter" and
"conditional expression is constant" compiler warnings).
* NT_X64_THREADS_MAKEFILE (.c.obj): Likewise.

7 years agoRemove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
Ivan Maidanski [Thu, 20 Apr 2017 09:05:29 +0000 (12:05 +0300)]
Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target

* NT_X64_THREADS_MAKEFILE (clean): Delete also .exe, .log, .pdb, .exp,
.lib, .obj, .rbj, .res, *.dll, test_cpp.cpp files in cord, cord\tests,
extra, tests folders; redirect stderr for "del" utility to nul.

7 years agoEliminate 'possible loss of data' compiler warnings in cord (MS VC)
Ivan Maidanski [Thu, 20 Apr 2017 08:50:03 +0000 (11:50 +0300)]
Eliminate 'possible loss of data' compiler warnings in cord (MS VC)

* cord/cordbscs.c (CORD_cat_char_star, CORD_cat, CORD_from_fn_inner):
Add explicit cast in assignment of result->depth, result->len.
* cord/cordbscs.c (CORD_substr_checked): Change type of "j", "lim"
local variables from int to size_t.
* cord/cordbscs.c (CORD_init_min_len): Add explicit cast (to int) in
assignment of CORD_max_len.
* cord/cordxtra.c (CORD_ncmp): Add explicit cast (to long) when "avail"
local variable is updated.
* cord/cordxtra.c (CORD_chr, CORD_rchr, CORD_from_file_eager): Add
explicit cast to char (from int) for "c" local variable in assignment
of d.target and in CORD_ec_append call.
* cord/cordxtra.c (refill_cache): Add explicit cast to long (from
size_t) for line_start in fseek call.
* cord/tests/de.c (line_pos, fix_pos, do_command): Add explicit cast to
int in assignment of *c, line, col.
* cord/tests/de.c (do_command): Reset line, col and file_pos variables
(of different types) in separate statements.
* cord/tests/de_win.c (WinMain): Add explicit cast of msg.wParam to int
in return statement.

7 years agoEliminate 'signed/unsigned mismatch' compiler warning in gctest (MS VC)
Ivan Maidanski [Thu, 20 Apr 2017 08:26:11 +0000 (11:26 +0300)]
Eliminate 'signed/unsigned mismatch' compiler warning in gctest (MS VC)
(fix commit 014d92d)

* tests/test.c (bm_huge): Add explicit casts of GC_signed_word values
to GC_word.

7 years agoEliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
Ivan Maidanski [Thu, 20 Apr 2017 08:17:20 +0000 (11:17 +0300)]
Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)

* include/gc_allocator.h (GC_ATTR_UNUSED): Remove.
* tests/test_cpp.cc (ATTR_UNUSED): Likewise.
* include/gc_allocator.h (gc_allocator::deallocate,
gc_allocator_ignore_off_page::deallocate,
traceable_allocator::deallocate): Comment out unused argument name
instead of using GC_ATTR_UNUSED.
* include/gc_cpp.h [_MSC_VER && !GC_DEBUG] (operator new): Comment out
unused argument names.
* tests/test_cpp.cc [(MSWIN32 && !__MINGW32__ || MSWINCE)
&& !NO_WINMAIN_ENTRY] (WinMain): Comment out unused argument names
instead of using ATTR_UNUSED.

7 years ago.gitignore: Ignore auto-generated test_cpp.cpp
Ivan Maidanski [Wed, 19 Apr 2017 21:17:55 +0000 (00:17 +0300)]
.gitignore: Ignore auto-generated test_cpp.cpp

7 years agoRemove version info in 'de' cord test application
Ivan Maidanski [Wed, 19 Apr 2017 08:43:36 +0000 (11:43 +0300)]
Remove version info in 'de' cord test application

This version (4.1) is outdated and not needed (as it is a test app).

* cord/tests/de_win.rc (ABOUTBOX): Remove information about "de" test
application version.
* cord/tests/de_win.rc: Remove the commented out description adding
"de" icon.

7 years agoExpand tabs to spaces in de_win.rc (tests)
Ivan Maidanski [Wed, 19 Apr 2017 08:27:47 +0000 (11:27 +0300)]
Expand tabs to spaces in de_win.rc (tests)

* cord/tests/de_win.rc: Expand tabs to spaces; remove duplicate blank
lines.

7 years agoFix AO_SRC_DIR target name in NT_*_MAKEFILE
Ivan Maidanski [Tue, 18 Apr 2017 08:42:06 +0000 (11:42 +0300)]
Fix AO_SRC_DIR target name in NT_*_MAKEFILE

* NT_STATIC_THREADS_MAKEFILE (AO_SCR_DIR): Rename target to
$(AO_SRC_DIR).
* NT_X64_STATIC_THREADS_MAKEFILE (AO_SCR_DIR): Likewise.
* NT_X64_THREADS_MAKEFILE (AO_SCR_DIR): Likewise.