}
/* Add a graph. */
-#if HAVE_GALLIUM_EXTRA_HUD || HAVE_LIBSENSORS
+#if defined(HAVE_GALLIUM_EXTRA_HUD) || defined(HAVE_LIBSENSORS)
char arg_name[64];
#endif
/* IF YOU CHANGE THIS, UPDATE print_help! */
else if (strcmp(name, "main-thread-busy") == 0) {
hud_thread_busy_install(pane, name, true);
}
-#if HAVE_GALLIUM_EXTRA_HUD
+#ifdef HAVE_GALLIUM_EXTRA_HUD
else if (sscanf(name, "nic-rx-%s", arg_name) == 1) {
hud_nic_graph_install(pane, arg_name, NIC_DIRECTION_RX);
}
pane->type = PIPE_DRIVER_QUERY_TYPE_HZ;
}
#endif
-#if HAVE_LIBSENSORS
+#ifdef HAVE_LIBSENSORS
else if (sscanf(name, "sensors_temp_cu-%s", arg_name) == 1) {
hud_sensors_temp_graph_install(pane, arg_name,
SENSORS_TEMP_CURRENT);
puts(" cs-invocations");
}
-#if HAVE_GALLIUM_EXTRA_HUD
+#ifdef HAVE_GALLIUM_EXTRA_HUD
hud_get_num_disks(1);
hud_get_num_nics(1);
hud_get_num_cpufreq(1);
#endif
-#if HAVE_LIBSENSORS
+#ifdef HAVE_LIBSENSORS
hud_get_num_sensors(1);
#endif
*
**************************************************************************/
-#if HAVE_GALLIUM_EXTRA_HUD
+#ifdef HAVE_GALLIUM_EXTRA_HUD
/* Purpose:
* Reading /sys/devices/system/cpu/cpu?/cpufreq/scaling_???_freq
*
**************************************************************************/
-#if HAVE_GALLIUM_EXTRA_HUD
+#ifdef HAVE_GALLIUM_EXTRA_HUD
/* Purpose: Reading /sys/block/<*>/stat MB/s read/write throughput per second,
* displaying on the HUD.
*
**************************************************************************/
-#if HAVE_GALLIUM_EXTRA_HUD
+#ifdef HAVE_GALLIUM_EXTRA_HUD
/* Purpose: Reading network interface RX/TX throughput per second,
* displaying on the HUD.
void hud_batch_query_cleanup(struct hud_batch_query_context **pbq,
struct pipe_context *pipe);
-#if HAVE_GALLIUM_EXTRA_HUD
+#ifdef HAVE_GALLIUM_EXTRA_HUD
int hud_get_num_nics(bool displayhelp);
#define NIC_DIRECTION_RX 1
#define NIC_DIRECTION_TX 2
void hud_cpufreq_graph_install(struct hud_pane *pane, int cpu_index, unsigned int mode);
#endif
-#if HAVE_LIBSENSORS
+#ifdef HAVE_LIBSENSORS
int hud_get_num_sensors(bool displayhelp);
#define SENSORS_TEMP_CURRENT 1
#define SENSORS_TEMP_CRITICAL 2
*
**************************************************************************/
-#if HAVE_LIBSENSORS
+#ifdef HAVE_LIBSENSORS
/* Purpose: Extract lm-sensors data, expose temperature, power, voltage. */
#include "hud/hud_private.h"