#include <semaphore.h>
#include <dlfcn.h>
#include <pwd.h>
+#include <limits.h>
#ifdef LINUX
#include <termio.h>
#endif
-#ifdef OSX
+#ifdef DARWIN
#include <termios.h>
#include <sys/ioctl.h>
#include <mach-o/dyld.h>
#include <mach/mach.h>
-#include <limits.h>
#endif
typedef void *OCL_LIB;
typedef void *NVAPI_LIB;
typedef void *NVML_LIB;
typedef void *XNVCTRL_LIB;
-#ifdef OSX
+#ifdef DARWIN
#define __stdcall
#endif
#endif
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
-#ifdef OSX
+#ifdef DARWIN
#include <OpenCL/cl.h>
#endif
#define hc_thread_mutex_delete(m) pthread_mutex_destroy (&m)
#endif
-#ifdef OSX
+#ifdef DARWIN
typedef struct cpu_set
{
uint32_t count;
#ifndef TYPES_H
#define TYPES_H
+#ifdef _WIN
+#define EOL "\r\n"
+#else
+#define EOL "\n"
+#endif
+
typedef struct
{
uint salt_buf[16];
ifeq ($(UNAME),Darwin)
export MACOSX_DEPLOYMENT_TARGET=10.9
BINARY_NATIVE := $(BINARY_NATIVE).app
-CFLAGS_NATIVE := -D_POSIX -DOSX
+CFLAGS_NATIVE := -D_POSIX -DDARWIN
CFLAGS_NATIVE += $(CFLAGS)
LFLAGS_NATIVE := -lpthread
endif # darwin
#ifdef _WIN
ocl->lib = hc_dlopen ("OpenCL");
- #elif OSX
+ #elif DARWIN
ocl->lib = hc_dlopen ("/System/Library/Frameworks/OpenCL.framework/OpenCL", RTLD_NOW);
#else
ocl->lib = hc_dlopen ("libOpenCL.so", RTLD_NOW);
* License.....: MIT
*/
-#ifdef OSX
+#ifdef DARWIN
#include <stdio.h>
#endif
* flush
*/
- #ifdef _WIN
- fputc ('\r', out);
- fputc ('\n', out);
- #endif
-
- #ifdef _POSIX
- fputc ('\n', out);
- #endif
-
+ fputs (EOL, out);
fflush (out);
}
* License.....: MIT
*/
-#ifdef OSX
+#ifdef DARWIN
#include <stdio.h>
#endif
}
#endif
-#ifdef OSX
+#ifdef DARWIN
static struct termios savemodes;
static int havemodes = 0;
const int len = GetModuleFileName (NULL, exec_path, exec_path_len - 1);
- #elif OSX
+ #elif DARWIN
uint size = exec_path_len;
myfree (buf);
}
-#ifdef OSX
+#ifdef DARWIN
int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set)
{
int core;
if ((d = opendir (tmp_path)) != NULL)
{
- #ifdef OSX
+ #ifdef DARWIN
struct dirent e;
for (;;) {