Merge pull request #891 from neheb/master
Fix compilation for native Cygwin
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
|
||||
#if defined (_POSIX)
|
||||
#include <pthread.h>
|
||||
#if defined (__linux__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif // __linux__
|
||||
#endif // _POSIX
|
||||
|
||||
#if defined (__APPLE__)
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
|
||||
#define PROGNAME "hashcat"
|
||||
|
||||
#if defined (__linux__)
|
||||
#if defined (__linux__) || defined (__CYGWIN__)
|
||||
#define _POSIX
|
||||
#elif defined (__APPLE__)
|
||||
#define _POSIX
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#if defined (__MSC_VER)
|
||||
#define HC_API_CALL __cdecl
|
||||
#elif defined (_WIN32) || defined (__WIN32__) || defined (__CYGWIN__)
|
||||
#elif defined (_WIN32) || defined (__WIN32__)
|
||||
#define HC_API_CALL __stdcall
|
||||
#else
|
||||
#define HC_API_CALL
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ typedef struct ADLOD6PowerControlInfo
|
||||
|
||||
#if defined (__MSC_VER)
|
||||
#define ADL_API_CALL __cdecl
|
||||
#elif defined (_WIN32) || defined (__WIN32__) || defined (__CYGWIN__)
|
||||
#elif defined (_WIN32) || defined (__WIN32__)
|
||||
#define ADL_API_CALL __stdcall
|
||||
#else
|
||||
#define ADL_API_CALL
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#if defined (__CYGWIN__)
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
// NVIDIA extras
|
||||
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
|
||||
|
||||
+1
-1
@@ -215,7 +215,7 @@ NVAPI_INTERFACE NvAPI_GPU_RestoreCoolerSettings (NvPhysicalGpuHandle hPhysicalGp
|
||||
|
||||
typedef NvPhysicalGpuHandle HM_ADAPTER_NVAPI;
|
||||
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
#if defined(_WIN32) || defined(__WIN32__)
|
||||
#define NVAPI_API_CALL __stdcall
|
||||
#else
|
||||
#define NVAPI_API_CALL
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ typedef enum nvmlGom_enum
|
||||
|
||||
typedef nvmlDevice_t HM_ADAPTER_NVML;
|
||||
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
#if defined(_WIN32) || defined(__WIN32__)
|
||||
#define NVML_API_CALL __stdcall
|
||||
#else
|
||||
#define NVML_API_CALL
|
||||
|
||||
@@ -40,7 +40,7 @@ typedef int (*XCLOSEDISPLAY) (void *);
|
||||
|
||||
typedef int HM_ADAPTER_XNVCTRL;
|
||||
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
#if defined(_WIN32) || defined(__WIN32__)
|
||||
#define XNVCTRL_API_CALL __stdcall
|
||||
#else
|
||||
#define XNVCTRL_API_CALL
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ Slightly modified to work with hashcat to no falsly detect _SORT_R_LINUX with mi
|
||||
defined __FreeBSD__ || defined __DragonFly__)
|
||||
# define _SORT_R_BSD
|
||||
# define _SORT_R_INLINE inline
|
||||
#elif (defined __linux__)
|
||||
#elif (defined __linux__) || defined (__CYGWIN__)
|
||||
# define _SORT_R_LINUX
|
||||
# define _SORT_R_INLINE inline
|
||||
#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
|
||||
|
||||
Reference in New Issue
Block a user