mirror of
https://github.com/holub/mame
synced 2025-10-04 08:28:39 +03:00
Fix bx/bgfx on older OSX
Submitted upstream for consideration: https://github.com/bkaradzic/bx/pull/77
This commit is contained in:
parent
3236fabec4
commit
79ae956643
2
3rdparty/bx/include/bx/macros.h
vendored
2
3rdparty/bx/include/bx/macros.h
vendored
@ -75,7 +75,7 @@
|
||||
# if BX_CLANG_HAS_FEATURE(cxx_thread_local)
|
||||
# define BX_THREAD_LOCAL __thread
|
||||
# endif // BX_COMPILER_CLANG
|
||||
# if BX_COMPILER_GCC >= 40200
|
||||
# if (!BX_PLATFORM_OSX && (BX_COMPILER_GCC >= 40200)) || (BX_COMPILER_GCC >= 40500)
|
||||
# define BX_THREAD_LOCAL __thread
|
||||
# endif // BX_COMPILER_GCC
|
||||
# define BX_ATTRIBUTE(_x) __attribute__( (_x) )
|
||||
|
13
3rdparty/bx/include/bx/os.h
vendored
13
3rdparty/bx/include/bx/os.h
vendored
@ -133,14 +133,25 @@ namespace bx
|
||||
: 0
|
||||
;
|
||||
#elif BX_PLATFORM_OSX
|
||||
#ifdef MACH_TASK_BASIC_INFO
|
||||
mach_task_basic_info info;
|
||||
mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT;
|
||||
|
||||
int result = task_info(mach_task_self()
|
||||
int const result = task_info(mach_task_self()
|
||||
, MACH_TASK_BASIC_INFO
|
||||
, (task_info_t)&info
|
||||
, &infoCount
|
||||
);
|
||||
#else // MACH_TASK_BASIC_INFO
|
||||
task_basic_info info;
|
||||
mach_msg_type_number_t infoCount = TASK_BASIC_INFO_COUNT;
|
||||
|
||||
int const result = task_info(mach_task_self()
|
||||
, TASK_BASIC_INFO
|
||||
, (task_info_t)&info
|
||||
, &infoCount
|
||||
);
|
||||
#endif // MACH_TASK_BASIC_INFO
|
||||
if (KERN_SUCCESS != result)
|
||||
{
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user