restore include paths for cross-platform builds because i messed absolutely every #include up. dont worry that everything is modified, all i did was normalize line endings because CLRF snuck into the repo and this prevents fake diffs

This commit is contained in:
2026-03-24 19:07:55 -04:00
parent 7d485fdcd7
commit bfecad40be
1340 changed files with 264990 additions and 264996 deletions

View File

@@ -1,53 +1,53 @@
#if defined(_WIN32)
#include "WindowsIncludes.h" // Sleep
#else
#include <pthread.h>
#include <time.h>
#include <sys/time.h>
#endif
#include "RakSleep.h"
void RakSleep(unsigned int ms)
{
#ifdef _WIN32
Sleep(ms);
#else
//Single thread sleep code thanks to Furquan Shaikh, http://somethingswhichidintknow.blogspot.com/2009/09/sleep-in-pthread.html
//Modified slightly from the original
pthread_mutex_t fakeMutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t fakeCond = PTHREAD_COND_INITIALIZER;
struct timespec timeToWait;
struct timeval now;
int rt;
gettimeofday(&now,NULL);
long seconds = ms/1000;
long nanoseconds = (ms - seconds * 1000) * 1000000;
timeToWait.tv_sec = now.tv_sec + seconds;
timeToWait.tv_nsec = now.tv_usec*1000 + nanoseconds;
if (timeToWait.tv_nsec >= 1000000000)
{
timeToWait.tv_nsec -= 1000000000;
timeToWait.tv_sec++;
}
pthread_mutex_lock(&fakeMutex);
rt = pthread_cond_timedwait(&fakeCond, &fakeMutex, &timeToWait);
pthread_mutex_unlock(&fakeMutex);
#endif
}
#if defined(_WIN32)
#include "WindowsIncludes.h" // Sleep
#else
#include <pthread.h>
#include <time.h>
#include <sys/time.h>
#endif
#include "RakSleep.h"
void RakSleep(unsigned int ms)
{
#ifdef _WIN32
Sleep(ms);
#else
//Single thread sleep code thanks to Furquan Shaikh, http://somethingswhichidintknow.blogspot.com/2009/09/sleep-in-pthread.html
//Modified slightly from the original
pthread_mutex_t fakeMutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t fakeCond = PTHREAD_COND_INITIALIZER;
struct timespec timeToWait;
struct timeval now;
int rt;
gettimeofday(&now,NULL);
long seconds = ms/1000;
long nanoseconds = (ms - seconds * 1000) * 1000000;
timeToWait.tv_sec = now.tv_sec + seconds;
timeToWait.tv_nsec = now.tv_usec*1000 + nanoseconds;
if (timeToWait.tv_nsec >= 1000000000)
{
timeToWait.tv_nsec -= 1000000000;
timeToWait.tv_sec++;
}
pthread_mutex_lock(&fakeMutex);
rt = pthread_cond_timedwait(&fakeCond, &fakeMutex, &timeToWait);
pthread_mutex_unlock(&fakeMutex);
#endif
}