1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 22:58:30 +00:00

Replace LINUX macro with compiler predefined macro __linux__

This commit is contained in:
jsteube 2016-07-08 23:23:16 +02:00
parent 96f2ade4bb
commit 49f693a1c9
7 changed files with 15 additions and 14 deletions

View File

@ -10,7 +10,8 @@
- 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__
- Replace DARWIN macro with compiler predefined macro __APPLE__
- Replace LINUX macro with compiler predefined macro __linux__
##
## Bugs

View File

@ -40,7 +40,7 @@
#include <pwd.h>
#include <limits.h>
#ifdef LINUX
#ifdef __linux__
#include <termios.h>
#include <sys/ioctl.h>
#endif

View File

@ -22,7 +22,7 @@
// #include <CL/cl_ext.h> // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPU
#endif
#ifdef LINUX
#ifdef __linux__
#include <CL/cl.h>
// #include <CL/cl_ext.h> // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPU
#endif

View File

@ -120,7 +120,7 @@ LFLAGS_NATIVE += $(LDFLAGS)
endif # darwin
ifeq ($(UNAME),Linux)
CFLAGS_NATIVE := -D_POSIX -DLINUX
CFLAGS_NATIVE := -D_POSIX
ifndef DEBUG
CFLAGS_NATIVE += -s
endif
@ -141,7 +141,7 @@ endif # freebsd
## Cross compilation target
##
CFLAGS_CROSS_LINUX := -D_POSIX -DLINUX
CFLAGS_CROSS_LINUX := -D_POSIX
ifndef DEBUG
CFLAGS_CROSS_LINUX += -s
endif

View File

@ -82,7 +82,7 @@ int ocl_init (OCL_PTR *ocl)
log_info ("");
log_info ("ATTENTION! Can't find OpenCL ICD loader library");
log_info ("");
#if defined (LINUX)
#ifdef __linux__
log_info ("You're probably missing the \"ocl-icd-libopencl1\" package (Debian/Ubuntu)");
log_info (" sudo apt-get install ocl-icd-libopencl1");
log_info ("");

View File

@ -4350,7 +4350,7 @@ static void *thread_monitor (void *p)
hm_set_fanspeed_with_device_id_nvapi (device_id, fan_speed_new, 1);
#endif
#ifdef LINUX
#ifdef __linux__
hm_set_fanspeed_with_device_id_xnvctrl (device_id, fan_speed_new);
#endif
}
@ -6179,7 +6179,7 @@ int main (int argc, char **argv)
char *exec_path = get_exec_path ();
#if defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__)
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
char *resolved_install_folder = realpath (INSTALL_FOLDER, NULL);
char *resolved_exec_path = realpath (exec_path, NULL);
@ -14255,7 +14255,7 @@ int main (int argc, char **argv)
{
need_nvml = 1;
#ifdef LINUX
#ifdef __linux__
need_xnvctrl = 1;
#endif
@ -16459,7 +16459,7 @@ int main (int argc, char **argv)
}
else if (device_param->device_vendor_id == VENDOR_ID_NV)
{
#ifdef LINUX
#ifdef __linux__
rc = set_fan_control (data.hm_xnvctrl, data.hm_device[device_id].xnvctrl, NV_CTRL_GPU_COOLER_MANUAL_CONTROL_TRUE);
#endif
@ -18641,7 +18641,7 @@ int main (int argc, char **argv)
}
else if (device_param->device_vendor_id == VENDOR_ID_NV)
{
#ifdef LINUX
#ifdef __linux__
rc = set_fan_control (data.hm_xnvctrl, data.hm_device[device_id].xnvctrl, NV_CTRL_GPU_COOLER_MANUAL_CONTROL_FALSE);
#endif

View File

@ -2338,7 +2338,7 @@ void drupal7_encode (u8 digest[64], u8 buf[43])
* tty
*/
#ifdef LINUX
#ifdef __linux__
static struct termios savemodes;
static int havemodes = 0;
@ -4353,7 +4353,7 @@ char *get_exec_path ()
char *exec_path = (char *) mymalloc (exec_path_len);
#ifdef LINUX
#ifdef __linux__
char tmp[32] = { 0 };
@ -4821,7 +4821,7 @@ int sort_by_dictstat (const void *s1, const void *s2)
dictstat_t *d1 = (dictstat_t *) s1;
dictstat_t *d2 = (dictstat_t *) s2;
#ifdef _LINUX
#ifdef __linux__
d2->stat.st_atim = d1->stat.st_atim;
#else
d2->stat.st_atime = d1->stat.st_atime;