Skip to content

Commit

Permalink
reword i guess
Browse files Browse the repository at this point in the history
  • Loading branch information
CasualPokePlayer committed Oct 12, 2024
1 parent cc0a9d7 commit e4b3456
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rc_compat.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#if !defined(RC_NO_THREADS) && !defined(_WIN32) && !defined(GEKKO) && (!defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) < 500)
/* We'll want to use PTHREAD_MUTEX_RECURSIVE, but glibc only conditionally exposes pthread_mutexattr_settype and PTHREAD_MUTEX_RECURSIVE depending on feature flags
/* We'll want to use pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE, but glibc only conditionally exposes pthread_mutexattr_settype and PTHREAD_MUTEX_RECURSIVE depending on feature flags
* Defining _XOPEN_SOURCE must be done at the top of the source file, before including any headers
* pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE have been present since nearly the beginning of linux pthread anyways (present all the way back since Jul 8, 1998), so there shouldn't be much harm in doing this
* If for some reason you are compiling against a glibc which is older than Jul 8, 1998, you could change these to pthread_mutexattr_setkind_np and PTHREAD_MUTEX_RECURSIVE_NP
* pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE are specified the Single UNIX Specification (Version 2, 1997), so should cover practically any pthread implementation
*/
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 500
Expand Down

0 comments on commit e4b3456

Please sign in to comment.