>>177 自前makeで良ければpatch作ってみた。
>>> ここから
--- ./hot-babe-0.2.2/hot-babe.c.origMon Dec 6 07:59:38 2004
+++ ./hot-babe-0.2.2/hot-babe.cSat Feb 12 18:46:09 2005
@@ -28,6 +28,10 @@
#include <sys/dkstat.h>
#endif
#endif
+#ifdef __APPLE__
+#include <mach/mach_host.h>
+#include <mach/mach_init.h>
+#endif
/* x11 includes */
#include <gdk/gdk.h>
@@ -99,6 +103,13 @@
long cp_time[CPUSTATES];
size_t len = sizeof(cp_time);
#endif
+#ifdef __APPLE__
+ unsigned long load, total, oload, ototal;
+ unsigned long ab, ac, ad, ae;
+ static mach_port_t port = NULL;
+ mach_msg_type_number_t count = HOST_CPU_LOAD_INFO_COUNT;
+ host_cpu_load_info_data_t aa;
+#endif
#ifdef __linux__
stat = fopen("/proc/stat", "r");
>>226の続き
>>> ここから
@@ -113,6 +124,16 @@
ac = cp_time[CP_NICE];
ad = cp_time[CP_SYS];
ae = cp_time[CP_IDLE];
+#endif
+#ifdef __APPLE__
+ if (port == NULL)
+ port = mach_host_self();
+ if (host_statistics(port, HOST_CPU_LOAD_INFO, (host_info_t)&aa, &count) != KERN_SUCCESS)
+ (void)fprintf(stderr, "Cannot get HOST_CPU_LOAD_INFO");
+ ab = aa.cpu_ticks[CPU_STATE_USER];
+ ac = aa.cpu_ticks[CPU_STATE_NICE];
+ ad = aa.cpu_ticks[CPU_STATE_SYSTEM];
+ ae = aa.cpu_ticks[CPU_STATE_IDLE];
#endif
>>> ここまで