WIP: AIX support
Obsoletes the previous issue. Early on, lots of stdbool twiddling, then the real meat.
What works:
-
Mostly everything, except:
-
strace flags need to be changed?
-
IBM i support is partial; CPU meters, uptime, and load averages won't work due to lack of libperfstat, functional utmp, and no load average generation
-
No battery, obviously
-
The CPU meter algorithm is a little sketchy looking
For the AIX experts in the audience, you'll notice I'm taking great care not to use anything like libperfstat/ODM/WLM or worse, getting kernel symbols and twiddling them directly. This is due to a desire to keep it (mostly functional as possible) under IBM i's PASE. The most I use is an undocumented syscall in public headers to get the load average, and even then, its ifdefed out (but harmless anyways) under PASE.
A function from OpenBSD was lifted, but it seems this is OK legally speaking, seeing as the OpenBSD support in htop uses code borrowed from OpenBSD?
Warmer: memory meter works, (though a cosmetic glitch in bar mode?) libperfstat is used when applicable, (won't be used under i, so things there will basically be no-ops) and the swap meter. CPU is the next thing to work on, and that looks a bit hairy.

all the basic features should be working now. the memory usage meters don't seem 100% right to me, however, so I might continue tweaking those values. Feel free to look at this patch now.
Merge conflict resolved, Would appreciate review.
Thank you for the contribution! This is a big one, I'll need to set some time aside to give it a proper review. but I will definitely get to it.
I just pushed something that also makes it work on IBM i's AIX syscall emulator, albeit with some functionality downgrades due to limitations there. I've been using htop with this PR on an AIX system however, and it mostly seems to work fine over the months I've been using it. The data sampling for CPU/memory isn't perfect, but it works.
Let me know about mergeability when you have the time.
Can't wait for this to be merged
Some of the suggestions made. A lot of this is quirks of htop itself and its build system... and also me from two years ago being pretty dumb.
Hi. I tested the PR about two weeks ago. Had some problems with the default colour scheme, but the overview (main page) worked just fine.
If you need me to test sth on AIX 7.2, just tell me.