From: Unix-Ninja Date: Mon, 27 Jun 2016 12:13:50 +0000 (-0400) Subject: Refactor OSX preprocessor constants to read 'DARWIN' X-Git-Tag: v3.00~4^2~1 X-Git-Url: https://www.flypig.org.uk/git/?p=hashcat.git;a=commitdiff_plain;h=2188a01ae91acd1d5537fa44138c95360582157c Refactor OSX preprocessor constants to read 'DARWIN' --- diff --git a/include/common.h b/include/common.h index 7bdef11..0b670bc 100644 --- a/include/common.h +++ b/include/common.h @@ -43,7 +43,7 @@ #include #endif -#ifdef OSX +#ifdef DARWIN #include #include #include @@ -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 diff --git a/include/ext_OpenCL.h b/include/ext_OpenCL.h index d175fcc..4ffd56b 100644 --- a/include/ext_OpenCL.h +++ b/include/ext_OpenCL.h @@ -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 #endif diff --git a/include/shared.h b/include/shared.h index 93aad09..985c54a 100644 --- a/include/shared.h +++ b/include/shared.h @@ -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; diff --git a/src/Makefile b/src/Makefile index cab2beb..6b0a413 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/ext_OpenCL.c b/src/ext_OpenCL.c index 477afa2..9986c46 100644 --- a/src/ext_OpenCL.c +++ b/src/ext_OpenCL.c @@ -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); diff --git a/src/hashcat.c b/src/hashcat.c index b205cc8..1799224 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -6,7 +6,7 @@ * License.....: MIT */ -#ifdef OSX +#ifdef DARWIN #include #endif diff --git a/src/shared.c b/src/shared.c index 12d7706..9e16c02 100644 --- a/src/shared.c +++ b/src/shared.c @@ -6,7 +6,7 @@ * License.....: MIT */ -#ifdef OSX +#ifdef DARWIN #include #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 (;;) {