- 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
#include <pwd.h>
#include <limits.h>
-#ifdef LINUX
+#ifdef __linux__
#include <termios.h>
#include <sys/ioctl.h>
#endif
// #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
endif # darwin
ifeq ($(UNAME),Linux)
-CFLAGS_NATIVE := -D_POSIX -DLINUX
+CFLAGS_NATIVE := -D_POSIX
ifndef DEBUG
CFLAGS_NATIVE += -s
endif
## Cross compilation target
##
-CFLAGS_CROSS_LINUX := -D_POSIX -DLINUX
+CFLAGS_CROSS_LINUX := -D_POSIX
ifndef DEBUG
CFLAGS_CROSS_LINUX += -s
endif
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 ("");
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
}
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);
{
need_nvml = 1;
- #ifdef LINUX
+ #ifdef __linux__
need_xnvctrl = 1;
#endif
}
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
}
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
* tty
*/
-#ifdef LINUX
+#ifdef __linux__
static struct termios savemodes;
static int havemodes = 0;
char *exec_path = (char *) mymalloc (exec_path_len);
- #ifdef LINUX
+ #ifdef __linux__
char tmp[32] = { 0 };
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;