Fixed various areas where code was being compiled for Linux only, but should actually be used on OS X too (bug 4392, r=dvander).

This commit is contained in:
Scott Ehlert
2010-05-29 18:11:47 -04:00
parent 9a35085ac3
commit e518605d69
12 changed files with 17 additions and 20 deletions
+1 -1
View File
@@ -51,7 +51,7 @@
#include "ConCommandBaseIterator.h"
#include "ShareSys.h"
#if defined PLATFORM_LINUX
#if defined PLATFORM_POSIX
# include <dlfcn.h>
# include <sys/mman.h>
# include <stdint.h>
+1 -1
View File
@@ -153,7 +153,7 @@ void CHalfLife2::OnSourceModAllInitialized_Post()
return;
}
g_EntList = *reinterpret_cast<void **>(addr + offset);
#elif defined PLATFORM_LINUX
#elif defined PLATFORM_LINUX || defined PLATFORM_APPLE
/* gEntList and/or g_pEntityList */
if (!g_pGameConf->GetMemSig("gEntList", (void **)&addr))
{
+1 -1
View File
@@ -241,7 +241,7 @@ bool LibrarySystem::IsPathDirectory(const char *path)
return true;
}
#elif defined PLATFORM_LINUX
#elif defined PLATFORM_POSIX
struct stat s;
if (stat(path, &s) != 0)
+3 -3
View File
@@ -43,7 +43,7 @@
#include "sm_crc32.h"
#include "MemoryUtils.h"
#if defined PLATFORM_LINUX
#if defined PLATFORM_POSIX
#include <dlfcn.h>
#endif
@@ -523,7 +523,7 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
s_TempSig.library,
m_CurFile);
} else {
#if defined PLATFORM_LINUX
#if defined PLATFORM_POSIX
if (s_TempSig.sig[0] == '@')
{
Dl_info info;
@@ -570,7 +570,7 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
}
}
#if defined PLATFORM_LINUX
#if defined PLATFORM_POSIX
skip_find:
#endif
m_Sigs.replace(m_offset, final_addr);
+2 -5
View File
@@ -46,7 +46,7 @@
#if defined PLATFORM_WINDOWS
#include <windows.h>
#elif defined PLATFORM_LINUX
#elif defined PLATFORM_POSIX
#include <limits.h>
#include <unistd.h>
#include <sys/times.h>
@@ -407,7 +407,7 @@ static cell_t GetSysTickCount(IPluginContext *pContext, const cell_t *params)
{
#if defined PLATFORM_WINDOWS
return (cell_t)GetTickCount();
#elif defined PLATFORM_LINUX
#elif defined PLATFORM_POSIX
tms tm;
clock_t ticks = times(&tm);
long ticks_per_sec = sysconf(_SC_CLK_TCK);
@@ -419,9 +419,6 @@ static cell_t GetSysTickCount(IPluginContext *pContext, const cell_t *params)
fticks -= r;
}
return (cell_t)fticks;
#elif defined PLATFORM_APPLE
assert(false);
return 0;
#endif
}
+1 -1
View File
@@ -34,7 +34,7 @@
//Note: Do not add this to Linux yet, i haven't done the HPET timing research (if even available)
//nonetheless we need accurate counting
#if !defined PLATFORM_LINUX
#if !defined PLATFORM_LINUX && !defined PLATFORM_APPLE
struct Profiler
{