#define _mm_popcount_sizeT _mm_popcnt_u32
#endif
-#elif defined(FORCE_LINUX) || defined(__linux__) || defined(__gnu_linux__)
+#elif defined(__APPLE__) || defined(FORCE_LINUX) || defined(__linux__) || defined(__gnu_linux__)
#define SWR_API
#include <unistd.h>
#include <sys/stat.h>
#include <stdio.h>
+#include <limits.h>
typedef void VOID;
typedef void* LPVOID;
#undef TRUE
#define TRUE 1
+#define MAX_PATH PATH_MAX
+
#define OSALIGN(RWORD, WIDTH) RWORD __attribute__((aligned(WIDTH)))
#define THREAD __thread
#ifndef INLINE
free(p);
}
+#define _countof(a) (sizeof(a)/sizeof(*(a)))
+
+#define sprintf_s sprintf
+#define strcpy_s(dst,size,src) strncpy(dst,src,size)
#define GetCurrentProcessId getpid
#define GetCurrentThreadId gettid