1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-03 12:21:07 +00:00

Refactor OSX preprocessor constants to read 'DARWIN'

This commit is contained in:
Unix-Ninja 2016-06-27 08:13:50 -04:00
parent fce2363fec
commit 2188a01ae9
7 changed files with 12 additions and 12 deletions

View File

@ -43,7 +43,7 @@
#include <termio.h> #include <termio.h>
#endif #endif
#ifdef OSX #ifdef DARWIN
#include <termios.h> #include <termios.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <mach-o/dyld.h> #include <mach-o/dyld.h>
@ -58,7 +58,7 @@ typedef void *ADL_LIB;
typedef void *NVAPI_LIB; typedef void *NVAPI_LIB;
typedef void *NVML_LIB; typedef void *NVML_LIB;
typedef void *XNVCTRL_LIB; typedef void *XNVCTRL_LIB;
#ifdef OSX #ifdef DARWIN
#define __stdcall #define __stdcall
#endif #endif
#endif #endif

View File

@ -13,7 +13,7 @@
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS #define CL_USE_DEPRECATED_OPENCL_2_0_APIS
#ifdef OSX #ifdef DARWIN
#include <OpenCL/cl.h> #include <OpenCL/cl.h>
#endif #endif

View File

@ -46,7 +46,7 @@
#define hc_thread_mutex_delete(m) pthread_mutex_destroy (&m) #define hc_thread_mutex_delete(m) pthread_mutex_destroy (&m)
#endif #endif
#ifdef OSX #ifdef DARWIN
typedef struct cpu_set typedef struct cpu_set
{ {
uint32_t count; uint32_t count;

View File

@ -107,7 +107,7 @@ BINARY_NATIVE := $(PROG_NAME)
ifeq ($(UNAME),Darwin) ifeq ($(UNAME),Darwin)
export MACOSX_DEPLOYMENT_TARGET=10.9 export MACOSX_DEPLOYMENT_TARGET=10.9
BINARY_NATIVE := $(BINARY_NATIVE).app BINARY_NATIVE := $(BINARY_NATIVE).app
CFLAGS_NATIVE := -D_POSIX -DOSX CFLAGS_NATIVE := -D_POSIX -DDARWIN
CFLAGS_NATIVE += $(CFLAGS) CFLAGS_NATIVE += $(CFLAGS)
LFLAGS_NATIVE := -lpthread LFLAGS_NATIVE := -lpthread
endif # darwin endif # darwin

View File

@ -69,7 +69,7 @@ int ocl_init (OCL_PTR *ocl)
#ifdef _WIN #ifdef _WIN
ocl->lib = hc_dlopen ("OpenCL"); ocl->lib = hc_dlopen ("OpenCL");
#elif OSX #elif DARWIN
ocl->lib = hc_dlopen ("/System/Library/Frameworks/OpenCL.framework/OpenCL", RTLD_NOW); ocl->lib = hc_dlopen ("/System/Library/Frameworks/OpenCL.framework/OpenCL", RTLD_NOW);
#else #else
ocl->lib = hc_dlopen ("libOpenCL.so", RTLD_NOW); ocl->lib = hc_dlopen ("libOpenCL.so", RTLD_NOW);

View File

@ -6,7 +6,7 @@
* License.....: MIT * License.....: MIT
*/ */
#ifdef OSX #ifdef DARWIN
#include <stdio.h> #include <stdio.h>
#endif #endif

View File

@ -6,7 +6,7 @@
* License.....: MIT * License.....: MIT
*/ */
#ifdef OSX #ifdef DARWIN
#include <stdio.h> #include <stdio.h>
#endif #endif
@ -2382,7 +2382,7 @@ int tty_fix()
} }
#endif #endif
#ifdef OSX #ifdef DARWIN
static struct termios savemodes; static struct termios savemodes;
static int havemodes = 0; static int havemodes = 0;
@ -4325,7 +4325,7 @@ char *get_exec_path ()
const int len = GetModuleFileName (NULL, exec_path, exec_path_len - 1); const int len = GetModuleFileName (NULL, exec_path, exec_path_len - 1);
#elif OSX #elif DARWIN
uint size = exec_path_len; uint size = exec_path_len;
@ -4462,7 +4462,7 @@ void truecrypt_crc32 (const char *filename, u8 keytab[64])
myfree (buf); myfree (buf);
} }
#ifdef OSX #ifdef DARWIN
int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set) int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set)
{ {
int core; int core;
@ -5730,7 +5730,7 @@ char **scan_directory (const char *path)
if ((d = opendir (tmp_path)) != NULL) if ((d = opendir (tmp_path)) != NULL)
{ {
#ifdef OSX #ifdef DARWIN
struct dirent e; struct dirent e;
for (;;) { for (;;) {