- The Time.Estimated attribute in status display should also show --runtime limit if user set it
- Fix some strict aliasing rule violation on older compilers
- Fix some variable initializers on older compilers
+- Replace DARWIN macro with __APPLE__
##
## Bugs
ifeq ($(UNAME),Darwin)
export MACOSX_DEPLOYMENT_TARGET=10.9
-CFLAGS_NATIVE := -D_POSIX -DDARWIN
+CFLAGS_NATIVE := -D_POSIX
CFLAGS_NATIVE += $(CFLAGS)
LFLAGS_NATIVE := -lpthread
LFLAGS_NATIVE += $(LDFLAGS)
#ifdef _WIN
ocl->lib = hc_dlopen ("OpenCL");
- #elif DARWIN
+ #elif __APPLE__
ocl->lib = hc_dlopen ("/System/Library/Frameworks/OpenCL.framework/OpenCL", RTLD_NOW);
#else
ocl->lib = hc_dlopen ("libOpenCL.so", RTLD_NOW);
* License.....: MIT
*/
-#ifdef DARWIN
+#ifdef __APPLE__
#include <stdio.h>
#endif
}
#endif
-#if defined(DARWIN) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
static struct termios savemodes;
static int havemodes = 0;
const int len = GetModuleFileName (NULL, exec_path, exec_path_len - 1);
- #elif DARWIN
+ #elif __APPLE__
uint size = exec_path_len;
myfree (buf);
}
-#ifdef DARWIN
+#ifdef __APPLE__
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 DARWIN
+ #ifdef __APPLE__
+
struct dirent e;
- for (;;) {
+ for (;;)
+ {
memset (&e, 0, sizeof (e));
+
struct dirent *de = NULL;
if (readdir_r (d, &e, &de) != 0)
}
if (de == NULL) break;
+
#else
+
struct dirent *de;
while ((de = readdir (d)) != NULL)
{
+
#endif
+
if ((strcmp (de->d_name, ".") == 0) || (strcmp (de->d_name, "..") == 0)) continue;
int path_size = strlen (tmp_path) + 1 + strlen (de->d_name);