Rename main plugin implementation file from C to C++
The main purpose of this patch is to replace cpu.c
with cpu.cc
.
This step requires some #include directives of libxfce4util
to be enclosed in extern "C" {}
because some of the included Xfce4 C files are missing G_BEGIN_DECLS/G_END_DECLS
macros. This issue has been fixed in libxfce4util's main GitLab repository, but (1) there hasn't been a release containing this fix and (2) it would delay cpugraph adoption in conservative Linux distributions which are upgrading to newer Xfce library releases less often.
All C++ implementation files (.cc
file extension) should include fixes.h
before including any other header files.
The new file plugin.c, comprising of a single line of code, is required because XFCE_PANEL_PLUGIN_REGISTER
isn't fully compatible with C++.
See also: xfce/libxfce4util!19 (merged)