]> granicus.if.org Git - gc/commit
Fix gc.h compliance to strict ANSI (pthreads)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 30 Mar 2017 21:11:04 +0000 (00:11 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 7 Apr 2017 15:22:39 +0000 (18:22 +0300)
commit41d537144522bc6cbd2bff3289bc6e369c7245c9
tree90b487749c214698155363dc74e80533be395840
parent9dc90d2716b04b1fda8b668c0debc6ce6236d760
Fix gc.h compliance to strict ANSI (pthreads)
(Cherry-pick commits 15542970970110 from 'master' branch.)

If -std=cXX option is passed to gcc/clang then sigset_t is undefined,
thus GC_pthread_sigmask declaration should be omitted.  However, this
symbol should be available during GC source code audit by cppcheck.

* include/gc_pthread_redirects.h [!GC_NO_PTHREAD_SIGMASK]
(GC_pthread_sigmask): Declare only if GC_PTHREAD_SIGMASK_NEEDED or
_POSIX_C_SOURCE >= 199506 or _XOPEN_SOURCE >= 500, or _BSD_SOURCE
or _GNU_SOURCE.
* tests/test.c [CPPCHECK && !_GNU_SOURCE && GC_PTHREADS] (_GNU_SOURCE):
Likewise.
include/gc_pthread_redirects.h
tests/test.c