]> 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>
Thu, 6 Apr 2017 07:45:24 +0000 (10:45 +0300)
commite6a9195fac355c09e14ae0b631b9b62c3daac84c
tree34b9f64081ac567f734b891a76776f2f8963f7ed
parent90efcc877b8de87e9783966985778d1d0c414580
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