Added BX_PLATFORM_POSIX.

This commit is contained in:
bkaradzic
2012-06-27 20:48:52 -07:00
parent 301cdbbbeb
commit 2dabd70335
3 changed files with 5 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ namespace bx
void free(void* _obj)
{
uint16_t index = getIndex(_obj);
BX_CHECK(index >= 0 && index < m_num, "index %d, m_num %d", index, m_num);
BX_CHECK(index < m_num, "index %d, m_num %d", index, m_num);
*( (uint16_t*)_obj) = m_freeIndex;
m_freeIndex = index;

View File

@@ -71,6 +71,8 @@
# error "BX_PLATFORM_* is not defined!"
#endif //
#define BX_PLATFORM_POSIX (BX_PLATFORM_NACL || BX_PLATFORM_ANDROID || BX_PLATFORM_LINUX || BX_PLATFORM_OSX || BX_PLATFORM_IOS)
// http://sourceforge.net/apps/mediawiki/predef/index.php?title=Architectures
#if defined(__arm__)
# undef BX_CPU_ARM

View File

@@ -8,9 +8,7 @@
#include "bx.h"
#define BX_SEM_CONFIG_POSIX (BX_PLATFORM_NACL || BX_PLATFORM_ANDROID || BX_PLATFORM_LINUX)
#if BX_SEM_CONFIG_POSIX
#if BX_PLATFORM_POSIX
# include <semaphore.h>
# include <time.h>
#elif BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360
@@ -19,7 +17,7 @@
namespace bx
{
#if BX_SEM_CONFIG_POSIX
#if BX_PLATFORM_POSIX
class Semaphore
{
public: