Created attachment 3129 os.c updated with Solaris code It isn't that hard to make the cpugraph plugin work on Solaris. See the updated os.c file, attached, derived from the 1.0.0 tarball The only other necessary change is to add -lkstat to the libraries linked against. Works beautifully on my workstation.
Great! Thanks a lot for the patch. It looks pretty clean to me, so I've applied it pretty much as is. The only adjustments I made were to the style, to be more consistent with the rest of cpugraph. I don't have any Solaris system at hand, so I can't test it myself, but I'll trust you that it works. After reviewing the code, I don't see anything that would cause problems on 32 bits vs 64 bits system, nor on little endian vs big endian. That said, if you had a couple of solaris machines, 32 and 64 bits, intel and spark, a little reality check would be very much appreciated. I haven't merged it to the master branch yet. For the moment, it is in taskbranch/bug-6721. http://git.xfce.org/panel-plugins/xfce4-cpugraph-plugin/log/?h=taskbranch/bug-6721
Hi Peter, I am thinking of adding your name to at least the COPYING file (to make the licensing clear) and possibly the AUTHOR, to have a copyright notice there in addition to the file you modified. Any objection?
Florian, I'm happy for you to add my name and, just to be absolutely clear in case there's an issue in future, I'm happy for my patch to follow the existing license, namely GPLv2+. As for testing on other Solaris systems, unfortunately I don't have anything else running a compatible version of xfce (yet). However, I am sure that the kstat part of the code is clean.
Great, thanks. I've added the your name around, listed Solaris in the documentation, and merged to the master branch. Solaris support will be available in the next version. Thanks for your help.