diff options
author | Mark Wong <markwkm@gmail.com> | 2008-03-19 22:05:55 -0700 |
---|---|---|
committer | Mark Wong <markwkm@gmail.com> | 2008-03-19 22:05:55 -0700 |
commit | c08d94bcc3261bb692e714c138fddbd6cd63ddd0 (patch) | |
tree | d5907dd6e43d611234f8ee235dcdb1a2448b73ba | |
parent | d8b5f1989394a90b5d8420c623913ed8d22aefe3 (diff) |
Updated OS X port to match core ptop changes. Also fixed configure to no
complain about OS X.
-rwxr-xr-x[-rw-r--r--] | configure.ac | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | machine/m_macosx.c | 17 |
2 files changed, 7 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 8a322d2..e257fd5 100644..100755 --- a/configure.ac +++ b/configure.ac @@ -197,12 +197,7 @@ else sunos4*) MODULE=sunos4;; sysv4*) MODULE=svr4;; sysv5*) MODULE=svr5;; - darwin*) - echo "macosx" - echo "The macosx module is untested. Use at your own risk." - echo "If you really want to use this module, please run configure as follows:" - echo " ./configure --with-module=macosx" - AC_MSG_ERROR([macosx module unsupported]);; + darwin*) MODULE=macosx;; *) echo "none" echo "Configure doesn't recognize this system and doesn't know" echo "what module to assign to it. Help the cause and run the" diff --git a/machine/m_macosx.c b/machine/m_macosx.c index 993baf1..e8ba9d5 100644..100755 --- a/machine/m_macosx.c +++ b/machine/m_macosx.c @@ -35,7 +35,6 @@ * MacOS kernel stuff */ -#include <kvm.h> #include <fcntl.h> #include <sys/dkstat.h> #include <sys/sysctl.h> @@ -131,10 +130,10 @@ static long memory_stats[7]; host_cpu_load_info_data_t cpuload; -static long cp_time[CPU_STATE_MAX]; -static long cp_old[CPU_STATE_MAX]; -static long cp_diff[CPU_STATE_MAX]; -static int cpu_states[CPU_STATE_MAX]; +static int64_t cp_time[CPU_STATE_MAX]; +static int64_t cp_old[CPU_STATE_MAX]; +static int64_t cp_diff[CPU_STATE_MAX]; +static int64_t cpu_states[CPU_STATE_MAX]; /* * types @@ -667,7 +666,6 @@ get_process_info(struct system_info * si, /* set up flags which define what we are going to select */ show_idle = sel->idle; - show_system = sel->system; show_uid = sel->uid != -1; show_command = sel->command != NULL; show_fullcmd = sel->fullcmd; @@ -948,11 +946,8 @@ proc_compare(const void *pp1, const void *pp2) * and "renice" commands. */ -int -proc_owner(pid) - -int pid; - +uid_t +proc_owner(pid_t pid) { register int cnt; register struct macos_proc **prefp; |