Re: kdebase3 dfports override

看板DFBSD_submit作者時間21年前 (2005/01/17 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/5 (看更多)
Roland Hammerle wrote: > Attached is a dfports override of kdebase3. Thanks, I found it very helpful -- I've been trying to do the same fixes but much slower. I have one question and one additional patch. I'm wondering about patch-configure: I'm assuming (though I haven't tried it) that this will break the port on FreeBSD because libkinfo won't be found. Does this sound correct? I couldn't come up with a way to make it work on both systems so that the patches could be pushed upstream :o/ Next: I'm assuming you were working with gcc2 ? I had to make this change to accomodate gcc34, though once again I'm not sure if it would still compile on a FreeBSD machine: --- ksysguard/ksysguardd/FreeBSD/ProcessList.c.orig 2005-01-16 05:26:20.000000000 -0800 +++ ksysguard/ksysguardd/FreeBSD/ProcessList.c 2005-01-16 05:33:02.000000000 -0800 @@ -220,20 +220,18 @@ ps->priority = p.kp_proc.p_priority; ps->niceLevel = p.kp_proc.p_nice; #endif - /* this isn't usertime -- it's total time (??) */ -#if __FreeBSD_version >= 500015 - ps->userTime = p.ki_runtime / 10000; -#elif __FreeBSD_version >= 300000 + #if defined(__DragonFly__) if (!getrusage(p.kp_proc.p_pid, &pru)) { errx(1, "failed to get rusage info"); } ps->userTime = pru.ru_utime.tv_usec / 1000; /*p_runtime / 1000*/ -#else +#elif __FreeBSD_version >= 500015 + ps->userTime = p.ki_runtime / 10000; +#elif __FreeBSD_version >= 300000 ps->userTime = p.kp_proc.p_runtime / 10000; -#endif #else ps->userTime = p.kp_proc.p_rtime.tv_sec*100+p.kp_proc.p_rtime.tv_usec/100; #endif
文章代碼(AID): #11wglo00 (DFBSD_submit)
文章代碼(AID): #11wglo00 (DFBSD_submit)