mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-21 04:32:03 +00:00
use proper _XOPEN_SOURCE instead of __USE_UNIX98 to enable needed thread features on glibc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29897 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5e196f549a
commit
19e49c3314
4 changed files with 30 additions and 8 deletions
|
@ -25,13 +25,17 @@
|
|||
|
||||
/*
|
||||
* Since glibc does not enable Unix98 extensions by default, we need to tell it
|
||||
* to do so explicitly. Whether that support is switched on by _XOPEN_SOURCE or
|
||||
* by __USE_UNIX98 depends on whether <features.h> has already been included or
|
||||
* will be included by pthread.h. Hence both flags need to be set here. This
|
||||
* shouldn't be be a problem with other libcs.
|
||||
* to do so explicitly. That support is switched on by _XOPEN_SOURCE and
|
||||
* __USE_UNIX98 is an internal flag which can cause trouble if enabled alone.
|
||||
* For safety we enable this only on linux and hurd where glibc is likely.
|
||||
* We include features.h explicitely to avoid weird problems.
|
||||
*/
|
||||
#define _XOPEN_SOURCE 500
|
||||
#define __USE_UNIX98
|
||||
#if defined __linux__ || defined __hurd__
|
||||
# ifndef _XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE 600
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue