Merge pull request #120 from stevenc99/kfreebsd

GNU/kFreeBSD support
This commit is contained in:
Branimir Karadžić
2016-07-14 09:04:28 -07:00
committed by GitHub
3 changed files with 12 additions and 6 deletions

View File

@@ -11,9 +11,9 @@
# if defined(__FreeBSD__)
# include <pthread_np.h>
# endif
# if defined(__GLIBC__) && !( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) ) )
# if defined(__linux__) && (BX_CRT_GLIBC < 21200)
# include <sys/prctl.h>
# endif // defined(__GLIBC__) ...
# endif
#elif BX_PLATFORM_WINRT
using namespace Platform;
using namespace Windows::Foundation;
@@ -157,12 +157,10 @@ namespace bx
{
#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
pthread_setname_np(_name);
#elif BX_PLATFORM_LINUX
# if defined(__GLIBC__) && (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) )
#elif (BX_CRT_GLIBC >= 21200)
pthread_setname_np(m_handle, _name);
# else
#elif BX_PLATFORM_LINUX
prctl(PR_SET_NAME,_name, 0, 0, 0);
# endif // defined(__GLIBC__) ...
#elif BX_PLATFORM_BSD
#ifdef __NetBSD__
pthread_setname_np(m_handle, "%s", (void *)_name);

View File

@@ -1 +1,5 @@
#if BX_CRT_GLIBC
#include_next <alloca.h>
#else
#include <stdlib.h>
#endif

View File

@@ -1 +1,5 @@
#ifdef BX_CRT_GLIBC
#include_next <signal.h>
#else
#include <sys/signal.h>
#endif