macOS: OSX 10.4 Tiger compatibility
2 changes to make htop compatible with OSX 10.4 Tiger
mach_host_self()andvm_page_sizeare defined inmach_init.h.<libproc.h>API is not available, related functionality is disabled.
htop builds and works but cannot display per-process CPU% and task%. This can hopefully be improved in the future but at least it builds for now.
/cc @barracuda156
@glebm We have a breakage outside of Tiger, at least up to 10.6: https://github.com/htop-dev/htop/issues/1686 (update: up to 10.10, as it follows from Apple docs).
(It is not seen on Tiger, of course, once you just disable the whole of related code, but a proper fix should be more nuanced.)
Disabling huge chunks of the existing code may have very adverse effects. Please refine this patch in a way that it works more localized.
I have no idea how to make it more localized, considering that the entire <libproc.h> API is missing on 10.4.
Thank you for the review, I'll get back to it next weekend. In the meantime, I figured out how to get some of the info on Tiger (though it requires root for privileged processes).
Thank you for the review, I'll get back to it next weekend. Take the time you need. With #1688 at least the immediate breakage from 10.6 onward should be taken care of.
In the meantime, I figured out how to get some of the info on Tiger (though it requires root for privileged processes). This sound good to hear. If information are unavailable for some processes, this usually is not a problem. Some columns include some marker for "N/A" data that should be used in these cases.