Refactor OSX preprocessor constants to read 'DARWIN'
authorUnix-Ninja <chris@unix-ninja.com>
Mon, 27 Jun 2016 12:13:50 +0000 (08:13 -0400)
committerUnix-Ninja <chris@unix-ninja.com>
Mon, 27 Jun 2016 12:13:50 +0000 (08:13 -0400)
include/common.h
include/ext_OpenCL.h
include/shared.h
src/Makefile
src/ext_OpenCL.c
src/hashcat.c
src/shared.c

index 7bdef11..0b670bc 100644 (file)
@@ -43,7 +43,7 @@
 #include <termio.h>
 #endif
 
-#ifdef OSX
+#ifdef DARWIN
 #include <termios.h>
 #include <sys/ioctl.h>
 #include <mach-o/dyld.h>
@@ -58,7 +58,7 @@ typedef void *ADL_LIB;
 typedef void *NVAPI_LIB;
 typedef void *NVML_LIB;
 typedef void *XNVCTRL_LIB;
-#ifdef OSX
+#ifdef DARWIN
 #define __stdcall
 #endif
 #endif
index d175fcc..4ffd56b 100644 (file)
@@ -13,7 +13,7 @@
 #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
 
index 93aad09..985c54a 100644 (file)
@@ -46,7 +46,7 @@
 #define hc_thread_mutex_delete(m)   pthread_mutex_destroy  (&m)
 #endif
 
-#ifdef OSX
+#ifdef DARWIN
 typedef struct cpu_set
 {
   uint32_t count;
index cab2beb..6b0a413 100644 (file)
@@ -107,7 +107,7 @@ BINARY_NATIVE            := $(PROG_NAME)
 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
index 477afa2..9986c46 100644 (file)
@@ -69,7 +69,7 @@ int ocl_init (OCL_PTR *ocl)
 
   #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);
index b205cc8..1799224 100644 (file)
@@ -6,7 +6,7 @@
  * License.....: MIT
  */
 
-#ifdef OSX
+#ifdef DARWIN
 #include <stdio.h>
 #endif
 
index 12d7706..9e16c02 100644 (file)
@@ -6,7 +6,7 @@
  * License.....: MIT
  */
 
-#ifdef OSX
+#ifdef DARWIN
 #include <stdio.h>
 #endif
 
@@ -2382,7 +2382,7 @@ int tty_fix()
 }
 #endif
 
-#ifdef OSX
+#ifdef DARWIN
 static struct termios savemodes;
 static int havemodes = 0;
 
@@ -4325,7 +4325,7 @@ char *get_exec_path ()
 
   const int len = GetModuleFileName (NULL, exec_path, exec_path_len - 1);
 
-  #elif OSX
+  #elif DARWIN
 
   uint size = exec_path_len;
 
@@ -4462,7 +4462,7 @@ void truecrypt_crc32 (const char *filename, u8 keytab[64])
   myfree (buf);
 }
 
-#ifdef OSX
+#ifdef DARWIN
 int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set)
 {
   int core;
@@ -5730,7 +5730,7 @@ char **scan_directory (const char *path)
 
   if ((d = opendir (tmp_path)) != NULL)
   {
-    #ifdef OSX
+    #ifdef DARWIN
     struct dirent e;
 
     for (;;) {