Skip to content

Commit

Permalink
Intercept GC_pthread_sigmask on Cosmo
Browse files Browse the repository at this point in the history
Issue #666 (bdwgc).

This symbol is intercepted now, to match that on Linux.

* include/gc/gc_pthread_redirects.h [!GC_PTHREAD_REDIRECTS_ONLY
&& !GC_NO_PTHREAD_SIGMASK && __COSMOPOLITAN__] (GC_pthread_sigmask):
Declare.
* include/gc/gc_pthread_redirects.h [!GC_PTHREAD_REDIRECTS_ONLY
&& !GC_NO_PTHREAD_SIGMASK && !(GC_PTHREAD_SIGMASK_NEEDED
|| GC_HAVE_PTHREAD_SIGMASK || _BSD_SOURCE || _GNU_SOURCE
|| _NETBSD_SOURCE || _POSIX_C_SOURCE>=199506L || _XOPEN_SOURCE>=500)]
(GC_NO_PTHREAD_SIGMASK): Do not define if __COSMOPOLITAN__.
  • Loading branch information
ivmai committed Oct 15, 2024
1 parent 3c23252 commit 1310a0c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/gc/gc_pthread_redirects.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ GC_API void *GC_dlopen(const char * /* path */, int /* mode */);
# endif /* !GC_NO_DLOPEN */

# ifndef GC_NO_PTHREAD_SIGMASK
# if defined(GC_PTHREAD_SIGMASK_NEEDED) \
|| defined(GC_HAVE_PTHREAD_SIGMASK) || defined(_BSD_SOURCE) \
|| defined(_GNU_SOURCE) || defined(_NETBSD_SOURCE) \
|| (_POSIX_C_SOURCE >= 199506L) || (_XOPEN_SOURCE >= 500) \
# if defined(GC_PTHREAD_SIGMASK_NEEDED) || defined(__COSMOPOLITAN__) \
|| defined(GC_HAVE_PTHREAD_SIGMASK) || defined(_BSD_SOURCE) \
|| defined(_GNU_SOURCE) || defined(_NETBSD_SOURCE) \
|| (_POSIX_C_SOURCE >= 199506L) || (_XOPEN_SOURCE >= 500) \
|| (__POSIX_VISIBLE >= 199506) /* xBSD internal macro */

GC_API int GC_pthread_sigmask(int /* how */, const sigset_t *,
sigset_t * /* oset */);
# else
Expand Down

0 comments on commit 1310a0c

Please sign in to comment.