bx: refactor #ifdefs

Fix potential compilation error by ensuring __GLIBC__ is only evaluated
when actually defined.

When __GLIBC__ is defined, we do not need any additional headers on BSD
platforms (hence why using #elif).
This commit is contained in:
Steven Chamberlain 2016-07-13 14:15:39 +01:00
parent ad91a1391c
commit 423097c40f

View File

@ -8,12 +8,13 @@
#if BX_PLATFORM_POSIX
# include <pthread.h>
# if defined(BX_PLATFORM_BSD) && !defined(__GLIBC__)
# if defined(__GLIBC__)
# if !( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) ) )
# include <sys/prctl.h>
# endif
# elif defined(BX_PLATFORM_BSD)
# include <pthread_np.h>
# endif
# if defined(__GLIBC__) && !( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) ) )
# include <sys/prctl.h>
# endif // defined(__GLIBC__) ...
#elif BX_PLATFORM_WINRT
using namespace Platform;
using namespace Windows::Foundation;